mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 03:18:19 -07:00
AutoOrganize: Differentiate server events
This commit is contained in:
parent
30a8d63a16
commit
ed2f72f2a5
@ -325,7 +325,12 @@
|
||||
|
||||
function onServerEvent(e, apiClient, data) {
|
||||
|
||||
if (data) {
|
||||
if (e.type == 'ScheduledTaskEnded') {
|
||||
|
||||
if (data && data.Key == 'AutoOrganize') {
|
||||
reloadItems(page, false);
|
||||
}
|
||||
} else if (e.type == 'AutoOrganize_ItemUpdated' && data) {
|
||||
|
||||
updateItemStatus(page, data);
|
||||
} else {
|
||||
@ -380,7 +385,11 @@
|
||||
|
||||
reloadItems(view, true);
|
||||
|
||||
events.on(serverNotifications, 'AutoOrganizeUpdate', onServerEvent);
|
||||
events.on(serverNotifications, 'AutoOrganize_LogReset', onServerEvent);
|
||||
events.on(serverNotifications, 'AutoOrganize_ItemUpdated', onServerEvent);
|
||||
events.on(serverNotifications, 'AutoOrganize_ItemRemoved', onServerEvent);
|
||||
events.on(serverNotifications, 'AutoOrganize_ItemAdded', onServerEvent);
|
||||
events.on(serverNotifications, 'ScheduledTaskEnded', onServerEvent);
|
||||
|
||||
// on here
|
||||
taskButton({
|
||||
@ -396,7 +405,11 @@
|
||||
|
||||
currentResult = null;
|
||||
|
||||
events.off(serverNotifications, 'AutoOrganizeUpdate', onServerEvent);
|
||||
events.off(serverNotifications, 'AutoOrganize_LogReset', onServerEvent);
|
||||
events.off(serverNotifications, 'AutoOrganize_ItemUpdated', onServerEvent);
|
||||
events.off(serverNotifications, 'AutoOrganize_ItemRemoved', onServerEvent);
|
||||
events.off(serverNotifications, 'AutoOrganize_ItemAdded', onServerEvent);
|
||||
events.off(serverNotifications, 'ScheduledTaskEnded', onServerEvent);
|
||||
|
||||
// off here
|
||||
taskButton({
|
||||
|
Loading…
Reference in New Issue
Block a user