mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Clean autobackdrops
This commit is contained in:
parent
0fa74f34d5
commit
fb6766c832
1 changed files with 4 additions and 3 deletions
|
@ -1,16 +1,18 @@
|
||||||
define(["backdrop", "userSettings", "libraryMenu"], function (backdrop, userSettings, libraryMenu) {
|
define(["backdrop", "userSettings", "libraryMenu"], function (backdrop, userSettings, libraryMenu) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
var cache = {};
|
||||||
|
|
||||||
function enabled() {
|
function enabled() {
|
||||||
return userSettings.enableBackdrops();
|
return userSettings.enableBackdrops();
|
||||||
}
|
}
|
||||||
|
|
||||||
function getBackdropItemIds(apiClient, userId, types, parentId) {
|
function getBackdropItemIds(apiClient, userId, types, parentId) {
|
||||||
var key = "backdrops2_" + userId + (types || "") + (parentId || "");
|
var key = `backdrops2_${userId + (types || "") + (parentId || "")}`;
|
||||||
var data = cache[key];
|
var data = cache[key];
|
||||||
|
|
||||||
if (data) {
|
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);
|
data = JSON.parse(data);
|
||||||
return Promise.resolve(data);
|
return Promise.resolve(data);
|
||||||
}
|
}
|
||||||
|
@ -54,7 +56,6 @@ define(["backdrop", "userSettings", "libraryMenu"], function (backdrop, userSett
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var cache = {};
|
|
||||||
pageClassOn("pageshow", "page", function () {
|
pageClassOn("pageshow", "page", function () {
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue