mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
trim loaded sync scripts
This commit is contained in:
parent
f220653d1b
commit
c49de6a93e
6 changed files with 124 additions and 121 deletions
|
@ -809,7 +809,7 @@
|
|||
commands.push('refresh');
|
||||
}
|
||||
|
||||
if (SyncManager.isAvailable(item, user)) {
|
||||
if (LibraryBrowser.enableSync(item, user)) {
|
||||
commands.push('sync');
|
||||
}
|
||||
|
||||
|
@ -1581,6 +1581,18 @@
|
|||
return !item.CollectionType && invalidTypes.indexOf(item.Type) == -1 && item.MediaType != 'Photo';
|
||||
},
|
||||
|
||||
enableSync: function(item, user) {
|
||||
if (AppInfo.isNativeApp && !Dashboard.capabilities().SupportsSync) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (user && !user.Policy.EnableSync) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return item.SupportsSync;
|
||||
},
|
||||
|
||||
getItemCommands: function (item, options) {
|
||||
|
||||
var itemCommands = [];
|
||||
|
@ -1633,7 +1645,7 @@
|
|||
itemCommands.push('delete');
|
||||
}
|
||||
|
||||
if (SyncManager.isAvailable(item)) {
|
||||
if (LibraryBrowser.enableSync(item)) {
|
||||
itemCommands.push('sync');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue