update listviews
This commit is contained in:
parent
b5734e3e93
commit
722a452b91
19 changed files with 277 additions and 155 deletions
|
@ -67,6 +67,50 @@ define([], function () {
|
|||
return {
|
||||
getDisplayName: getDisplayName,
|
||||
supportsAddingToCollection: supportsAddingToCollection,
|
||||
supportsAddingToPlaylist: supportsAddingToPlaylist
|
||||
supportsAddingToPlaylist: supportsAddingToPlaylist,
|
||||
|
||||
canIdentify: function (user, itemType) {
|
||||
|
||||
if (itemType == "Movie" ||
|
||||
itemType == "Trailer" ||
|
||||
itemType == "Series" ||
|
||||
itemType == "Game" ||
|
||||
itemType == "BoxSet" ||
|
||||
itemType == "Person" ||
|
||||
itemType == "Book" ||
|
||||
itemType == "MusicAlbum" ||
|
||||
itemType == "MusicArtist") {
|
||||
|
||||
if (user.Policy.IsAdministrator) {
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
|
||||
canEdit: function (user, itemType) {
|
||||
|
||||
if (itemType == "UserRootFolder" || /*itemType == "CollectionFolder" ||*/ itemType == "UserView" || itemType == 'Timer') {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (user.Policy.IsAdministrator) {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
|
||||
canSync: function (user, item) {
|
||||
|
||||
if (user && !user.Policy.EnableSync) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return item.SupportsSync;
|
||||
}
|
||||
};
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue