aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Playlists
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2024-03-26 23:45:14 +0100
committerShadowghost <Ghost_of_Stone@web.de>2024-03-26 23:45:14 +0100
commit56c432a8439e1b75c15729bfdb19d41d34e3124d (patch)
tree00fa37a452a34363922f1b10ccefbec7f55ef81d /MediaBrowser.Controller/Playlists
parentf1dc1610a28fdb2dec4241d233503b6e11020546 (diff)
Apply review suggestions
Diffstat (limited to 'MediaBrowser.Controller/Playlists')
-rw-r--r--MediaBrowser.Controller/Playlists/IPlaylistManager.cs4
-rw-r--r--MediaBrowser.Controller/Playlists/Playlist.cs10
2 files changed, 7 insertions, 7 deletions
diff --git a/MediaBrowser.Controller/Playlists/IPlaylistManager.cs b/MediaBrowser.Controller/Playlists/IPlaylistManager.cs
index aaca1cc49..238923d29 100644
--- a/MediaBrowser.Controller/Playlists/IPlaylistManager.cs
+++ b/MediaBrowser.Controller/Playlists/IPlaylistManager.cs
@@ -41,7 +41,7 @@ namespace MediaBrowser.Controller.Playlists
/// <param name="userId">The user identifier.</param>
/// <param name="share">The share.</param>
/// <returns>Task.</returns>
- Task AddToShares(Guid playlistId, Guid userId, Share share);
+ Task AddToShares(Guid playlistId, Guid userId, UserPermissions share);
/// <summary>
/// Rremoves a share from the playlist.
@@ -50,7 +50,7 @@ namespace MediaBrowser.Controller.Playlists
/// <param name="userId">The user identifier.</param>
/// <param name="share">The share.</param>
/// <returns>Task.</returns>
- Task RemoveFromShares(Guid playlistId, Guid userId, Share share);
+ Task RemoveFromShares(Guid playlistId, Guid userId, UserPermissions share);
/// <summary>
/// Creates the playlist.
diff --git a/MediaBrowser.Controller/Playlists/Playlist.cs b/MediaBrowser.Controller/Playlists/Playlist.cs
index 9a08a4ce3..dfd9b8330 100644
--- a/MediaBrowser.Controller/Playlists/Playlist.cs
+++ b/MediaBrowser.Controller/Playlists/Playlist.cs
@@ -32,7 +32,7 @@ namespace MediaBrowser.Controller.Playlists
public Playlist()
{
- Shares = Array.Empty<Share>();
+ Shares = [];
OpenAccess = false;
}
@@ -40,7 +40,7 @@ namespace MediaBrowser.Controller.Playlists
public bool OpenAccess { get; set; }
- public IReadOnlyList<Share> Shares { get; set; }
+ public IReadOnlyList<UserPermissions> Shares { get; set; }
[JsonIgnore]
public bool IsFile => IsPlaylistFile(Path);
@@ -129,7 +129,7 @@ namespace MediaBrowser.Controller.Playlists
protected override List<BaseItem> LoadChildren()
{
// Save a trip to the database
- return new List<BaseItem>();
+ return [];
}
protected override Task ValidateChildrenInternal(IProgress<double> progress, bool recursive, bool refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService, CancellationToken cancellationToken)
@@ -144,7 +144,7 @@ namespace MediaBrowser.Controller.Playlists
protected override IEnumerable<BaseItem> GetNonCachedChildren(IDirectoryService directoryService)
{
- return new List<BaseItem>();
+ return [];
}
public override IEnumerable<BaseItem> GetRecursiveChildren(User user, InternalItemsQuery query)
@@ -166,7 +166,7 @@ namespace MediaBrowser.Controller.Playlists
return base.GetChildren(user, true, query);
}
- public static List<BaseItem> GetPlaylistItems(MediaType playlistMediaType, IEnumerable<BaseItem> inputItems, User user, DtoOptions options)
+ public static IReadOnlyList<BaseItem> GetPlaylistItems(MediaType playlistMediaType, IEnumerable<BaseItem> inputItems, User user, DtoOptions options)
{
if (user is not null)
{