diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-12-02 16:46:22 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-12-02 16:46:22 -0500 |
| commit | 245e92c9cc6f97e139e04548c94184c65712d3f0 (patch) | |
| tree | cd957fa794a8e69871d25ea00748c1445ef58d76 /MediaBrowser.Controller | |
| parent | cd279d98e0574c396c0a35984e46658151e54fc0 (diff) | |
updated nuget
Diffstat (limited to 'MediaBrowser.Controller')
| -rw-r--r-- | MediaBrowser.Controller/Entities/Audio/MusicArtist.cs | 4 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Entities/Audio/MusicGenre.cs | 4 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Entities/GameGenre.cs | 4 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Entities/Genre.cs | 4 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Entities/IItemByName.cs | 25 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Entities/Person.cs | 8 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Entities/Studio.cs | 4 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Entities/Year.cs | 4 | ||||
| -rw-r--r-- | MediaBrowser.Controller/LiveTv/Channel.cs | 4 | ||||
| -rw-r--r-- | MediaBrowser.Controller/LiveTv/ILiveTvService.cs | 10 | ||||
| -rw-r--r-- | MediaBrowser.Controller/LiveTv/ImageResponseInfo.cs | 19 | ||||
| -rw-r--r-- | MediaBrowser.Controller/LiveTv/ProgramInfo.cs | 12 | ||||
| -rw-r--r-- | MediaBrowser.Controller/LiveTv/RecordingInfo.cs | 29 | ||||
| -rw-r--r-- | MediaBrowser.Controller/LiveTv/SeriesTimerInfo.cs | 6 | ||||
| -rw-r--r-- | MediaBrowser.Controller/MediaBrowser.Controller.csproj | 1 |
15 files changed, 110 insertions, 28 deletions
diff --git a/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs b/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs index 8ebfe17e41..d5572b9a5e 100644 --- a/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs +++ b/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs @@ -14,7 +14,7 @@ namespace MediaBrowser.Controller.Entities.Audio public class MusicArtist : Folder, IItemByName, IHasMusicGenres, IHasDualAccess { [IgnoreDataMember] - public Dictionary<Guid, ItemByNameCounts> UserItemCounts { get; set; } + public List<ItemByNameCounts> UserItemCountList { get; set; } public bool IsAccessedByName { get; set; } @@ -69,7 +69,7 @@ namespace MediaBrowser.Controller.Entities.Audio public MusicArtist() { - UserItemCounts = new Dictionary<Guid, ItemByNameCounts>(); + UserItemCountList = new List<ItemByNameCounts>(); } /// <summary> diff --git a/MediaBrowser.Controller/Entities/Audio/MusicGenre.cs b/MediaBrowser.Controller/Entities/Audio/MusicGenre.cs index ec2995fb2f..b54e14f2da 100644 --- a/MediaBrowser.Controller/Entities/Audio/MusicGenre.cs +++ b/MediaBrowser.Controller/Entities/Audio/MusicGenre.cs @@ -12,7 +12,7 @@ namespace MediaBrowser.Controller.Entities.Audio { public MusicGenre() { - UserItemCounts = new Dictionary<Guid, ItemByNameCounts>(); + UserItemCountList = new List<ItemByNameCounts>(); } /// <summary> @@ -25,6 +25,6 @@ namespace MediaBrowser.Controller.Entities.Audio } [IgnoreDataMember] - public Dictionary<Guid, ItemByNameCounts> UserItemCounts { get; set; } + public List<ItemByNameCounts> UserItemCountList { get; set; } } } diff --git a/MediaBrowser.Controller/Entities/GameGenre.cs b/MediaBrowser.Controller/Entities/GameGenre.cs index 0c877782e6..ffe62ba03f 100644 --- a/MediaBrowser.Controller/Entities/GameGenre.cs +++ b/MediaBrowser.Controller/Entities/GameGenre.cs @@ -9,7 +9,7 @@ namespace MediaBrowser.Controller.Entities { public GameGenre() { - UserItemCounts = new Dictionary<Guid, ItemByNameCounts>(); + UserItemCountList = new List<ItemByNameCounts>(); } /// <summary> @@ -22,6 +22,6 @@ namespace MediaBrowser.Controller.Entities } [IgnoreDataMember] - public Dictionary<Guid, ItemByNameCounts> UserItemCounts { get; set; } + public List<ItemByNameCounts> UserItemCountList { get; set; } } } diff --git a/MediaBrowser.Controller/Entities/Genre.cs b/MediaBrowser.Controller/Entities/Genre.cs index 6c49501826..0fa49639bf 100644 --- a/MediaBrowser.Controller/Entities/Genre.cs +++ b/MediaBrowser.Controller/Entities/Genre.cs @@ -12,7 +12,7 @@ namespace MediaBrowser.Controller.Entities { public Genre() { - UserItemCounts = new Dictionary<Guid, ItemByNameCounts>(); + UserItemCountList = new List<ItemByNameCounts>(); } /// <summary> @@ -25,6 +25,6 @@ namespace MediaBrowser.Controller.Entities } [IgnoreDataMember] - public Dictionary<Guid, ItemByNameCounts> UserItemCounts { get; set; } + public List<ItemByNameCounts> UserItemCountList { get; set; } } } diff --git a/MediaBrowser.Controller/Entities/IItemByName.cs b/MediaBrowser.Controller/Entities/IItemByName.cs index 1cb375374d..1e83c7466e 100644 --- a/MediaBrowser.Controller/Entities/IItemByName.cs +++ b/MediaBrowser.Controller/Entities/IItemByName.cs @@ -1,6 +1,7 @@ using MediaBrowser.Model.Dto; using System; using System.Collections.Generic; +using System.Linq; namespace MediaBrowser.Controller.Entities { @@ -9,7 +10,7 @@ namespace MediaBrowser.Controller.Entities /// </summary> public interface IItemByName { - Dictionary<Guid, ItemByNameCounts> UserItemCounts { get; set; } + List<ItemByNameCounts> UserItemCountList { get; set; } } public interface IHasDualAccess : IItemByName @@ -17,23 +18,29 @@ namespace MediaBrowser.Controller.Entities bool IsAccessedByName { get; } } - public static class IItemByNameExtensions + public static class ItemByNameExtensions { - public static ItemByNameCounts GetItemByNameCounts(this IItemByName item, User user) + public static ItemByNameCounts GetItemByNameCounts(this IItemByName item, Guid userId) { - if (user == null) + if (userId == Guid.Empty) { - throw new ArgumentNullException("user"); + throw new ArgumentNullException("userId"); } - ItemByNameCounts counts; + return item.UserItemCountList.FirstOrDefault(i => i.UserId == userId); + } + + public static void SetItemByNameCounts(this IItemByName item, Guid userId, ItemByNameCounts counts) + { + var current = item.UserItemCountList.FirstOrDefault(i => i.UserId == userId); - if (item.UserItemCounts.TryGetValue(user.Id, out counts)) + if (current != null) { - return counts; + item.UserItemCountList.Remove(current); } - return null; + counts.UserId = userId; + item.UserItemCountList.Add(counts); } } } diff --git a/MediaBrowser.Controller/Entities/Person.cs b/MediaBrowser.Controller/Entities/Person.cs index 17b9d77413..243861da76 100644 --- a/MediaBrowser.Controller/Entities/Person.cs +++ b/MediaBrowser.Controller/Entities/Person.cs @@ -1,7 +1,7 @@ -using System.Runtime.Serialization; -using MediaBrowser.Model.Dto; +using MediaBrowser.Model.Dto; using System; using System.Collections.Generic; +using System.Runtime.Serialization; namespace MediaBrowser.Controller.Entities { @@ -12,11 +12,11 @@ namespace MediaBrowser.Controller.Entities { public Person() { - UserItemCounts = new Dictionary<Guid, ItemByNameCounts>(); + UserItemCountList = new List<ItemByNameCounts>(); } [IgnoreDataMember] - public Dictionary<Guid, ItemByNameCounts> UserItemCounts { get; set; } + public List<ItemByNameCounts> UserItemCountList { get; set; } /// <summary> /// Gets the user data key. diff --git a/MediaBrowser.Controller/Entities/Studio.cs b/MediaBrowser.Controller/Entities/Studio.cs index bbe96a88b9..7bc17549f3 100644 --- a/MediaBrowser.Controller/Entities/Studio.cs +++ b/MediaBrowser.Controller/Entities/Studio.cs @@ -12,7 +12,7 @@ namespace MediaBrowser.Controller.Entities { public Studio() { - UserItemCounts = new Dictionary<Guid, ItemByNameCounts>(); + UserItemCountList = new List<ItemByNameCounts>(); } /// <summary> @@ -25,6 +25,6 @@ namespace MediaBrowser.Controller.Entities } [IgnoreDataMember] - public Dictionary<Guid, ItemByNameCounts> UserItemCounts { get; set; } + public List<ItemByNameCounts> UserItemCountList { get; set; } } } diff --git a/MediaBrowser.Controller/Entities/Year.cs b/MediaBrowser.Controller/Entities/Year.cs index d0f4577183..cd50a1c60c 100644 --- a/MediaBrowser.Controller/Entities/Year.cs +++ b/MediaBrowser.Controller/Entities/Year.cs @@ -12,11 +12,11 @@ namespace MediaBrowser.Controller.Entities { public Year() { - UserItemCounts = new Dictionary<Guid, ItemByNameCounts>(); + UserItemCountList = new List<ItemByNameCounts>(); } [IgnoreDataMember] - public Dictionary<Guid, ItemByNameCounts> UserItemCounts { get; set; } + public List<ItemByNameCounts> UserItemCountList { get; set; } /// <summary> /// Gets the user data key. diff --git a/MediaBrowser.Controller/LiveTv/Channel.cs b/MediaBrowser.Controller/LiveTv/Channel.cs index 94d76971c3..8097cea1de 100644 --- a/MediaBrowser.Controller/LiveTv/Channel.cs +++ b/MediaBrowser.Controller/LiveTv/Channel.cs @@ -11,7 +11,7 @@ namespace MediaBrowser.Controller.LiveTv { public Channel() { - UserItemCounts = new Dictionary<Guid, ItemByNameCounts>(); + UserItemCountList = new List<ItemByNameCounts>(); } /// <summary> @@ -24,7 +24,7 @@ namespace MediaBrowser.Controller.LiveTv } [IgnoreDataMember] - public Dictionary<Guid, ItemByNameCounts> UserItemCounts { get; set; } + public List<ItemByNameCounts> UserItemCountList { get; set; } /// <summary> /// Gets or sets the number. diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvService.cs b/MediaBrowser.Controller/LiveTv/ILiveTvService.cs index 1627ad400f..a6c60d468d 100644 --- a/MediaBrowser.Controller/LiveTv/ILiveTvService.cs +++ b/MediaBrowser.Controller/LiveTv/ILiveTvService.cs @@ -69,9 +69,17 @@ namespace MediaBrowser.Controller.LiveTv /// <param name="channelId">The channel identifier.</param> /// <param name="cancellationToken">The cancellation token.</param> /// <returns>Task{Stream}.</returns> - Task<HttpResponseInfo> GetChannelImageAsync(string channelId, CancellationToken cancellationToken); + Task<ImageResponseInfo> GetChannelImageAsync(string channelId, CancellationToken cancellationToken); /// <summary> + /// Gets the program image asynchronous. + /// </summary> + /// <param name="programId">The program identifier.</param> + /// <param name="cancellationToken">The cancellation token.</param> + /// <returns>Task{ImageResponseInfo}.</returns> + Task<ImageResponseInfo> GetProgramImageAsync(string programId, CancellationToken cancellationToken); + + /// <summary> /// Gets the recordings asynchronous. /// </summary> /// <param name="cancellationToken">The cancellation token.</param> diff --git a/MediaBrowser.Controller/LiveTv/ImageResponseInfo.cs b/MediaBrowser.Controller/LiveTv/ImageResponseInfo.cs new file mode 100644 index 0000000000..d454a1ef8d --- /dev/null +++ b/MediaBrowser.Controller/LiveTv/ImageResponseInfo.cs @@ -0,0 +1,19 @@ +using System.IO; + +namespace MediaBrowser.Controller.LiveTv +{ + public class ImageResponseInfo + { + /// <summary> + /// Gets or sets the stream. + /// </summary> + /// <value>The stream.</value> + public Stream Stream { get; set; } + + /// <summary> + /// Gets or sets the type of the MIME. + /// </summary> + /// <value>The type of the MIME.</value> + public string MimeType { get; set; } + } +} diff --git a/MediaBrowser.Controller/LiveTv/ProgramInfo.cs b/MediaBrowser.Controller/LiveTv/ProgramInfo.cs index 58a15be3e5..cf5cdb94c9 100644 --- a/MediaBrowser.Controller/LiveTv/ProgramInfo.cs +++ b/MediaBrowser.Controller/LiveTv/ProgramInfo.cs @@ -77,6 +77,18 @@ namespace MediaBrowser.Controller.LiveTv /// </summary> /// <value>The community rating.</value> public float? CommunityRating { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether this instance is repeat. + /// </summary> + /// <value><c>true</c> if this instance is repeat; otherwise, <c>false</c>.</value> + public bool IsRepeat { get; set; } + + /// <summary> + /// Gets or sets the episode title. + /// </summary> + /// <value>The episode title.</value> + public string EpisodeTitle { get; set; } public ProgramInfo() { diff --git a/MediaBrowser.Controller/LiveTv/RecordingInfo.cs b/MediaBrowser.Controller/LiveTv/RecordingInfo.cs index 88d093f645..65e977d75e 100644 --- a/MediaBrowser.Controller/LiveTv/RecordingInfo.cs +++ b/MediaBrowser.Controller/LiveTv/RecordingInfo.cs @@ -1,5 +1,6 @@ using MediaBrowser.Model.LiveTv; using System; +using System.Collections.Generic; namespace MediaBrowser.Controller.LiveTv { @@ -26,6 +27,12 @@ namespace MediaBrowser.Controller.LiveTv public string Name { get; set; } /// <summary> + /// Gets or sets the path. + /// </summary> + /// <value>The path.</value> + public string Path { get; set; } + + /// <summary> /// Description of the recording. /// </summary> public string Description { get; set; } @@ -51,5 +58,27 @@ namespace MediaBrowser.Controller.LiveTv /// </summary> /// <value>The status.</value> public RecordingStatus Status { get; set; } + + /// <summary> + /// Genre of the program. + /// </summary> + public List<string> Genres { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether this instance is repeat. + /// </summary> + /// <value><c>true</c> if this instance is repeat; otherwise, <c>false</c>.</value> + public bool IsRepeat { get; set; } + + /// <summary> + /// Gets or sets the episode title. + /// </summary> + /// <value>The episode title.</value> + public string EpisodeTitle { get; set; } + + public RecordingInfo() + { + Genres = new List<string>(); + } } } diff --git a/MediaBrowser.Controller/LiveTv/SeriesTimerInfo.cs b/MediaBrowser.Controller/LiveTv/SeriesTimerInfo.cs index 178fcff82e..44594882cd 100644 --- a/MediaBrowser.Controller/LiveTv/SeriesTimerInfo.cs +++ b/MediaBrowser.Controller/LiveTv/SeriesTimerInfo.cs @@ -71,6 +71,12 @@ namespace MediaBrowser.Controller.LiveTv /// <value>The days.</value> public List<DayOfWeek> Days { get; set; } + /// <summary> + /// Gets or sets the priority. + /// </summary> + /// <value>The priority.</value> + public int Priority { get; set; } + public SeriesTimerInfo() { Days = new List<DayOfWeek>(); diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj index 64d5c52260..2beb3588ed 100644 --- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj +++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj @@ -110,6 +110,7 @@ <Compile Include="LiveTv\ChannelInfo.cs" /> <Compile Include="LiveTv\ILiveTvManager.cs" /> <Compile Include="LiveTv\ILiveTvService.cs" /> + <Compile Include="LiveTv\ImageResponseInfo.cs" /> <Compile Include="LiveTv\ProgramInfo.cs" /> <Compile Include="LiveTv\RecordingInfo.cs" /> <Compile Include="LiveTv\SeriesTimerInfo.cs" /> |
