diff options
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs | 7 | ||||
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs | 12 | ||||
| -rw-r--r-- | MediaBrowser.Controller/LiveTv/LiveTvChannel.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | 21 | ||||
| -rw-r--r-- | MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs | 17 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dto/BaseItemDto.cs | 66 | ||||
| -rw-r--r-- | SharedVersion.cs | 2 |
7 files changed, 42 insertions, 85 deletions
diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs index 7460a9f06..0567bdfd9 100644 --- a/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs @@ -163,8 +163,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV var durationParam = " -t " + _mediaEncoder.GetTimeParameter(duration.Ticks); var inputModifiers = "-fflags +genpts -async 1 -vsync -1"; - var mapArgs = "-map 0 -ignore_unknown"; - var commandLineArgs = "-i \"{0}\"{5} " + mapArgs + " {2} -map_metadata -1 -threads 0 {3}{4} -y \"{1}\""; + var commandLineArgs = "-i \"{0}\"{5} {2} -map_metadata -1 -threads 0 {3}{4} -y \"{1}\""; long startTimeTicks = 0; //if (mediaSource.DateLiveStreamOpened.HasValue) @@ -207,7 +206,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV // do not copy aac because many players have difficulty with aac_latm if (_liveTvOptions.EnableOriginalAudioWithEncodedRecordings && !string.Equals(inputAudioCodec, "aac", StringComparison.OrdinalIgnoreCase)) { - return "-codec:a copy"; + return "-codec:a:0 copy"; } var audioChannels = 2; @@ -216,7 +215,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV { audioChannels = audioStream.Channels ?? audioChannels; } - return "-codec:a aac -strict experimental -ab 320000"; + return "-codec:a:0 aac -strict experimental -ab 320000"; } private bool EncodeVideo(MediaSourceInfo mediaSource) diff --git a/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs b/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs index f76735030..a36cb124d 100644 --- a/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs +++ b/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs @@ -282,6 +282,12 @@ namespace Emby.Server.Implementations.LiveTv.Listings var showId = programInfo.programID ?? string.Empty; + if (!info.IsSeries) + { + // It's also a series if it starts with SH + info.IsSeries = showId.StartsWith("SH", StringComparison.OrdinalIgnoreCase) && showId.Length >= 14; + } + // According to SchedulesDirect, these are generic, unidentified episodes // SH005316560000 var hasUniqueShowId = !showId.StartsWith("SH", StringComparison.OrdinalIgnoreCase) || @@ -331,7 +337,11 @@ namespace Emby.Server.Implementations.LiveTv.Listings { var gracenote = details.metadata.Find(x => x.Gracenote != null).Gracenote; info.SeasonNumber = gracenote.season; - info.EpisodeNumber = gracenote.episode; + + if (gracenote.episode > 0) + { + info.EpisodeNumber = gracenote.episode; + } } } diff --git a/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs b/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs index d164b5e0d..a0ddac691 100644 --- a/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs +++ b/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs @@ -93,7 +93,7 @@ namespace MediaBrowser.Controller.LiveTv if (double.TryParse(Number, NumberStyles.Any, CultureInfo.InvariantCulture, out number)) { - return number.ToString("00000-") + (Name ?? string.Empty); + return (number * 10).ToString("00000-") + (Name ?? string.Empty); } } diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index ad61f3e73..18508a399 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -154,10 +154,6 @@ namespace MediaBrowser.Controller.MediaEncoding { return "mpegts"; } - if (string.Equals(container, "mpg", StringComparison.OrdinalIgnoreCase)) - { - return "mpeg"; - } // For these need to find out the ffmpeg names if (string.Equals(container, "m2ts", StringComparison.OrdinalIgnoreCase)) { @@ -171,12 +167,21 @@ namespace MediaBrowser.Controller.MediaEncoding { return null; } + if (string.Equals(container, "mpg", StringComparison.OrdinalIgnoreCase)) + { + return null; + } + if (string.Equals(container, "mpeg", StringComparison.OrdinalIgnoreCase)) + { + return null; + } return container; } public string GetDecoderFromCodec(string codec) { + // For these need to find out the ffmpeg names if (string.Equals(codec, "mp2", StringComparison.OrdinalIgnoreCase)) { return null; @@ -185,6 +190,10 @@ namespace MediaBrowser.Controller.MediaEncoding { return null; } + if (string.Equals(codec, "eac3", StringComparison.OrdinalIgnoreCase)) + { + return null; + } return codec; } @@ -1494,7 +1503,7 @@ namespace MediaBrowser.Controller.MediaEncoding //inputModifier += " -noaccurate_seek"; } - if (!string.IsNullOrWhiteSpace(state.InputContainer) && state.VideoType == VideoType.VideoFile) + if (!string.IsNullOrWhiteSpace(state.InputContainer) && state.VideoType == VideoType.VideoFile && string.IsNullOrWhiteSpace(encodingOptions.HardwareAccelerationType)) { var inputFormat = GetInputFormat(state.InputContainer); if (!string.IsNullOrWhiteSpace(inputFormat)) @@ -1504,7 +1513,7 @@ namespace MediaBrowser.Controller.MediaEncoding } // Only do this for video files due to sometimes unpredictable codec names coming from BDInfo - if (state.RunTimeTicks.HasValue && string.IsNullOrWhiteSpace(encodingOptions.HardwareAccelerationType) && state.VideoType == VideoType.VideoFile) + if (state.RunTimeTicks.HasValue && state.VideoType == VideoType.VideoFile && string.IsNullOrWhiteSpace(encodingOptions.HardwareAccelerationType)) { foreach (var stream in state.MediaSource.MediaStreams) { diff --git a/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs b/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs index ca22dac2d..4a1bf5305 100644 --- a/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs +++ b/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs @@ -734,6 +734,16 @@ namespace MediaBrowser.MediaEncoding.Subtitles } } + var charsetFromLanguage = string.IsNullOrWhiteSpace(language) + ? null + : GetSubtitleFileCharacterSetFromLanguage(language); + + // This assumption should only be made for external subtitles + if (!string.IsNullOrWhiteSpace(charsetFromLanguage) && !string.Equals(charsetFromLanguage, "windows-1252", StringComparison.OrdinalIgnoreCase)) + { + return charsetFromLanguage; + } + var charset = await DetectCharset(path, language, protocol, cancellationToken).ConfigureAwait(false); if (!string.IsNullOrWhiteSpace(charset)) @@ -746,12 +756,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles return charset; } - if (!string.IsNullOrWhiteSpace(language)) - { - return GetSubtitleFileCharacterSetFromLanguage(language); - } - - return null; + return charsetFromLanguage; } public string GetSubtitleFileCharacterSetFromLanguage(string language) diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.cs index c78c92967..5122227e1 100644 --- a/MediaBrowser.Model/Dto/BaseItemDto.cs +++ b/MediaBrowser.Model/Dto/BaseItemDto.cs @@ -828,72 +828,6 @@ namespace MediaBrowser.Model.Dto } /// <summary> - /// Gets a value indicating whether this instance is audio. - /// </summary> - /// <value><c>true</c> if this instance is audio; otherwise, <c>false</c>.</value> - [IgnoreDataMember] - public bool IsAudio - { - get { return StringHelper.EqualsIgnoreCase(MediaType, Entities.MediaType.Audio); } - } - - /// <summary> - /// Gets a value indicating whether this instance is game. - /// </summary> - /// <value><c>true</c> if this instance is game; otherwise, <c>false</c>.</value> - [IgnoreDataMember] - public bool IsGame - { - get { return StringHelper.EqualsIgnoreCase(MediaType, Entities.MediaType.Game); } - } - - /// <summary> - /// Gets a value indicating whether this instance is person. - /// </summary> - /// <value><c>true</c> if this instance is person; otherwise, <c>false</c>.</value> - [IgnoreDataMember] - public bool IsPerson - { - get { return StringHelper.EqualsIgnoreCase(Type, "Person"); } - } - - [IgnoreDataMember] - public bool IsMusicGenre - { - get { return StringHelper.EqualsIgnoreCase(Type, "MusicGenre"); } - } - - [IgnoreDataMember] - public bool IsGameGenre - { - get { return StringHelper.EqualsIgnoreCase(Type, "GameGenre"); } - } - - [IgnoreDataMember] - public bool IsGenre - { - get { return StringHelper.EqualsIgnoreCase(Type, "Genre"); } - } - - [IgnoreDataMember] - public bool IsArtist - { - get { return StringHelper.EqualsIgnoreCase(Type, "MusicArtist"); } - } - - [IgnoreDataMember] - public bool IsAlbum - { - get { return StringHelper.EqualsIgnoreCase(Type, "MusicAlbum"); } - } - - [IgnoreDataMember] - public bool IsStudio - { - get { return StringHelper.EqualsIgnoreCase(Type, "Studio"); } - } - - /// <summary> /// Gets or sets the program identifier. /// </summary> /// <value>The program identifier.</value> diff --git a/SharedVersion.cs b/SharedVersion.cs index 4e9e9b6ea..c9f393308 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,3 +1,3 @@ using System.Reflection; -[assembly: AssemblyVersion("3.2.5.1")] +[assembly: AssemblyVersion("3.2.5.2")] |
