diff options
| author | Luke <luke.pulverenti@gmail.com> | 2017-06-12 03:14:12 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-06-12 03:14:12 -0400 |
| commit | d803b55f4dc40182dbe70f5742971f09eed59f13 (patch) | |
| tree | 3e70e0f573b6dc1a958bca5676d00e637dd3ce2c /MediaBrowser.Controller | |
| parent | 4d5f4df7898847e0c45c1b13b7bcfc747e08d08f (diff) | |
| parent | b5aca50c9e56580fd843f1e3baba32f9cf0231f1 (diff) | |
Merge pull request #2707 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.Controller')
| -rw-r--r-- | MediaBrowser.Controller/Entities/Folder.cs | 27 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Entities/TV/Season.cs | 11 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Entities/TV/Series.cs | 11 | ||||
| -rw-r--r-- | MediaBrowser.Controller/LiveTv/LiveTvProgram.cs | 7 | ||||
| -rw-r--r-- | MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | 23 |
5 files changed, 22 insertions, 57 deletions
diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs index 48c9b83aa..727b7dbeb 100644 --- a/MediaBrowser.Controller/Entities/Folder.cs +++ b/MediaBrowser.Controller/Entities/Folder.cs @@ -212,33 +212,6 @@ namespace MediaBrowser.Controller.Entities } /// <summary> - /// Returns the valid set of index by options for this folder type. - /// Override or extend to modify. - /// </summary> - /// <returns>Dictionary{System.StringFunc{UserIEnumerable{BaseItem}}}.</returns> - protected virtual IEnumerable<string> GetIndexByOptions() - { - return new List<string> { - {"None"}, - {"Performer"}, - {"Genre"}, - {"Director"}, - {"Year"}, - {"Studio"} - }; - } - - /// <summary> - /// Get the list of indexy by choices for this folder (localized). - /// </summary> - /// <value>The index by option strings.</value> - [IgnoreDataMember] - public IEnumerable<string> IndexByOptionStrings - { - get { return GetIndexByOptions(); } - } - - /// <summary> /// Gets the actual children. /// </summary> /// <value>The actual children.</value> diff --git a/MediaBrowser.Controller/Entities/TV/Season.cs b/MediaBrowser.Controller/Entities/TV/Season.cs index 17494eb08..b681fdcb1 100644 --- a/MediaBrowser.Controller/Entities/TV/Season.cs +++ b/MediaBrowser.Controller/Entities/TV/Season.cs @@ -66,17 +66,6 @@ namespace MediaBrowser.Controller.Entities.TV return series == null ? SeriesName : series.SortName; } - // Genre, Rating and Stuido will all be the same - protected override IEnumerable<string> GetIndexByOptions() - { - return new List<string> { - {"None"}, - {"Performer"}, - {"Director"}, - {"Year"}, - }; - } - public override List<string> GetUserDataKeys() { var list = base.GetUserDataKeys(); diff --git a/MediaBrowser.Controller/Entities/TV/Series.cs b/MediaBrowser.Controller/Entities/TV/Series.cs index c54f93f11..0b9662450 100644 --- a/MediaBrowser.Controller/Entities/TV/Series.cs +++ b/MediaBrowser.Controller/Entities/TV/Series.cs @@ -227,17 +227,6 @@ namespace MediaBrowser.Controller.Entities.TV return list; } - // Studio, Genre and Rating will all be the same so makes no sense to index by these - protected override IEnumerable<string> GetIndexByOptions() - { - return new List<string> { - {"None"}, - {"Performer"}, - {"Director"}, - {"Year"}, - }; - } - [IgnoreDataMember] public bool ContainsEpisodesWithoutSeasonFolders { diff --git a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs index 665640dfd..87fc58130 100644 --- a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs +++ b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs @@ -57,8 +57,13 @@ namespace MediaBrowser.Controller.LiveTv return value; } + else + { + double value = 2; + value /= 3; - return null; + return value; + } } [IgnoreDataMember] diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index c348ffda7..c14b1f416 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -42,6 +42,11 @@ namespace MediaBrowser.Controller.MediaEncoding { var hwType = encodingOptions.HardwareAccelerationType; + if (!encodingOptions.EnableHardwareEncoding) + { + hwType = null; + } + if (string.Equals(hwType, "qsv", StringComparison.OrdinalIgnoreCase) || string.Equals(hwType, "h264_qsv", StringComparison.OrdinalIgnoreCase)) { @@ -1761,14 +1766,11 @@ namespace MediaBrowser.Controller.MediaEncoding return null; } - if (state.VideoStream != null && !string.IsNullOrWhiteSpace(state.VideoStream.Codec)) + if (state.VideoStream != null && + !string.IsNullOrWhiteSpace(state.VideoStream.Codec) && + !string.IsNullOrWhiteSpace(encodingOptions.HardwareAccelerationType) && + encodingOptions.EnableHardwareDecoding) { - if (!string.IsNullOrWhiteSpace(encodingOptions.HardwareAccelerationType)) - { - // causing unpredictable results - //return "-hwaccel auto"; - } - if (string.Equals(encodingOptions.HardwareAccelerationType, "qsv", StringComparison.OrdinalIgnoreCase)) { switch (state.MediaSource.VideoStream.Codec.ToLower()) @@ -1818,6 +1820,13 @@ namespace MediaBrowser.Controller.MediaEncoding return "-c:v h264_cuvid "; } break; + case "hevc": + case "h265": + if (_mediaEncoder.SupportsDecoder("hevc_cuvid")) + { + return "-c:v hevc_cuvid "; + } + break; } } } |
