Fix to getChannelContent

This commit is contained in:
WardPearce
2026-02-13 18:36:38 +13:00
parent 8c32343dae
commit 3c361bda8f
2 changed files with 6 additions and 7 deletions
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "Materialious",
"version": "1.14.4",
"version": "1.15.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "Materialious",
"version": "1.14.4",
"version": "1.15.0",
"license": "MIT",
"dependencies": {
"@capacitor-community/electron": "^5.0.0",
+4 -5
View File
@@ -1,5 +1,4 @@
import { getVideoYTjs } from '$lib/api/youtubejs/video';
import { Capacitor } from '@capacitor/core';
import { get } from 'svelte/store';
import {
authStore,
@@ -174,6 +173,10 @@ export async function getChannelContent(
): Promise<ChannelContent> {
if (typeof options.type === 'undefined') options.type = 'videos';
if (isYTBackend() || useEngineFallback('ChannelContent')) {
return await getChannelContentYTjs(channelId, options);
}
const url = buildPath(`channels/${channelId}/${options.type}`);
if (typeof options.continuation !== 'undefined')
@@ -181,10 +184,6 @@ export async function getChannelContent(
if (typeof options.sortBy !== 'undefined') url.searchParams.set('sort_by', options.sortBy);
if (isYTBackend() || useEngineFallback('ChannelContent')) {
return await getChannelContentYTjs(channelId, options);
}
const resp = await fetchErrorHandle(await fetch(url.toString(), fetchOptions));
return await resp.json();
}