Fix web app views when using new backend

This commit is contained in:
Brahim Hadriche committed 2024-12-22 20:43:22 -05:00
1 parent 51fa4c0540
commit 93d660e978
11 files changed
+45 -4

No files matched your search

+5
View File
@@ -1,5 +1,7 @@
import { PlayletApi } from "lib/Api/PlayletApi";
const DISABLE_CACHE = true;
export class InvidiousApi {
public instance: string;
public endpoints: any;
@@ -290,6 +292,9 @@ export class InvidiousApi {
// TODO:P2 use more appropriate cache storage
private getCache(url: string, cacheSeconds: number) {
if (DISABLE_CACHE) {
return null;
}
const cacheKey = this.getCacheKey(url);
const cache = localStorage.getItem(cacheKey);
if (!cache) {
+6 -1
View File
@@ -112,7 +112,12 @@ export class YoutubeJs {
type: "video",
title: info.basic_info.title,
videoId: info.basic_info.id,
videoThumbnails: [],
videoThumbnails: [{
quality: "medium",
url: `https://i.ytimg.com/vi/${info.basic_info.id}/mqdefault.jpg`,
width: 320,
height: 180
}],
storyboards: [],
description: "",
published: 0,