diff options
| author | LogicalPhallacy <44458166+LogicalPhallacy@users.noreply.github.com> | 2019-01-23 00:31:35 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-23 00:31:35 -0800 |
| commit | 404bd04cbc17dc8c8bf4a5c9aa3ca9c5cd85aa68 (patch) | |
| tree | 3d267c6ceef9439a034c113095e10e4d619e7c70 /MediaBrowser.Controller/LiveTv | |
| parent | 8ff89fdc0c30f595a171ffc550f907ef22b6212a (diff) | |
| parent | e05e002b8bb4d13eb2b80b56a0aad8903ddb701e (diff) | |
Merge pull request #8 from jellyfin/master
rebase to latest master
Diffstat (limited to 'MediaBrowser.Controller/LiveTv')
17 files changed, 79 insertions, 181 deletions
diff --git a/MediaBrowser.Controller/LiveTv/ChannelInfo.cs b/MediaBrowser.Controller/LiveTv/ChannelInfo.cs index c000da852..70477fce7 100644 --- a/MediaBrowser.Controller/LiveTv/ChannelInfo.cs +++ b/MediaBrowser.Controller/LiveTv/ChannelInfo.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.LiveTv; +using MediaBrowser.Model.LiveTv; namespace MediaBrowser.Controller.LiveTv { @@ -36,7 +36,7 @@ namespace MediaBrowser.Controller.LiveTv /// </summary> /// <value>The tuner host identifier.</value> public string TunerHostId { get; set; } - + /// <summary> /// Gets or sets the type of the channel. /// </summary> diff --git a/MediaBrowser.Controller/LiveTv/IListingsProvider.cs b/MediaBrowser.Controller/LiveTv/IListingsProvider.cs index faf4a34df..c719ad81c 100644 --- a/MediaBrowser.Controller/LiveTv/IListingsProvider.cs +++ b/MediaBrowser.Controller/LiveTv/IListingsProvider.cs @@ -1,9 +1,9 @@ -using MediaBrowser.Model.Dto; -using MediaBrowser.Model.LiveTv; using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; +using MediaBrowser.Model.Dto; +using MediaBrowser.Model.LiveTv; namespace MediaBrowser.Controller.LiveTv { diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs index a7f675034..f99df6c7c 100644 --- a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs +++ b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs @@ -1,15 +1,14 @@ -using System; +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities; +using MediaBrowser.Controller.Library; using MediaBrowser.Model.Dto; -using MediaBrowser.Model.Entities; +using MediaBrowser.Model.Events; using MediaBrowser.Model.LiveTv; using MediaBrowser.Model.Querying; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using MediaBrowser.Model.Events; -using MediaBrowser.Controller.Library; namespace MediaBrowser.Controller.LiveTv { diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvService.cs b/MediaBrowser.Controller/LiveTv/ILiveTvService.cs index 601fb69aa..ba3813d8a 100644 --- a/MediaBrowser.Controller/LiveTv/ILiveTvService.cs +++ b/MediaBrowser.Controller/LiveTv/ILiveTvService.cs @@ -1,10 +1,9 @@ -using MediaBrowser.Controller.Drawing; -using MediaBrowser.Model.Dto; using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Controller.Library; +using MediaBrowser.Model.Dto; namespace MediaBrowser.Controller.LiveTv { @@ -99,7 +98,7 @@ namespace MediaBrowser.Controller.LiveTv /// <param name="program">The program.</param> /// <returns>Task{SeriesTimerInfo}.</returns> Task<SeriesTimerInfo> GetNewTimerDefaultsAsync(CancellationToken cancellationToken, ProgramInfo program = null); - + /// <summary> /// Gets the series timers asynchronous. /// </summary> diff --git a/MediaBrowser.Controller/LiveTv/ITunerHost.cs b/MediaBrowser.Controller/LiveTv/ITunerHost.cs index d5a0e2115..240ba8c23 100644 --- a/MediaBrowser.Controller/LiveTv/ITunerHost.cs +++ b/MediaBrowser.Controller/LiveTv/ITunerHost.cs @@ -1,9 +1,9 @@ -using MediaBrowser.Model.Dto; -using MediaBrowser.Model.LiveTv; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Controller.Library; +using MediaBrowser.Model.Dto; +using MediaBrowser.Model.LiveTv; namespace MediaBrowser.Controller.LiveTv { diff --git a/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs b/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs index 9e2d29eb6..55f47aae9 100644 --- a/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs +++ b/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs @@ -1,14 +1,14 @@ -using MediaBrowser.Controller.Entities; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using MediaBrowser.Controller.Entities; using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Dto; using MediaBrowser.Model.Entities; using MediaBrowser.Model.LiveTv; using MediaBrowser.Model.MediaInfo; -using System.Collections.Generic; -using System.Globalization; using MediaBrowser.Model.Serialization; -using System; -using System.Linq; namespace MediaBrowser.Controller.LiveTv { @@ -32,28 +32,13 @@ namespace MediaBrowser.Controller.LiveTv } [IgnoreDataMember] - public override bool SupportsPositionTicksResume - { - get - { - return false; - } - } + public override bool SupportsPositionTicksResume => false; [IgnoreDataMember] - public override SourceType SourceType - { - get { return SourceType.LiveTV; } - } + public override SourceType SourceType => SourceType.LiveTV; [IgnoreDataMember] - public override bool EnableRememberingTrackSelections - { - get - { - return false; - } - } + public override bool EnableRememberingTrackSelections => false; /// <summary> /// Gets or sets the number. @@ -68,14 +53,7 @@ namespace MediaBrowser.Controller.LiveTv public ChannelType ChannelType { get; set; } [IgnoreDataMember] - public override LocationType LocationType - { - get - { - // TODO: This should be removed - return LocationType.Remote; - } - } + public override LocationType LocationType => LocationType.Remote; protected override string CreateSortName() { @@ -93,13 +71,7 @@ namespace MediaBrowser.Controller.LiveTv } [IgnoreDataMember] - public override string MediaType - { - get - { - return ChannelType == ChannelType.Radio ? Model.Entities.MediaType.Audio : Model.Entities.MediaType.Video; - } - } + public override string MediaType => ChannelType == ChannelType.Radio ? Model.Entities.MediaType.Audio : Model.Entities.MediaType.Video; public override string GetClientTypeName() { @@ -176,13 +148,7 @@ namespace MediaBrowser.Controller.LiveTv /// </summary> /// <value><c>true</c> if this instance is kids; otherwise, <c>false</c>.</value> [IgnoreDataMember] - public bool IsKids - { - get - { - return Tags.Contains("Kids", StringComparer.OrdinalIgnoreCase); - } - } + public bool IsKids => Tags.Contains("Kids", StringComparer.OrdinalIgnoreCase); [IgnoreDataMember] public bool IsRepeat { get; set; } diff --git a/MediaBrowser.Controller/LiveTv/LiveTvConflictException.cs b/MediaBrowser.Controller/LiveTv/LiveTvConflictException.cs index a7735ad80..df8f91eec 100644 --- a/MediaBrowser.Controller/LiveTv/LiveTvConflictException.cs +++ b/MediaBrowser.Controller/LiveTv/LiveTvConflictException.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Controller.LiveTv { @@ -17,4 +17,4 @@ namespace MediaBrowser.Controller.LiveTv } } -}
\ No newline at end of file +} diff --git a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs index 4dc6c7517..8bde6a5da 100644 --- a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs +++ b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs @@ -1,12 +1,12 @@ -using MediaBrowser.Controller.Entities; -using MediaBrowser.Controller.Providers; -using MediaBrowser.Model.Configuration; -using MediaBrowser.Model.LiveTv; using System; using System.Collections.Generic; using System.Linq; using MediaBrowser.Common.Configuration; +using MediaBrowser.Controller.Entities; +using MediaBrowser.Controller.Providers; +using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Entities; +using MediaBrowser.Model.LiveTv; using MediaBrowser.Model.Providers; using MediaBrowser.Model.Serialization; @@ -54,19 +54,16 @@ namespace MediaBrowser.Controller.LiveTv if (string.Equals(serviceName, EmbyServiceName, StringComparison.OrdinalIgnoreCase) || string.Equals(serviceName, "Next Pvr", StringComparison.OrdinalIgnoreCase)) { - return 2 / 3; + return 2.0 / 3; } else { - return 16 / 9; + return 16.0 / 9; } } [IgnoreDataMember] - public override SourceType SourceType - { - get { return SourceType.LiveTV; } - } + public override SourceType SourceType => SourceType.LiveTV; /// <summary> /// The start date of the program, in UTC. @@ -103,13 +100,7 @@ namespace MediaBrowser.Controller.LiveTv /// </summary> /// <value><c>true</c> if this instance is sports; otherwise, <c>false</c>.</value> [IgnoreDataMember] - public bool IsSports - { - get - { - return Tags.Contains("Sports", StringComparer.OrdinalIgnoreCase); - } - } + public bool IsSports => Tags.Contains("Sports", StringComparer.OrdinalIgnoreCase); /// <summary> /// Gets or sets a value indicating whether this instance is series. @@ -123,52 +114,28 @@ namespace MediaBrowser.Controller.LiveTv /// </summary> /// <value><c>true</c> if this instance is live; otherwise, <c>false</c>.</value> [IgnoreDataMember] - public bool IsLive - { - get - { - return Tags.Contains("Live", StringComparer.OrdinalIgnoreCase); - } - } + public bool IsLive => Tags.Contains("Live", StringComparer.OrdinalIgnoreCase); /// <summary> /// Gets or sets a value indicating whether this instance is news. /// </summary> /// <value><c>true</c> if this instance is news; otherwise, <c>false</c>.</value> [IgnoreDataMember] - public bool IsNews - { - get - { - return Tags.Contains("News", StringComparer.OrdinalIgnoreCase); - } - } + public bool IsNews => Tags.Contains("News", StringComparer.OrdinalIgnoreCase); /// <summary> /// Gets or sets a value indicating whether this instance is kids. /// </summary> /// <value><c>true</c> if this instance is kids; otherwise, <c>false</c>.</value> [IgnoreDataMember] - public bool IsKids - { - get - { - return Tags.Contains("Kids", StringComparer.OrdinalIgnoreCase); - } - } + public bool IsKids => Tags.Contains("Kids", StringComparer.OrdinalIgnoreCase); /// <summary> /// Gets or sets a value indicating whether this instance is premiere. /// </summary> /// <value><c>true</c> if this instance is premiere; otherwise, <c>false</c>.</value> [IgnoreDataMember] - public bool IsPremiere - { - get - { - return Tags.Contains("Premiere", StringComparer.OrdinalIgnoreCase); - } - } + public bool IsPremiere => Tags.Contains("Premiere", StringComparer.OrdinalIgnoreCase); /// <summary> /// Returns the folder containing the item. @@ -176,13 +143,7 @@ namespace MediaBrowser.Controller.LiveTv /// </summary> /// <value>The containing folder path.</value> [IgnoreDataMember] - public override string ContainingFolderPath - { - get - { - return Path; - } - } + public override string ContainingFolderPath => Path; //[IgnoreDataMember] //public override string MediaType @@ -251,13 +212,7 @@ namespace MediaBrowser.Controller.LiveTv } [IgnoreDataMember] - public override bool SupportsAncestors - { - get - { - return false; - } - } + public override bool SupportsAncestors => false; private LiveTvOptions GetConfiguration() { @@ -313,6 +268,6 @@ namespace MediaBrowser.Controller.LiveTv return list; } - public string SeriesName { get; set;} + public string SeriesName { get; set; } } } diff --git a/MediaBrowser.Controller/LiveTv/LiveTvServiceStatusInfo.cs b/MediaBrowser.Controller/LiveTv/LiveTvServiceStatusInfo.cs index 4da238acf..67b2f0eb1 100644 --- a/MediaBrowser.Controller/LiveTv/LiveTvServiceStatusInfo.cs +++ b/MediaBrowser.Controller/LiveTv/LiveTvServiceStatusInfo.cs @@ -1,5 +1,5 @@ -using MediaBrowser.Model.LiveTv; using System.Collections.Generic; +using MediaBrowser.Model.LiveTv; namespace MediaBrowser.Controller.LiveTv { @@ -39,7 +39,7 @@ namespace MediaBrowser.Controller.LiveTv /// </summary> /// <value><c>true</c> if this instance is visible; otherwise, <c>false</c>.</value> public bool IsVisible { get; set; } - + public LiveTvServiceStatusInfo() { Tuners = new List<LiveTvTunerInfo>(); diff --git a/MediaBrowser.Controller/LiveTv/LiveTvTunerInfo.cs b/MediaBrowser.Controller/LiveTv/LiveTvTunerInfo.cs index 5c001f288..2857f73f6 100644 --- a/MediaBrowser.Controller/LiveTv/LiveTvTunerInfo.cs +++ b/MediaBrowser.Controller/LiveTv/LiveTvTunerInfo.cs @@ -1,5 +1,5 @@ -using MediaBrowser.Model.LiveTv; using System.Collections.Generic; +using MediaBrowser.Model.LiveTv; namespace MediaBrowser.Controller.LiveTv { @@ -28,7 +28,7 @@ namespace MediaBrowser.Controller.LiveTv /// </summary> /// <value>The URL.</value> public string Url { get; set; } - + /// <summary> /// Gets or sets the status. /// </summary> @@ -52,7 +52,7 @@ namespace MediaBrowser.Controller.LiveTv /// </summary> /// <value>The name of the program.</value> public string ProgramName { get; set; } - + /// <summary> /// Gets or sets the clients. /// </summary> @@ -64,10 +64,10 @@ namespace MediaBrowser.Controller.LiveTv /// </summary> /// <value><c>true</c> if this instance can reset; otherwise, <c>false</c>.</value> public bool CanReset { get; set; } - + public LiveTvTunerInfo() { Clients = new List<string>(); } } -}
\ No newline at end of file +} diff --git a/MediaBrowser.Controller/LiveTv/ProgramInfo.cs b/MediaBrowser.Controller/LiveTv/ProgramInfo.cs index 9e3cbdded..5d0f13192 100644 --- a/MediaBrowser.Controller/LiveTv/ProgramInfo.cs +++ b/MediaBrowser.Controller/LiveTv/ProgramInfo.cs @@ -1,7 +1,6 @@ -using MediaBrowser.Model.LiveTv; using System; using System.Collections.Generic; -using MediaBrowser.Model.Entities; +using MediaBrowser.Model.LiveTv; namespace MediaBrowser.Controller.LiveTv { @@ -161,7 +160,7 @@ namespace MediaBrowser.Controller.LiveTv /// Gets or sets a value indicating whether this instance is premiere. /// </summary> /// <value><c>true</c> if this instance is premiere; otherwise, <c>false</c>.</value> - public bool IsPremiere { get; set; } + public bool IsPremiere { get; set; } /// <summary> /// Gets or sets the production year. diff --git a/MediaBrowser.Controller/LiveTv/RecordingInfo.cs b/MediaBrowser.Controller/LiveTv/RecordingInfo.cs index 3006b9bbe..432388d6b 100644 --- a/MediaBrowser.Controller/LiveTv/RecordingInfo.cs +++ b/MediaBrowser.Controller/LiveTv/RecordingInfo.cs @@ -1,6 +1,6 @@ -using MediaBrowser.Model.LiveTv; using System; using System.Collections.Generic; +using MediaBrowser.Model.LiveTv; namespace MediaBrowser.Controller.LiveTv { @@ -22,7 +22,7 @@ namespace MediaBrowser.Controller.LiveTv /// </summary> /// <value>The timer identifier.</value> public string TimerId { get; set; } - + /// <summary> /// ChannelId of the recording. /// </summary> @@ -33,7 +33,7 @@ namespace MediaBrowser.Controller.LiveTv /// </summary> /// <value>The type of the channel.</value> public ChannelType ChannelType { get; set; } - + /// <summary> /// Name of the recording. /// </summary> @@ -50,7 +50,7 @@ namespace MediaBrowser.Controller.LiveTv /// </summary> /// <value>The URL.</value> public string Url { get; set; } - + /// <summary> /// Gets or sets the overview. /// </summary> diff --git a/MediaBrowser.Controller/LiveTv/RecordingStatusChangedEventArgs.cs b/MediaBrowser.Controller/LiveTv/RecordingStatusChangedEventArgs.cs index 90ea329fe..99460a686 100644 --- a/MediaBrowser.Controller/LiveTv/RecordingStatusChangedEventArgs.cs +++ b/MediaBrowser.Controller/LiveTv/RecordingStatusChangedEventArgs.cs @@ -1,5 +1,5 @@ -using MediaBrowser.Model.LiveTv; using System; +using MediaBrowser.Model.LiveTv; namespace MediaBrowser.Controller.LiveTv { diff --git a/MediaBrowser.Controller/LiveTv/SeriesTimerInfo.cs b/MediaBrowser.Controller/LiveTv/SeriesTimerInfo.cs index 5c73ed833..4fbd496c5 100644 --- a/MediaBrowser.Controller/LiveTv/SeriesTimerInfo.cs +++ b/MediaBrowser.Controller/LiveTv/SeriesTimerInfo.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using MediaBrowser.Model.LiveTv; @@ -15,13 +15,13 @@ namespace MediaBrowser.Controller.LiveTv /// ChannelId of the recording. /// </summary> public string ChannelId { get; set; } - + /// <summary> /// Gets or sets the program identifier. /// </summary> /// <value>The program identifier.</value> public string ProgramId { get; set; } - + /// <summary> /// Name of the recording. /// </summary> @@ -66,7 +66,7 @@ namespace MediaBrowser.Controller.LiveTv /// </summary> /// <value><c>true</c> if [record new only]; otherwise, <c>false</c>.</value> public bool RecordNewOnly { get; set; } - + /// <summary> /// Gets or sets the days. /// </summary> @@ -108,7 +108,7 @@ namespace MediaBrowser.Controller.LiveTv /// </summary> /// <value>The series identifier.</value> public string SeriesId { get; set; } - + public SeriesTimerInfo() { Days = new List<DayOfWeek>(); diff --git a/MediaBrowser.Controller/LiveTv/TimerEventInfo.cs b/MediaBrowser.Controller/LiveTv/TimerEventInfo.cs index 5b71a26a2..cfec39b4e 100644 --- a/MediaBrowser.Controller/LiveTv/TimerEventInfo.cs +++ b/MediaBrowser.Controller/LiveTv/TimerEventInfo.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Controller.LiveTv { diff --git a/MediaBrowser.Controller/LiveTv/TimerInfo.cs b/MediaBrowser.Controller/LiveTv/TimerInfo.cs index c9eb6fee6..2fea6a8cb 100644 --- a/MediaBrowser.Controller/LiveTv/TimerInfo.cs +++ b/MediaBrowser.Controller/LiveTv/TimerInfo.cs @@ -1,7 +1,7 @@ -using MediaBrowser.Model.LiveTv; using System; using System.Collections.Generic; using System.Linq; +using MediaBrowser.Model.LiveTv; using MediaBrowser.Model.Serialization; namespace MediaBrowser.Controller.LiveTv @@ -114,28 +114,15 @@ namespace MediaBrowser.Controller.LiveTv /// </summary> /// <value>The episode number.</value> public int? EpisodeNumber { get; set; } + public bool IsMovie { get; set; } - public bool IsKids - { - get - { - return Tags.Contains("Kids", StringComparer.OrdinalIgnoreCase); - } - } - public bool IsSports - { - get - { - return Tags.Contains("Sports", StringComparer.OrdinalIgnoreCase); - } - } - public bool IsNews - { - get - { - return Tags.Contains("News", StringComparer.OrdinalIgnoreCase); - } - } + + public bool IsKids => Tags.Contains("Kids", StringComparer.OrdinalIgnoreCase); + + public bool IsSports => Tags.Contains("Sports", StringComparer.OrdinalIgnoreCase); + + public bool IsNews => Tags.Contains("News", StringComparer.OrdinalIgnoreCase); + public bool IsSeries { get; set; } /// <summary> @@ -143,28 +130,21 @@ namespace MediaBrowser.Controller.LiveTv /// </summary> /// <value><c>true</c> if this instance is live; otherwise, <c>false</c>.</value> [IgnoreDataMember] - public bool IsLive - { - get - { - return Tags.Contains("Live", StringComparer.OrdinalIgnoreCase); - } - } + public bool IsLive => Tags.Contains("Live", StringComparer.OrdinalIgnoreCase); [IgnoreDataMember] - public bool IsPremiere - { - get - { - return Tags.Contains("Premiere", StringComparer.OrdinalIgnoreCase); - } - } + public bool IsPremiere => Tags.Contains("Premiere", StringComparer.OrdinalIgnoreCase); public int? ProductionYear { get; set; } + public string EpisodeTitle { get; set; } + public DateTime? OriginalAirDate { get; set; } + public bool IsProgramSeries { get; set; } + public bool IsRepeat { get; set; } + public string HomePageUrl { get; set; } public float? CommunityRating { get; set; } public string OfficialRating { get; set; } diff --git a/MediaBrowser.Controller/LiveTv/TunerChannelMapping.cs b/MediaBrowser.Controller/LiveTv/TunerChannelMapping.cs index 3b2df0471..cb02da635 100644 --- a/MediaBrowser.Controller/LiveTv/TunerChannelMapping.cs +++ b/MediaBrowser.Controller/LiveTv/TunerChannelMapping.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Controller.LiveTv +namespace MediaBrowser.Controller.LiveTv { public class TunerChannelMapping { |
