mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update card layouts
This commit is contained in:
parent
99ae92bad7
commit
3a7fbb7777
14 changed files with 155 additions and 58 deletions
46
dashboard-ui/bower_components/emby-apiclient/sync/localsync.js
vendored
Normal file
46
dashboard-ui/bower_components/emby-apiclient/sync/localsync.js
vendored
Normal file
|
@ -0,0 +1,46 @@
|
|||
define(['appSettings', 'connectionManager'], function (appSettings, connectionManager) {
|
||||
'use strict';
|
||||
|
||||
var syncPromise;
|
||||
|
||||
return {
|
||||
|
||||
sync: function (options) {
|
||||
|
||||
if (syncPromise) {
|
||||
return syncPromise;
|
||||
}
|
||||
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
||||
require(['multiserversync'], function (MultiServerSync) {
|
||||
|
||||
options = options || {};
|
||||
|
||||
options.cameraUploadServers = appSettings.cameraUploadServers();
|
||||
|
||||
syncPromise = new MultiServerSync(connectionManager).sync(options).then(function () {
|
||||
|
||||
syncPromise = null;
|
||||
resolve();
|
||||
|
||||
}, function () {
|
||||
|
||||
syncPromise = null;
|
||||
reject();
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
getSyncStatus: function () {
|
||||
|
||||
if (syncPromise != null) {
|
||||
return 'Syncing';
|
||||
}
|
||||
return 'Idle';
|
||||
}
|
||||
};
|
||||
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue