diff --git a/materialious/electron/package-lock.json b/materialious/electron/package-lock.json index 2b1650c8..4f0f87dc 100644 --- a/materialious/electron/package-lock.json +++ b/materialious/electron/package-lock.json @@ -1,12 +1,12 @@ { "name": "Materialious", - "version": "1.11.5", + "version": "1.11.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "Materialious", - "version": "1.11.5", + "version": "1.11.6", "license": "MIT", "dependencies": { "@capacitor-community/electron": "^5.0.0", diff --git a/materialious/src/lib/api/index.ts b/materialious/src/lib/api/index.ts index b1971860..ba55ed85 100644 --- a/materialious/src/lib/api/index.ts +++ b/materialious/src/lib/api/index.ts @@ -68,11 +68,6 @@ export function buildAuthHeaders(): { headers: Record } { } } -export async function getTrending(fetchOptions?: RequestInit): Promise { - const resp = await fetchErrorHandle(await fetch(setRegion(buildPath('trending')), fetchOptions)); - return await resp.json(); -} - export async function getPopular(fetchOptions?: RequestInit): Promise { const resp = await fetchErrorHandle(await fetch(buildPath('popular'), fetchOptions)); return await resp.json(); diff --git a/materialious/src/lib/components/settings/Interface.svelte b/materialious/src/lib/components/settings/Interface.svelte index 2555dc62..cd5e3966 100644 --- a/materialious/src/lib/components/settings/Interface.svelte +++ b/materialious/src/lib/components/settings/Interface.svelte @@ -75,7 +75,7 @@ let resp; try { - resp = await fetch(`${instance}/api/v1/trending`); + resp = await fetch(`${instance}/api/v1/channels/UCH-_hzb2ILSCo9ftVSnrCIQ`); } catch { invalidInstance = true; } diff --git a/materialious/src/lib/navPages.ts b/materialious/src/lib/navPages.ts index 075cf106..416fba73 100644 --- a/materialious/src/lib/navPages.ts +++ b/materialious/src/lib/navPages.ts @@ -12,12 +12,6 @@ export function getPages(): Pages { name: get(_)('pages.home'), requiresAuth: false }, - { - icon: 'whatshot', - href: '/trending', - name: get(_)('pages.trending'), - requiresAuth: false - }, { icon: 'subscriptions', href: '/subscriptions', @@ -30,13 +24,5 @@ export function getPages(): Pages { name: get(_)('pages.playlists'), requiresAuth: true } - // Temporarily disable history page due to limitations with - // Invidious's API - // { - // icon: 'history', - // href: '/history', - // name: get(_)('pages.history'), - // requiresAuth: true - // } ]; } diff --git a/materialious/src/routes/(app)/history/+page.svelte b/materialious/src/routes/(app)/history/+page.svelte deleted file mode 100644 index d073f3f9..00000000 --- a/materialious/src/routes/(app)/history/+page.svelte +++ /dev/null @@ -1,90 +0,0 @@ - - -
- - -{#if loaded} - - - -{:else} - -{/if} diff --git a/materialious/src/routes/(app)/trending/+page.svelte b/materialious/src/routes/(app)/trending/+page.svelte deleted file mode 100644 index cc4ce9b9..00000000 --- a/materialious/src/routes/(app)/trending/+page.svelte +++ /dev/null @@ -1,6 +0,0 @@ - - - diff --git a/materialious/src/routes/(app)/trending/+page.ts b/materialious/src/routes/(app)/trending/+page.ts deleted file mode 100644 index 91f3c46a..00000000 --- a/materialious/src/routes/(app)/trending/+page.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { getTrending } from '$lib/api/index'; -import { feedCacheStore } from '$lib/store'; -import { error } from '@sveltejs/kit'; -import { get } from 'svelte/store'; - -export async function load() { - let trending = get(feedCacheStore).trending; - - if (!trending) { - try { - trending = await getTrending(); - } catch (errorMessage: any) { - error(500, errorMessage); - } - - feedCacheStore.set({ ...get(feedCacheStore), trending }); - } else { - getTrending().then((newTrending) => - feedCacheStore.set({ ...get(feedCacheStore), trending: newTrending }) - ); - } -}