diff options
Diffstat (limited to 'MediaBrowser.Controller')
| -rw-r--r-- | MediaBrowser.Controller/IServerApplicationPaths.cs | 8 | ||||
| -rw-r--r-- | MediaBrowser.Controller/LiveTv/ILiveTvManager.cs | 56 | ||||
| -rw-r--r-- | MediaBrowser.Controller/LiveTv/ILiveTvService.cs | 11 | ||||
| -rw-r--r-- | MediaBrowser.Controller/LiveTv/ImageResponseInfo.cs | 6 | ||||
| -rw-r--r-- | MediaBrowser.Controller/LiveTv/SeriesTimerInfo.cs | 42 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Providers/BaseItemXmlParser.cs | 108 |
6 files changed, 108 insertions, 123 deletions
diff --git a/MediaBrowser.Controller/IServerApplicationPaths.cs b/MediaBrowser.Controller/IServerApplicationPaths.cs index 57cb7c7dd..f8b78299c 100644 --- a/MediaBrowser.Controller/IServerApplicationPaths.cs +++ b/MediaBrowser.Controller/IServerApplicationPaths.cs @@ -26,7 +26,7 @@ namespace MediaBrowser.Controller /// Gets the path to the Images By Name directory /// </summary> /// <value>The images by name path.</value> - string ItemsByNamePath { get; set; } + string ItemsByNamePath { get; } /// <summary> /// Gets the path to the People directory @@ -51,13 +51,13 @@ namespace MediaBrowser.Controller /// </summary> /// <value>The game genre path.</value> string GameGenrePath { get; } - + /// <summary> /// Gets the artists path. /// </summary> /// <value>The artists path.</value> string ArtistsPath { get; } - + /// <summary> /// Gets the path to the Studio directory /// </summary> @@ -87,7 +87,7 @@ namespace MediaBrowser.Controller /// </summary> /// <value>The media info images path.</value> string MediaInfoImagesPath { get; } - + /// <summary> /// Gets the path to the user configuration directory /// </summary> diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs index b8dfbe05d..9ed7b633d 100644 --- a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs +++ b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs @@ -1,4 +1,5 @@ -using MediaBrowser.Model.LiveTv; +using MediaBrowser.Controller.Entities; +using MediaBrowser.Model.LiveTv; using MediaBrowser.Model.Querying; using System.Collections.Generic; using System.Threading; @@ -54,18 +55,29 @@ namespace MediaBrowser.Controller.LiveTv /// Gets the channels. /// </summary> /// <param name="query">The query.</param> + /// <param name="cancellationToken">The cancellation token.</param> /// <returns>IEnumerable{Channel}.</returns> - QueryResult<ChannelInfoDto> GetChannels(ChannelQuery query); + Task<QueryResult<ChannelInfoDto>> GetChannels(ChannelQuery query, CancellationToken cancellationToken); /// <summary> /// Gets the recording. /// </summary> /// <param name="id">The identifier.</param> + /// <param name="user">The user.</param> /// <param name="cancellationToken">The cancellation token.</param> /// <returns>Task{RecordingInfoDto}.</returns> - Task<RecordingInfoDto> GetRecording(string id, CancellationToken cancellationToken); + Task<RecordingInfoDto> GetRecording(string id, CancellationToken cancellationToken, User user = null); /// <summary> + /// Gets the channel. + /// </summary> + /// <param name="id">The identifier.</param> + /// <param name="cancellationToken">The cancellation token.</param> + /// <param name="user">The user.</param> + /// <returns>Task{RecordingInfoDto}.</returns> + Task<ChannelInfoDto> GetChannel(string id, CancellationToken cancellationToken, User user = null); + + /// <summary> /// Gets the timer. /// </summary> /// <param name="id">The identifier.</param> @@ -74,6 +86,14 @@ namespace MediaBrowser.Controller.LiveTv Task<TimerInfoDto> GetTimer(string id, CancellationToken cancellationToken); /// <summary> + /// Gets the series timer. + /// </summary> + /// <param name="id">The identifier.</param> + /// <param name="cancellationToken">The cancellation token.</param> + /// <returns>Task{TimerInfoDto}.</returns> + Task<SeriesTimerInfoDto> GetSeriesTimer(string id, CancellationToken cancellationToken); + + /// <summary> /// Gets the recordings. /// </summary> /// <param name="query">The query.</param> @@ -90,19 +110,19 @@ namespace MediaBrowser.Controller.LiveTv Task<QueryResult<TimerInfoDto>> GetTimers(TimerQuery query, CancellationToken cancellationToken); /// <summary> - /// Gets the channel. + /// Gets the series timers. /// </summary> - /// <param name="id">The identifier.</param> - /// <returns>Channel.</returns> - Channel GetChannel(string id); - + /// <param name="query">The query.</param> + /// <param name="cancellationToken">The cancellation token.</param> + /// <returns>Task{QueryResult{SeriesTimerInfoDto}}.</returns> + Task<QueryResult<SeriesTimerInfoDto>> GetSeriesTimers(SeriesTimerQuery query, CancellationToken cancellationToken); + /// <summary> /// Gets the channel. /// </summary> /// <param name="id">The identifier.</param> - /// <param name="userId">The user identifier.</param> /// <returns>Channel.</returns> - ChannelInfoDto GetChannelInfoDto(string id, string userId); + Channel GetChannel(string id); /// <summary> /// Gets the programs. @@ -111,5 +131,21 @@ namespace MediaBrowser.Controller.LiveTv /// <param name="cancellationToken">The cancellation token.</param> /// <returns>IEnumerable{ProgramInfo}.</returns> Task<QueryResult<ProgramInfoDto>> GetPrograms(ProgramQuery query, CancellationToken cancellationToken); + + /// <summary> + /// Updates the timer. + /// </summary> + /// <param name="timer">The timer.</param> + /// <param name="cancellationToken">The cancellation token.</param> + /// <returns>Task.</returns> + Task UpdateTimer(TimerInfoDto timer, CancellationToken cancellationToken); + + /// <summary> + /// Updates the timer. + /// </summary> + /// <param name="timer">The timer.</param> + /// <param name="cancellationToken">The cancellation token.</param> + /// <returns>Task.</returns> + Task UpdateSeriesTimer(SeriesTimerInfoDto timer, CancellationToken cancellationToken); } } diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvService.cs b/MediaBrowser.Controller/LiveTv/ILiveTvService.cs index de75ee752..8b1801f9e 100644 --- a/MediaBrowser.Controller/LiveTv/ILiveTvService.cs +++ b/MediaBrowser.Controller/LiveTv/ILiveTvService.cs @@ -1,5 +1,4 @@ -using MediaBrowser.Common.Net; -using System.Collections.Generic; +using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; @@ -56,6 +55,14 @@ namespace MediaBrowser.Controller.LiveTv Task CreateSeriesTimerAsync(SeriesTimerInfo info, CancellationToken cancellationToken); /// <summary> + /// Updates the timer asynchronous. + /// </summary> + /// <param name="info">The information.</param> + /// <param name="cancellationToken">The cancellation token.</param> + /// <returns>Task.</returns> + Task UpdateTimerAsync(TimerInfo info, CancellationToken cancellationToken); + + /// <summary> /// Updates the series timer asynchronous. /// </summary> /// <param name="info">The information.</param> diff --git a/MediaBrowser.Controller/LiveTv/ImageResponseInfo.cs b/MediaBrowser.Controller/LiveTv/ImageResponseInfo.cs index 6b6123e54..d454a1ef8 100644 --- a/MediaBrowser.Controller/LiveTv/ImageResponseInfo.cs +++ b/MediaBrowser.Controller/LiveTv/ImageResponseInfo.cs @@ -15,11 +15,5 @@ namespace MediaBrowser.Controller.LiveTv /// </summary> /// <value>The type of the MIME.</value> public string MimeType { get; set; } - - /// <summary> - /// Gets or sets the image path. - /// </summary> - /// <value>The image path.</value> - public string ImagePath { get; set; } } } diff --git a/MediaBrowser.Controller/LiveTv/SeriesTimerInfo.cs b/MediaBrowser.Controller/LiveTv/SeriesTimerInfo.cs index 44594882c..607282796 100644 --- a/MediaBrowser.Controller/LiveTv/SeriesTimerInfo.cs +++ b/MediaBrowser.Controller/LiveTv/SeriesTimerInfo.cs @@ -15,7 +15,7 @@ namespace MediaBrowser.Controller.LiveTv /// ChannelId of the recording. /// </summary> public string ChannelId { get; set; } - + /// <summary> /// ChannelName of the recording. /// </summary> @@ -26,7 +26,7 @@ namespace MediaBrowser.Controller.LiveTv /// </summary> /// <value>The program identifier.</value> public string ProgramId { get; set; } - + /// <summary> /// Name of the recording. /// </summary> @@ -35,7 +35,7 @@ namespace MediaBrowser.Controller.LiveTv /// <summary> /// Description of the recording. /// </summary> - public string Description { get; set; } + public string Overview { get; set; } /// <summary> /// The start date of the recording, in UTC. @@ -48,18 +48,6 @@ namespace MediaBrowser.Controller.LiveTv public DateTime EndDate { get; set; } /// <summary> - /// Gets or sets the pre padding seconds. - /// </summary> - /// <value>The pre padding seconds.</value> - public int PrePaddingSeconds { get; set; } - - /// <summary> - /// Gets or sets the post padding seconds. - /// </summary> - /// <value>The post padding seconds.</value> - public int PostPaddingSeconds { get; set; } - - /// <summary> /// Gets or sets the type of the recurrence. /// </summary> /// <value>The type of the recurrence.</value> @@ -77,6 +65,30 @@ namespace MediaBrowser.Controller.LiveTv /// <value>The priority.</value> public int Priority { get; set; } + /// <summary> + /// Gets or sets the requested pre padding seconds. + /// </summary> + /// <value>The requested pre padding seconds.</value> + public int RequestedPrePaddingSeconds { get; set; } + + /// <summary> + /// Gets or sets the requested post padding seconds. + /// </summary> + /// <value>The requested post padding seconds.</value> + public int RequestedPostPaddingSeconds { get; set; } + + /// <summary> + /// Gets or sets the required pre padding seconds. + /// </summary> + /// <value>The required pre padding seconds.</value> + public int RequiredPrePaddingSeconds { get; set; } + + /// <summary> + /// Gets or sets the required post padding seconds. + /// </summary> + /// <value>The required post padding seconds.</value> + public int RequiredPostPaddingSeconds { get; set; } + public SeriesTimerInfo() { Days = new List<DayOfWeek>(); diff --git a/MediaBrowser.Controller/Providers/BaseItemXmlParser.cs b/MediaBrowser.Controller/Providers/BaseItemXmlParser.cs index 9c35a4e99..c9f57a927 100644 --- a/MediaBrowser.Controller/Providers/BaseItemXmlParser.cs +++ b/MediaBrowser.Controller/Providers/BaseItemXmlParser.cs @@ -759,11 +759,30 @@ namespace MediaBrowser.Controller.Providers break; } - case "MediaInfo": + case "Format3D": { - using (var subtree = reader.ReadSubtree()) + var video = item as Video; + + if (video != null) { - FetchFromMediaInfoNode(subtree, item); + var val = reader.ReadElementContentAsString(); + + if (string.Equals("HSBS", val)) + { + video.Video3DFormat = Video3DFormat.HalfSideBySide; + } + else if (string.Equals("HTAB", val)) + { + video.Video3DFormat = Video3DFormat.HalfTopAndBottom; + } + else if (string.Equals("FTAB", val)) + { + video.Video3DFormat = Video3DFormat.FullTopAndBottom; + } + else if (string.Equals("FSBS", val)) + { + video.Video3DFormat = Video3DFormat.FullSideBySide; + } } break; } @@ -775,89 +794,6 @@ namespace MediaBrowser.Controller.Providers } /// <summary> - /// Fetches from media info node. - /// </summary> - /// <param name="reader">The reader.</param> - /// <param name="item">The item.</param> - private void FetchFromMediaInfoNode(XmlReader reader, T item) - { - reader.MoveToContent(); - - while (reader.Read()) - { - if (reader.NodeType == XmlNodeType.Element) - { - switch (reader.Name) - { - case "Video": - { - using (var subtree = reader.ReadSubtree()) - { - FetchFromMediaInfoVideoNode(subtree, item); - } - break; - } - - default: - reader.Skip(); - break; - } - } - } - } - - /// <summary> - /// Fetches from media info video node. - /// </summary> - /// <param name="reader">The reader.</param> - /// <param name="item">The item.</param> - private void FetchFromMediaInfoVideoNode(XmlReader reader, T item) - { - reader.MoveToContent(); - - while (reader.Read()) - { - if (reader.NodeType == XmlNodeType.Element) - { - switch (reader.Name) - { - case "Format3D": - { - var video = item as Video; - - if (video != null) - { - var val = reader.ReadElementContentAsString(); - - if (string.Equals("HSBS", val)) - { - video.Video3DFormat = Video3DFormat.HalfSideBySide; - } - else if (string.Equals("HTAB", val)) - { - video.Video3DFormat = Video3DFormat.HalfTopAndBottom; - } - else if (string.Equals("FTAB", val)) - { - video.Video3DFormat = Video3DFormat.FullTopAndBottom; - } - else if (string.Equals("FSBS", val)) - { - video.Video3DFormat = Video3DFormat.FullSideBySide; - } - } - break; - } - - default: - reader.Skip(); - break; - } - } - } - } - - /// <summary> /// Fetches from taglines node. /// </summary> /// <param name="reader">The reader.</param> |
