Fix web app views when using new backend
This commit is contained in:
1 parent
51fa4c0540
commit
93d660e978
11 files changed
+45
-4
No files matched your search
@@ -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) {
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user