From f0464dfa17d146f34849e45097085b891e51ebc8 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 1 Aug 2014 22:34:45 -0400 Subject: improve poster sizing --- .../MediaBrowser.Controller.csproj | 3 ++ .../Playlists/IPlaylistManager.cs | 47 ++++++++++++++++++++++ MediaBrowser.Controller/Playlists/Playlist.cs | 20 +++++++++ .../Playlists/PlaylistCreationOptions.cs | 16 ++++++++ 4 files changed, 86 insertions(+) create mode 100644 MediaBrowser.Controller/Playlists/IPlaylistManager.cs create mode 100644 MediaBrowser.Controller/Playlists/Playlist.cs create mode 100644 MediaBrowser.Controller/Playlists/PlaylistCreationOptions.cs (limited to 'MediaBrowser.Controller') diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj index aee118f9ac..b4b7b3650a 100644 --- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj +++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj @@ -217,6 +217,9 @@ + + + diff --git a/MediaBrowser.Controller/Playlists/IPlaylistManager.cs b/MediaBrowser.Controller/Playlists/IPlaylistManager.cs new file mode 100644 index 0000000000..2923c11c51 --- /dev/null +++ b/MediaBrowser.Controller/Playlists/IPlaylistManager.cs @@ -0,0 +1,47 @@ +using MediaBrowser.Controller.Entities; +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace MediaBrowser.Controller.Playlists +{ + public interface IPlaylistManager + { + /// + /// Gets the playlists. + /// + /// The user identifier. + /// IEnumerable<Playlist>. + IEnumerable GetPlaylists(string userId); + + /// + /// Creates the playlist. + /// + /// The options. + /// Task<Playlist>. + Task CreatePlaylist(PlaylistCreationOptions options); + + /// + /// Adds to playlist. + /// + /// The playlist identifier. + /// The item ids. + /// Task. + Task AddToPlaylist(string playlistId, IEnumerable itemIds); + + /// + /// Removes from playlist. + /// + /// The playlist identifier. + /// The indeces. + /// Task. + Task RemoveFromPlaylist(string playlistId, IEnumerable indeces); + + /// + /// Gets the playlists folder. + /// + /// The user identifier. + /// Folder. + Folder GetPlaylistsFolder(string userId); + + } +} diff --git a/MediaBrowser.Controller/Playlists/Playlist.cs b/MediaBrowser.Controller/Playlists/Playlist.cs new file mode 100644 index 0000000000..e20387eba3 --- /dev/null +++ b/MediaBrowser.Controller/Playlists/Playlist.cs @@ -0,0 +1,20 @@ +using MediaBrowser.Controller.Entities; +using System.Collections.Generic; + +namespace MediaBrowser.Controller.Playlists +{ + public class Playlist : Folder + { + public List ItemIds { get; set; } + + public Playlist() + { + ItemIds = new List(); + } + + public override IEnumerable GetChildren(User user, bool includeLinkedChildren) + { + return base.GetChildren(user, includeLinkedChildren); + } + } +} diff --git a/MediaBrowser.Controller/Playlists/PlaylistCreationOptions.cs b/MediaBrowser.Controller/Playlists/PlaylistCreationOptions.cs new file mode 100644 index 0000000000..a62cbe12e5 --- /dev/null +++ b/MediaBrowser.Controller/Playlists/PlaylistCreationOptions.cs @@ -0,0 +1,16 @@ +using System.Collections.Generic; + +namespace MediaBrowser.Controller.Playlists +{ + public class PlaylistCreationOptions + { + public string Name { get; set; } + + public List ItemIdList { get; set; } + + public PlaylistCreationOptions() + { + ItemIdList = new List(); + } + } +} -- cgit v1.2.3