mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update now playing page
This commit is contained in:
parent
9ab9e8b9c8
commit
d61dd06176
11 changed files with 59 additions and 42 deletions
19
dashboard-ui/cordova/ios/backgroundfetch.js
vendored
19
dashboard-ui/cordova/ios/backgroundfetch.js
vendored
|
@ -7,7 +7,7 @@
|
|||
var fetcher = window.BackgroundFetch;
|
||||
|
||||
fetcher.configure(onBackgroundFetch, onBackgroundFetchFailed, {
|
||||
stopOnTerminate: false // <-- false is default
|
||||
stopOnTerminate: true // <-- false is default
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
|||
fetcher.finish(); // <-- N.B. You MUST called #finish so that native-side can signal completion of the background-thread to the os.
|
||||
}
|
||||
|
||||
function startSync(uploadPhotos) {
|
||||
function startSync(reportToFetcher) {
|
||||
lastStart = new Date().getTime();
|
||||
|
||||
require(['localsync'], function () {
|
||||
|
@ -37,11 +37,11 @@
|
|||
return;
|
||||
}
|
||||
|
||||
var syncOptions = {
|
||||
uploadPhotos: uploadPhotos
|
||||
};
|
||||
var promise = LocalSync.sync();
|
||||
|
||||
LocalSync.sync(syncOptions).done(onSyncFinish).fail(onSyncFail);
|
||||
if (reportToFetcher) {
|
||||
promise.done(onSyncFinish).fail(onSyncFail);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -61,12 +61,15 @@
|
|||
|
||||
setInterval(function () {
|
||||
|
||||
//startSync(true);
|
||||
startSync();
|
||||
|
||||
}, syncInterval);
|
||||
|
||||
if (lastStart > 0 && (now - lastStart) >= syncInterval) {
|
||||
//startSync(true);
|
||||
|
||||
setTimeout(function () {
|
||||
startSync();
|
||||
}, 3000);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue