diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-05-12 14:04:25 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-05-12 14:04:25 -0400 |
| commit | 631442883085b10e36675fca5117fa3a49a608e0 (patch) | |
| tree | 1b542459c3d6a3e6833c2993b4c8a7e4992de61a /MediaBrowser.Model | |
| parent | b9b568de13d81f9db1a8502d50940475c1d79c72 (diff) | |
Add remote control chapter menu
Diffstat (limited to 'MediaBrowser.Model')
| -rw-r--r-- | MediaBrowser.Model/Configuration/UserConfiguration.cs | 17 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dto/MediaSourceInfo.cs | 22 | ||||
| -rw-r--r-- | MediaBrowser.Model/MediaInfo/AudioCodec.cs | 5 | ||||
| -rw-r--r-- | MediaBrowser.Model/MediaInfo/Container.cs | 3 | ||||
| -rw-r--r-- | MediaBrowser.Model/MediaInfo/SubtitleFormat.cs | 6 | ||||
| -rw-r--r-- | MediaBrowser.Model/MediaInfo/VideoCodec.cs | 14 |
6 files changed, 54 insertions, 13 deletions
diff --git a/MediaBrowser.Model/Configuration/UserConfiguration.cs b/MediaBrowser.Model/Configuration/UserConfiguration.cs index 2658e8973..552747f5f 100644 --- a/MediaBrowser.Model/Configuration/UserConfiguration.cs +++ b/MediaBrowser.Model/Configuration/UserConfiguration.cs @@ -25,6 +25,12 @@ namespace MediaBrowser.Model.Configuration public string AudioLanguagePreference { get; set; } /// <summary> + /// Gets or sets a value indicating whether [play default audio track]. + /// </summary> + /// <value><c>true</c> if [play default audio track]; otherwise, <c>false</c>.</value> + public bool PlayDefaultAudioTrack { get; set; } + + /// <summary> /// Gets or sets the subtitle language preference. /// </summary> /// <value>The subtitle language preference.</value> @@ -61,6 +67,8 @@ namespace MediaBrowser.Model.Configuration public UnratedItem[] BlockUnratedItems { get; set; } + public SubtitlePlaybackMode SubtitleMode { get; set; } + /// <summary> /// Initializes a new instance of the <see cref="UserConfiguration" /> class. /// </summary> @@ -68,6 +76,7 @@ namespace MediaBrowser.Model.Configuration { IsAdministrator = true; + PlayDefaultAudioTrack = true; EnableRemoteControlOfOtherUsers = true; EnableLiveTvManagement = true; EnableMediaPlayback = true; @@ -79,4 +88,12 @@ namespace MediaBrowser.Model.Configuration BlockUnratedItems = new UnratedItem[] { }; } } + + public enum SubtitlePlaybackMode + { + Default = 0, + Always = 1, + OnlyForced = 2, + None = 3 + } } diff --git a/MediaBrowser.Model/Dto/MediaSourceInfo.cs b/MediaBrowser.Model/Dto/MediaSourceInfo.cs index 4fe586333..d215f2866 100644 --- a/MediaBrowser.Model/Dto/MediaSourceInfo.cs +++ b/MediaBrowser.Model/Dto/MediaSourceInfo.cs @@ -1,8 +1,8 @@ -using System; -using System.Runtime.Serialization; -using MediaBrowser.Model.Entities; +using MediaBrowser.Model.Entities; using MediaBrowser.Model.MediaInfo; +using System; using System.Collections.Generic; +using System.Runtime.Serialization; namespace MediaBrowser.Model.Dto { @@ -41,11 +41,27 @@ namespace MediaBrowser.Model.Dto MediaStreams = new List<MediaStream>(); } + public int? DefaultAudioStreamIndex { get; set; } + public int? DefaultSubtitleStreamIndex { get; set; } + [IgnoreDataMember] public MediaStream DefaultAudioStream { get { + if (DefaultAudioStreamIndex.HasValue) + { + var val = DefaultAudioStreamIndex.Value; + + foreach (MediaStream i in MediaStreams) + { + if (i.Type == MediaStreamType.Audio && i.Index == val) + { + return i; + } + } + } + foreach (MediaStream i in MediaStreams) { if (i.Type == MediaStreamType.Audio && i.IsDefault) diff --git a/MediaBrowser.Model/MediaInfo/AudioCodec.cs b/MediaBrowser.Model/MediaInfo/AudioCodec.cs index a76c0e742..5353f2b3e 100644 --- a/MediaBrowser.Model/MediaInfo/AudioCodec.cs +++ b/MediaBrowser.Model/MediaInfo/AudioCodec.cs @@ -2,7 +2,8 @@ { public class AudioCodec { - public const string AAC = "AAC"; - public const string MP3 = "MP3"; + public const string AAC = "aac"; + public const string MP3 = "mp3"; + public const string AC3 = "ac3"; } }
\ No newline at end of file diff --git a/MediaBrowser.Model/MediaInfo/Container.cs b/MediaBrowser.Model/MediaInfo/Container.cs index 0305b9cfa..3762edf9f 100644 --- a/MediaBrowser.Model/MediaInfo/Container.cs +++ b/MediaBrowser.Model/MediaInfo/Container.cs @@ -3,6 +3,7 @@ namespace MediaBrowser.Model.MediaInfo { public class Container { - public const string MP4 = "MP4"; + public const string MP4 = "mp4"; + public const string MKV = "mkv"; } } diff --git a/MediaBrowser.Model/MediaInfo/SubtitleFormat.cs b/MediaBrowser.Model/MediaInfo/SubtitleFormat.cs index 51a0dbc9e..30eb50825 100644 --- a/MediaBrowser.Model/MediaInfo/SubtitleFormat.cs +++ b/MediaBrowser.Model/MediaInfo/SubtitleFormat.cs @@ -2,6 +2,10 @@ { public class SubtitleFormat { - public const string SRT = "SRT"; + public const string SRT = "srt"; + public const string SSA = "ssa"; + public const string ASS = "ass"; + public const string VTT = "vtt"; + public const string SUB = "sub"; } }
\ No newline at end of file diff --git a/MediaBrowser.Model/MediaInfo/VideoCodec.cs b/MediaBrowser.Model/MediaInfo/VideoCodec.cs index 7405eb13e..81755dac9 100644 --- a/MediaBrowser.Model/MediaInfo/VideoCodec.cs +++ b/MediaBrowser.Model/MediaInfo/VideoCodec.cs @@ -2,11 +2,13 @@ { public class VideoCodec { - public const string H263 = "H263"; - public const string H264 = "H264"; - public const string H265 = "H265"; - public const string MPEG4 = "MPEG4"; - public const string MSMPEG4 = "MSMPEG4"; - public const string VC1 = "VC1"; + public const string H263 = "h263"; + public const string H264 = "h264"; + public const string H265 = "h265"; + public const string MPEG4 = "mpeg4"; + public const string MPEG1 = "mpeg1video"; + public const string MPEG2 = "mpeg2video"; + public const string MSMPEG4 = "msmpeg4"; + public const string VC1 = "vc1"; } }
\ No newline at end of file |
