1
0
Fork 0
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:
Luke Pulverenti 2016-12-01 12:38:13 -05:00
parent 99ae92bad7
commit 3a7fbb7777
14 changed files with 155 additions and 58 deletions

View 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';
}
};
});