From ccd51222e65cbc6faa409e4269bc5795bfd0f0ae Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 1 Dec 2013 01:25:19 -0500 Subject: [PATCH] updated live tv endpoints --- .../LiveTv/ILiveTvService.cs | 22 +++++- .../LiveTv/RecurringTimerInfo.cs | 73 ------------------- MediaBrowser.Controller/LiveTv/TimerInfo.cs | 6 +- .../MediaBrowser.Controller.csproj | 2 +- MediaBrowser.Model/LiveTv/TimerInfoDto.cs | 6 +- .../Library/ResolverHelper.cs | 5 +- .../LiveTv/LiveTvManager.cs | 2 +- .../Api/DashboardService.cs | 1 + .../MediaBrowser.WebDashboard.csproj | 7 +- Nuget/MediaBrowser.Common.Internal.nuspec | 4 +- Nuget/MediaBrowser.Common.nuspec | 2 +- Nuget/MediaBrowser.Server.Core.nuspec | 4 +- 12 files changed, 42 insertions(+), 92 deletions(-) delete mode 100644 MediaBrowser.Controller/LiveTv/RecurringTimerInfo.cs diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvService.cs b/MediaBrowser.Controller/LiveTv/ILiveTvService.cs index 2b58d8bc56..1627ad400f 100644 --- a/MediaBrowser.Controller/LiveTv/ILiveTvService.cs +++ b/MediaBrowser.Controller/LiveTv/ILiveTvService.cs @@ -47,6 +47,22 @@ namespace MediaBrowser.Controller.LiveTv /// Task. Task CreateTimerAsync(TimerInfo info, CancellationToken cancellationToken); + /// + /// Creates the series timer asynchronous. + /// + /// The information. + /// The cancellation token. + /// Task. + Task CreateSeriesTimerAsync(SeriesTimerInfo info, CancellationToken cancellationToken); + + /// + /// Updates the series timer asynchronous. + /// + /// The information. + /// The cancellation token. + /// Task. + Task UpdateSeriesTimerAsync(SeriesTimerInfo info, CancellationToken cancellationToken); + /// /// Gets the channel image asynchronous. /// @@ -70,11 +86,11 @@ namespace MediaBrowser.Controller.LiveTv Task> GetTimersAsync(CancellationToken cancellationToken); /// - /// Gets the recurring timers asynchronous. + /// Gets the series timers asynchronous. /// /// The cancellation token. - /// Task{IEnumerable{RecurringTimerInfo}}. - Task> GetRecurringTimersAsync(CancellationToken cancellationToken); + /// Task{IEnumerable{SeriesTimerInfo}}. + Task> GetSeriesTimersAsync(CancellationToken cancellationToken); /// /// Gets the programs asynchronous. diff --git a/MediaBrowser.Controller/LiveTv/RecurringTimerInfo.cs b/MediaBrowser.Controller/LiveTv/RecurringTimerInfo.cs deleted file mode 100644 index 08a8b1f92f..0000000000 --- a/MediaBrowser.Controller/LiveTv/RecurringTimerInfo.cs +++ /dev/null @@ -1,73 +0,0 @@ -using MediaBrowser.Model.LiveTv; -using System; - -namespace MediaBrowser.Controller.LiveTv -{ - public class RecurringTimerInfo - { - /// - /// Id of the recording. - /// - public string Id { get; set; } - - /// - /// ChannelId of the recording. - /// - public string ChannelId { get; set; } - - /// - /// ChannelName of the recording. - /// - public string ChannelName { get; set; } - - /// - /// Gets or sets the program identifier. - /// - /// The program identifier. - public string ProgramId { get; set; } - - /// - /// Name of the recording. - /// - public string Name { get; set; } - - /// - /// Description of the recording. - /// - public string Description { get; set; } - - /// - /// The start date of the recording, in UTC. - /// - public DateTime StartDate { get; set; } - - /// - /// The end date of the recording, in UTC. - /// - public DateTime EndDate { get; set; } - - /// - /// Gets or sets the status. - /// - /// The status. - public RecordingStatus Status { get; set; } - - /// - /// Gets or sets the pre padding seconds. - /// - /// The pre padding seconds. - public int PrePaddingSeconds { get; set; } - - /// - /// Gets or sets the post padding seconds. - /// - /// The post padding seconds. - public int PostPaddingSeconds { get; set; } - - /// - /// Gets or sets the type of the recurrence. - /// - /// The type of the recurrence. - public RecurrenceType RecurrenceType { get; set; } - } -} diff --git a/MediaBrowser.Controller/LiveTv/TimerInfo.cs b/MediaBrowser.Controller/LiveTv/TimerInfo.cs index 0fe7c34f2d..3df0b8ccab 100644 --- a/MediaBrowser.Controller/LiveTv/TimerInfo.cs +++ b/MediaBrowser.Controller/LiveTv/TimerInfo.cs @@ -11,10 +11,10 @@ namespace MediaBrowser.Controller.LiveTv public string Id { get; set; } /// - /// Gets or sets the recurring timer identifier. + /// Gets or sets the series timer identifier. /// - /// The recurring timer identifier. - public string RecurringTimerId { get; set; } + /// The series timer identifier. + public string SeriesTimerId { get; set; } /// /// ChannelId of the recording. diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj index ec0439c2c7..a309d815c3 100644 --- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj +++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj @@ -110,7 +110,7 @@ - + diff --git a/MediaBrowser.Model/LiveTv/TimerInfoDto.cs b/MediaBrowser.Model/LiveTv/TimerInfoDto.cs index f7d63e9687..59a320bfda 100644 --- a/MediaBrowser.Model/LiveTv/TimerInfoDto.cs +++ b/MediaBrowser.Model/LiveTv/TimerInfoDto.cs @@ -58,10 +58,10 @@ namespace MediaBrowser.Model.LiveTv public RecordingStatus Status { get; set; } /// - /// Gets or sets the recurring timer identifier. + /// Gets or sets the series timer identifier. /// - /// The recurring timer identifier. - public string RecurringTimerId { get; set; } + /// The series timer identifier. + public string SeriesTimerId { get; set; } /// /// Gets or sets the pre padding seconds. diff --git a/MediaBrowser.Server.Implementations/Library/ResolverHelper.cs b/MediaBrowser.Server.Implementations/Library/ResolverHelper.cs index 620bcaee4a..e32fcd627b 100644 --- a/MediaBrowser.Server.Implementations/Library/ResolverHelper.cs +++ b/MediaBrowser.Server.Implementations/Library/ResolverHelper.cs @@ -1,11 +1,11 @@ using MediaBrowser.Common.Extensions; using MediaBrowser.Common.IO; using MediaBrowser.Controller.Entities; -using MediaBrowser.Controller.IO; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Resolvers; using System; using System.IO; +using System.Linq; using System.Text.RegularExpressions; namespace MediaBrowser.Server.Implementations.Library @@ -48,7 +48,8 @@ namespace MediaBrowser.Server.Implementations.Library // Make sure the item has a name EnsureName(item); - item.DontFetchMeta = item.Path.IndexOf("[dontfetchmeta]", StringComparison.OrdinalIgnoreCase) != -1; + item.DontFetchMeta = item.Path.IndexOf("[dontfetchmeta]", StringComparison.OrdinalIgnoreCase) != -1 || + item.Parents.Any(i => i.DontFetchMeta); // Make sure DateCreated and DateModified have values EntityResolutionHelper.EnsureDates(fileSystem, item, args, true); diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs index ea8ea45b69..261c915cb2 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs @@ -514,7 +514,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv ExternalId = info.Id, ChannelId = GetInternalChannelId(service.Name, info.ChannelId, info.ChannelName).ToString("N"), Status = info.Status, - RecurringTimerId = info.RecurringTimerId, + SeriesTimerId = info.SeriesTimerId, PrePaddingSeconds = info.PrePaddingSeconds, PostPaddingSeconds = info.PostPaddingSeconds }; diff --git a/MediaBrowser.WebDashboard/Api/DashboardService.cs b/MediaBrowser.WebDashboard/Api/DashboardService.cs index 9076777a5b..17508b2bdc 100644 --- a/MediaBrowser.WebDashboard/Api/DashboardService.cs +++ b/MediaBrowser.WebDashboard/Api/DashboardService.cs @@ -482,6 +482,7 @@ namespace MediaBrowser.WebDashboard.Api "livetvchannel.js", "livetvchannels.js", "livetvguide.js", + "livetvrecording.js", "livetvrecordings.js", "livetvtimer.js", "livetvtimers.js", diff --git a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj index d36413fc2b..e9a70ad973 100644 --- a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj +++ b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj @@ -92,6 +92,9 @@ PreserveNewest + + PreserveNewest + PreserveNewest @@ -353,6 +356,9 @@ PreserveNewest + + PreserveNewest + PreserveNewest @@ -1214,7 +1220,6 @@ - diff --git a/Nuget/MediaBrowser.Common.Internal.nuspec b/Nuget/MediaBrowser.Common.Internal.nuspec index 150b081dc4..946ec617bd 100644 --- a/Nuget/MediaBrowser.Common.Internal.nuspec +++ b/Nuget/MediaBrowser.Common.Internal.nuspec @@ -2,7 +2,7 @@ MediaBrowser.Common.Internal - 3.0.255 + 3.0.256 MediaBrowser.Common.Internal Luke ebr,Luke,scottisafool @@ -12,7 +12,7 @@ Contains common components shared by Media Browser Theater and Media Browser Server. Not intended for plugin developer consumption. Copyright © Media Browser 2013 - + diff --git a/Nuget/MediaBrowser.Common.nuspec b/Nuget/MediaBrowser.Common.nuspec index c28fa7922b..04ac3559c0 100644 --- a/Nuget/MediaBrowser.Common.nuspec +++ b/Nuget/MediaBrowser.Common.nuspec @@ -2,7 +2,7 @@ MediaBrowser.Common - 3.0.255 + 3.0.256 MediaBrowser.Common Media Browser Team ebr,Luke,scottisafool diff --git a/Nuget/MediaBrowser.Server.Core.nuspec b/Nuget/MediaBrowser.Server.Core.nuspec index 32f1da5365..d813a00ace 100644 --- a/Nuget/MediaBrowser.Server.Core.nuspec +++ b/Nuget/MediaBrowser.Server.Core.nuspec @@ -2,7 +2,7 @@ MediaBrowser.Server.Core - 3.0.255 + 3.0.256 Media Browser.Server.Core Media Browser Team ebr,Luke,scottisafool @@ -12,7 +12,7 @@ Contains core components required to build plugins for Media Browser Server. Copyright © Media Browser 2013 - +