aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/LiveTv
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/LiveTv')
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvProgram.cs43
-rw-r--r--MediaBrowser.Controller/LiveTv/TimerInfo.cs4
2 files changed, 8 insertions, 39 deletions
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
index fa3aab4f2..4dc6c7517 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
@@ -47,52 +47,21 @@ namespace MediaBrowser.Controller.LiveTv
return list;
}
- public static double GetDefaultPrimaryImageAspectRatio(IHasProgramAttributes item)
+ private static string EmbyServiceName = "Emby";
+ public override double GetDefaultPrimaryImageAspectRatio()
{
- var serviceName = item.ServiceName;
+ var serviceName = ServiceName;
- if (item.IsMovie)
+ if (string.Equals(serviceName, EmbyServiceName, StringComparison.OrdinalIgnoreCase) || string.Equals(serviceName, "Next Pvr", StringComparison.OrdinalIgnoreCase))
{
- if (string.Equals(serviceName, EmbyServiceName, StringComparison.OrdinalIgnoreCase) || string.Equals(serviceName, "Next Pvr", StringComparison.OrdinalIgnoreCase))
- {
- double value = 2;
- value /= 3;
-
- return value;
- }
- else
- {
- double value = 16;
- value /= 9;
-
- return value;
- }
+ return 2 / 3;
}
else
{
- if (string.Equals(serviceName, EmbyServiceName, StringComparison.OrdinalIgnoreCase) || string.Equals(serviceName, "Next Pvr", StringComparison.OrdinalIgnoreCase))
- {
- double value = 2;
- value /= 3;
-
- return value;
- }
- else
- {
- double value = 16;
- value /= 9;
-
- return value;
- }
+ return 16 / 9;
}
}
- private static string EmbyServiceName = "Emby";
- public override double GetDefaultPrimaryImageAspectRatio()
- {
- return GetDefaultPrimaryImageAspectRatio(this);
- }
-
[IgnoreDataMember]
public override SourceType SourceType
{
diff --git a/MediaBrowser.Controller/LiveTv/TimerInfo.cs b/MediaBrowser.Controller/LiveTv/TimerInfo.cs
index baf0b0b13..c9eb6fee6 100644
--- a/MediaBrowser.Controller/LiveTv/TimerInfo.cs
+++ b/MediaBrowser.Controller/LiveTv/TimerInfo.cs
@@ -10,11 +10,11 @@ namespace MediaBrowser.Controller.LiveTv
{
public TimerInfo()
{
- Genres = new string[] { };
+ Genres = Array.Empty<string>();
KeepUntil = KeepUntil.UntilDeleted;
ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
SeriesProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
- Tags = new string[] { };
+ Tags = Array.Empty<string>();
}
public Dictionary<string, string> ProviderIds { get; set; }