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

update sync display

This commit is contained in:
Luke Pulverenti 2016-08-16 14:54:08 -04:00
parent 0d51412424
commit a52b5e24d0
20 changed files with 181 additions and 147 deletions

View file

@ -16,12 +16,12 @@
},
"devDependencies": {},
"ignore": [],
"version": "1.1.75",
"_release": "1.1.75",
"version": "1.1.76",
"_release": "1.1.76",
"_resolution": {
"type": "version",
"tag": "1.1.75",
"commit": "5518536e19fe1efdb8cb149833320017c051e751"
"tag": "1.1.76",
"commit": "1096ffc66e3df8d63e305889dd7fb5b769095082"
},
"_source": "https://github.com/MediaBrowser/Emby.ApiClient.Javascript.git",
"_target": "^1.1.51",

View file

@ -0,0 +1,47 @@
define([], function () {
var myStore = {};
var cache;
var localData;
function updateCache() {
cache.put('data', new Response(JSON.stringify(localData)));
}
myStore.setItem = function (name, value) {
if (localData) {
var changed = localData[name] != value;
if (changed) {
localData[name] = value;
updateCache();
}
}
};
myStore.getItem = function (name) {
if (localData) {
return localData[name];
}
};
myStore.removeItem = function (name) {
if (localData) {
localData[name] = null;
delete localData[name];
updateCache();
}
};
myStore.init = function () {
return caches.open('embydata').then(function (result) {
cache = result;
localData = {};
});
};
return myStore;
});