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

update storage

This commit is contained in:
Luke Pulverenti 2016-08-14 00:30:59 -04:00
parent c50d82e592
commit 781f63d9ac
7 changed files with 94 additions and 64 deletions

View file

@ -1295,6 +1295,17 @@ var AppInfo = {};
return layoutManager;
}
function getAppStorage(basePath) {
try {
localStorage.setItem('_test', '0');
localStorage.removeItem('_test');
return basePath + "/appstorage-localstorage";
} catch (e) {
return basePath + "/appstorage-memory";
}
}
function initRequire() {
var urlArgs = "v=" + (window.dashboardVersion || new Date().getDate());
@ -1439,7 +1450,7 @@ var AppInfo = {};
if (Dashboard.isRunningInCordova() && window.MainActivity) {
paths.appStorage = "cordova/android/appstorage";
} else {
paths.appStorage = apiClientBowerPath + "/appstorage";
paths.appStorage = getAppStorage(apiClientBowerPath);
}
paths.syncDialog = "scripts/sync";
@ -2968,4 +2979,5 @@ pageClassOn('viewshow', "page", function () {
}
Dashboard.ensureHeader(page);
});
});