diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-05-09 00:38:12 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-05-09 00:38:12 -0400 |
| commit | 1a323767be3808f8cdd055e8481ca8c1ea0b1582 (patch) | |
| tree | 92192376a9ed141ccc771017957f3f5a4a1b8ac7 /MediaBrowser.Model/Entities | |
| parent | 06a11c27d91193ece901241c51194992075ed8ea (diff) | |
Do better to make sure hls files are cleaned up
Diffstat (limited to 'MediaBrowser.Model/Entities')
| -rw-r--r-- | MediaBrowser.Model/Entities/MediaStream.cs | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/MediaBrowser.Model/Entities/MediaStream.cs b/MediaBrowser.Model/Entities/MediaStream.cs index 66163c1ef7..9f64b36e43 100644 --- a/MediaBrowser.Model/Entities/MediaStream.cs +++ b/MediaBrowser.Model/Entities/MediaStream.cs @@ -1,4 +1,6 @@ -using System.Diagnostics; +using System; +using System.Diagnostics; +using System.Runtime.Serialization; namespace MediaBrowser.Model.Entities { @@ -128,6 +130,20 @@ namespace MediaBrowser.Model.Entities /// <value><c>true</c> if this instance is external; otherwise, <c>false</c>.</value> public bool IsExternal { get; set; } + [IgnoreDataMember] + public bool IsGraphicalSubtitleStream + { + get + { + if (IsExternal) return false; + + var codec = Codec ?? string.Empty; + + return codec.IndexOf("pgs", StringComparison.OrdinalIgnoreCase) != -1 || + codec.IndexOf("dvd", StringComparison.OrdinalIgnoreCase) != -1; + } + } + /// <summary> /// Gets or sets the filename. /// </summary> |
