mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update listviews
This commit is contained in:
parent
722a452b91
commit
c87b1304da
10 changed files with 134 additions and 860 deletions
|
@ -1,4 +1,4 @@
|
|||
define([], function () {
|
||||
define(['apphost'], function (appHost) {
|
||||
|
||||
function getDisplayName(item, options) {
|
||||
|
||||
|
@ -49,6 +49,11 @@ define([], function () {
|
|||
}
|
||||
|
||||
function supportsAddingToCollection(item) {
|
||||
|
||||
if (item.Type == 'Timer') {
|
||||
return false;
|
||||
}
|
||||
|
||||
var invalidTypes = ['Person', 'Genre', 'MusicGenre', 'Studio', 'GameGenre', 'BoxSet', 'Playlist', 'UserView', 'CollectionFolder', 'Audio', 'TvChannel', 'Program', 'MusicAlbum', 'Timer'];
|
||||
|
||||
return !item.CollectionType && invalidTypes.indexOf(item.Type) == -1 && item.MediaType != 'Photo';
|
||||
|
@ -92,7 +97,7 @@ define([], function () {
|
|||
|
||||
canEdit: function (user, itemType) {
|
||||
|
||||
if (itemType == "UserRootFolder" || /*itemType == "CollectionFolder" ||*/ itemType == "UserView" || itemType == 'Timer') {
|
||||
if (itemType == "UserRootFolder" || /*itemType == "CollectionFolder" ||*/ itemType == "UserView") {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -111,6 +116,14 @@ define([], function () {
|
|||
}
|
||||
|
||||
return item.SupportsSync;
|
||||
},
|
||||
|
||||
canShare: function (user, item) {
|
||||
|
||||
if (item.Type == 'Timer') {
|
||||
return false;
|
||||
}
|
||||
return user.Policy.EnablePublicSharing && appHost.supports('sharing');
|
||||
}
|
||||
};
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue