1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Clean autobackdrops

This commit is contained in:
MrTimscampi 2020-04-06 23:45:50 +02:00
parent 0fa74f34d5
commit fb6766c832

View file

@ -1,16 +1,18 @@
define(["backdrop", "userSettings", "libraryMenu"], function (backdrop, userSettings, libraryMenu) {
"use strict";
var cache = {};
function enabled() {
return userSettings.enableBackdrops();
}
function getBackdropItemIds(apiClient, userId, types, parentId) {
var key = "backdrops2_" + userId + (types || "") + (parentId || "");
var key = `backdrops2_${userId + (types || "") + (parentId || "")}`;
var data = cache[key];
if (data) {
console.debug("Found backdrop id list in cache. Key: " + key);
console.debug(`Found backdrop id list in cache. Key: ${key}`);
data = JSON.parse(data);
return Promise.resolve(data);
}
@ -54,7 +56,6 @@ define(["backdrop", "userSettings", "libraryMenu"], function (backdrop, userSett
}
}
var cache = {};
pageClassOn("pageshow", "page", function () {
var page = this;