aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2017-09-15 02:32:20 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2017-09-15 02:32:20 -0400
commit106575e44323536684b2b11b6ef962a89d7d6b7e (patch)
treed22db5fa7cfaeb8666e8bf5edf58d9110a5e56a5 /MediaBrowser.Controller
parentce26d502a4095c995150a53e5a17b89b59885308 (diff)
3.2.30.21
Diffstat (limited to 'MediaBrowser.Controller')
-rw-r--r--MediaBrowser.Controller/Entities/IHasProgramAttributes.cs1
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs17
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvProgram.cs13
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs17
4 files changed, 12 insertions, 36 deletions
diff --git a/MediaBrowser.Controller/Entities/IHasProgramAttributes.cs b/MediaBrowser.Controller/Entities/IHasProgramAttributes.cs
index 106b8bce4..90786d44d 100644
--- a/MediaBrowser.Controller/Entities/IHasProgramAttributes.cs
+++ b/MediaBrowser.Controller/Entities/IHasProgramAttributes.cs
@@ -15,5 +15,6 @@ namespace MediaBrowser.Controller.Entities
bool IsPremiere { get; set; }
ProgramAudio? Audio { get; set; }
string EpisodeTitle { get; set; }
+ string ServiceName { get; set; }
}
}
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs b/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs
index ac73f240a..8fa96076b 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs
@@ -89,24 +89,9 @@ namespace MediaBrowser.Controller.LiveTv
}
}
- private static string EmbyServiceName = "Emby";
public override double? GetDefaultPrimaryImageAspectRatio()
{
- var serviceName = ServiceName;
- if (!IsMovie && !string.Equals(serviceName, EmbyServiceName, StringComparison.OrdinalIgnoreCase) || !string.IsNullOrWhiteSpace(serviceName))
- {
- double value = 16;
- value /= 9;
-
- return value;
- }
- else
- {
- double value = 2;
- value /= 3;
-
- return value;
- }
+ return LiveTvProgram.GetDefaultPrimaryImageAspectRatio(this);
}
public override string GetClientTypeName()
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
index 5c83f6412..5449e59a2 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
@@ -47,11 +47,10 @@ namespace MediaBrowser.Controller.LiveTv
return list;
}
- private static string EmbyServiceName = "Emby";
- public override double? GetDefaultPrimaryImageAspectRatio()
+ public static double? GetDefaultPrimaryImageAspectRatio(IHasProgramAttributes item)
{
- var serviceName = ServiceName;
- if (!IsMovie && !string.Equals(serviceName, EmbyServiceName, StringComparison.OrdinalIgnoreCase) || !string.IsNullOrWhiteSpace(serviceName))
+ var serviceName = item.ServiceName;
+ if (!item.IsMovie && !string.Equals(serviceName, EmbyServiceName, StringComparison.OrdinalIgnoreCase))
{
double value = 16;
value /= 9;
@@ -67,6 +66,12 @@ namespace MediaBrowser.Controller.LiveTv
}
}
+ private static string EmbyServiceName = "Emby";
+ public override double? GetDefaultPrimaryImageAspectRatio()
+ {
+ return GetDefaultPrimaryImageAspectRatio(this);
+ }
+
[IgnoreDataMember]
public override SourceType SourceType
{
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs b/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs
index 9a744b8f8..c5fe7b1b3 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs
@@ -98,24 +98,9 @@ namespace MediaBrowser.Controller.LiveTv
return false;
}
- private static string EmbyServiceName = "Emby";
public override double? GetDefaultPrimaryImageAspectRatio()
{
- var serviceName = ServiceName;
- if (!IsMovie && !string.Equals(serviceName, EmbyServiceName, StringComparison.OrdinalIgnoreCase) || !string.IsNullOrWhiteSpace(serviceName))
- {
- double value = 16;
- value /= 9;
-
- return value;
- }
- else
- {
- double value = 2;
- value /= 3;
-
- return value;
- }
+ return LiveTvProgram.GetDefaultPrimaryImageAspectRatio(this);
}
[IgnoreDataMember]