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

sync updates

This commit is contained in:
Luke Pulverenti 2015-02-04 14:13:00 -05:00
parent c47d52a8b7
commit 6e731da12a
3 changed files with 20 additions and 1 deletions

View file

@ -93,7 +93,10 @@
else if (job.Status == 'Queued') {
background = 'rgba(51, 136, 204, ' + opacity + ')';
}
else if (job.Status == 'InProgress') {
else if (job.Status == 'Transferring') {
background = 'rgba(72, 0, 255, ' + opacity + ')';
}
else if (job.Status == 'Converting') {
background = 'rgba(72, 0, 255, ' + opacity + ')';
}
@ -268,6 +271,18 @@
});
}
function onWebSocketMessage(e, msg) {
var page = $.mobile.activePage;
if (msg.MessageType == "SyncJobCreated") {
reloadData(page);
}
else if (msg.MessageType == "SyncJobCancelled") {
reloadData(page);
}
}
$(document).on('pageshow', ".syncActivityPage", function () {
var page = this;
@ -290,6 +305,7 @@
taskKey: 'SyncPrepare'
});
$(ApiClient).on("websocketmessage.syncactivity", onWebSocketMessage);
}).on('pagehide', ".syncActivityPage", function () {
@ -300,6 +316,7 @@
mode: 'off'
});
$(ApiClient).off(".syncactivity");
});
})();