aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Entities
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2016-06-30 15:27:06 -0400
committerGitHub <noreply@github.com>2016-06-30 15:27:06 -0400
commit2708df6cc28c48a89416bdfbdde7e78fc4227c62 (patch)
tree9f892d6350a4d694c96985d679f622c0f7005278 /MediaBrowser.Model/Entities
parentd9406d48ca0231bc096aeadc595c30f0596c8dda (diff)
parent5bdc96bb6a9b863980661e2d11c1ad00a02eb601 (diff)
Merge pull request #1899 from MediaBrowser/beta
Beta
Diffstat (limited to 'MediaBrowser.Model/Entities')
-rw-r--r--MediaBrowser.Model/Entities/ImageType.cs24
-rw-r--r--MediaBrowser.Model/Entities/MediaStream.cs58
-rw-r--r--MediaBrowser.Model/Entities/MediaUrl.cs1
-rw-r--r--MediaBrowser.Model/Entities/VideoSize.cs8
4 files changed, 51 insertions, 40 deletions
diff --git a/MediaBrowser.Model/Entities/ImageType.cs b/MediaBrowser.Model/Entities/ImageType.cs
index 18097abb44..6e0ba717f0 100644
--- a/MediaBrowser.Model/Entities/ImageType.cs
+++ b/MediaBrowser.Model/Entities/ImageType.cs
@@ -9,50 +9,50 @@ namespace MediaBrowser.Model.Entities
/// <summary>
/// The primary
/// </summary>
- Primary,
+ Primary = 0,
/// <summary>
/// The art
/// </summary>
- Art,
+ Art = 1,
/// <summary>
/// The backdrop
/// </summary>
- Backdrop,
+ Backdrop = 2,
/// <summary>
/// The banner
/// </summary>
- Banner,
+ Banner = 3,
/// <summary>
/// The logo
/// </summary>
- Logo,
+ Logo = 4,
/// <summary>
/// The thumb
/// </summary>
- Thumb,
+ Thumb = 5,
/// <summary>
/// The disc
/// </summary>
- Disc,
+ Disc = 6,
/// <summary>
/// The box
/// </summary>
- Box,
+ Box = 7,
/// <summary>
/// The screenshot
/// </summary>
- Screenshot,
+ Screenshot = 8,
/// <summary>
/// The menu
/// </summary>
- Menu,
+ Menu = 9,
/// <summary>
/// The chapter image
/// </summary>
- Chapter,
+ Chapter = 10,
/// <summary>
/// The box rear
/// </summary>
- BoxRear
+ BoxRear = 11
}
}
diff --git a/MediaBrowser.Model/Entities/MediaStream.cs b/MediaBrowser.Model/Entities/MediaStream.cs
index 64c7d9aa6c..990de332e1 100644
--- a/MediaBrowser.Model/Entities/MediaStream.cs
+++ b/MediaBrowser.Model/Entities/MediaStream.cs
@@ -36,6 +36,9 @@ namespace MediaBrowser.Model.Entities
/// <value>The comment.</value>
public string Comment { get; set; }
+ public string TimeBase { get; set; }
+ public string CodecTimeBase { get; set; }
+
public string Title { get; set; }
public string DisplayTitle
@@ -72,15 +75,12 @@ namespace MediaBrowser.Model.Entities
{
attributes.Add(StringHelper.ToStringCultureInvariant(Channels.Value) + " ch");
}
-
- string name = string.Join(" ", attributes.ToArray());
-
if (IsDefault)
{
- name += " (D)";
+ attributes.Add("Default");
}
- return name;
+ return string.Join(" ", attributes.ToArray());
}
if (Type == MediaStreamType.Subtitle)
@@ -89,29 +89,19 @@ namespace MediaBrowser.Model.Entities
if (!string.IsNullOrEmpty(Language))
{
- attributes.Add(Language);
- }
- if (!string.IsNullOrEmpty(Codec))
- {
- attributes.Add(Codec);
+ attributes.Add(StringHelper.FirstToUpper(Language));
}
-
- string name = string.Join(" ", attributes.ToArray());
-
if (IsDefault)
{
- name += " (D)";
+ attributes.Add("Default");
}
if (IsForced)
{
- name += " (F)";
+ attributes.Add("Forced");
}
- if (IsExternal)
- {
- name += " (EXT)";
- }
+ string name = string.Join(" ", attributes.ToArray());
return name;
}
@@ -292,6 +282,36 @@ namespace MediaBrowser.Model.Entities
!StringHelper.EqualsIgnoreCase(codec, "sub");
}
+ public bool SupportsSubtitleConversionTo(string codec)
+ {
+ if (!IsTextSubtitleStream)
+ {
+ return false;
+ }
+
+ // Can't convert from this
+ if (StringHelper.EqualsIgnoreCase(Codec, "ass"))
+ {
+ return false;
+ }
+ if (StringHelper.EqualsIgnoreCase(Codec, "ssa"))
+ {
+ return false;
+ }
+
+ // Can't convert to this
+ if (StringHelper.EqualsIgnoreCase(codec, "ass"))
+ {
+ return false;
+ }
+ if (StringHelper.EqualsIgnoreCase(codec, "ssa"))
+ {
+ return false;
+ }
+
+ return true;
+ }
+
/// <summary>
/// Gets or sets a value indicating whether [supports external stream].
/// </summary>
diff --git a/MediaBrowser.Model/Entities/MediaUrl.cs b/MediaBrowser.Model/Entities/MediaUrl.cs
index 24e3b14927..2e17bba8a8 100644
--- a/MediaBrowser.Model/Entities/MediaUrl.cs
+++ b/MediaBrowser.Model/Entities/MediaUrl.cs
@@ -5,6 +5,5 @@ namespace MediaBrowser.Model.Entities
{
public string Url { get; set; }
public string Name { get; set; }
- public VideoSize? VideoSize { get; set; }
}
}
diff --git a/MediaBrowser.Model/Entities/VideoSize.cs b/MediaBrowser.Model/Entities/VideoSize.cs
deleted file mode 100644
index 0100f3b904..0000000000
--- a/MediaBrowser.Model/Entities/VideoSize.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-namespace MediaBrowser.Model.Entities
-{
- public enum VideoSize
- {
- StandardDefinition,
- HighDefinition
- }
-} \ No newline at end of file