aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/LiveTv
diff options
context:
space:
mode:
authorErwin de Haan <EraYaN@users.noreply.github.com>2019-01-13 21:31:14 +0100
committerErwin de Haan <EraYaN@users.noreply.github.com>2019-01-13 21:31:14 +0100
commita36658f6f0ed342d8b55dbf7c9ff95fe3abfa818 (patch)
treeb1484407efd83b243d0ea792b18c598e9ff53053 /MediaBrowser.Controller/LiveTv
parent9fa60ec9340cbc8b4ed3e866fcf61852077902a1 (diff)
ReSharper Reformat: Properties to expression bodied form.
Diffstat (limited to 'MediaBrowser.Controller/LiveTv')
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvChannel.cs46
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvProgram.cs61
-rw-r--r--MediaBrowser.Controller/LiveTv/TimerInfo.cs42
3 files changed, 21 insertions, 128 deletions
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs b/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs
index 93300243b6..55f47aae9b 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs
@@ -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/LiveTvProgram.cs b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
index 15394cc209..8bde6a5da8 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
@@ -63,10 +63,7 @@ namespace MediaBrowser.Controller.LiveTv
}
[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()
{
diff --git a/MediaBrowser.Controller/LiveTv/TimerInfo.cs b/MediaBrowser.Controller/LiveTv/TimerInfo.cs
index 8088e73324..d89ec4fbf0 100644
--- a/MediaBrowser.Controller/LiveTv/TimerInfo.cs
+++ b/MediaBrowser.Controller/LiveTv/TimerInfo.cs
@@ -115,27 +115,11 @@ namespace MediaBrowser.Controller.LiveTv
/// <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,22 +127,10 @@ 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; }