Fix to getChannelContent
This commit is contained in:
Generated
+2
-2
@@ -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",
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user