diff --git a/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs b/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs index 6104976615..fb8a24061a 100644 --- a/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs +++ b/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs @@ -61,11 +61,31 @@ namespace MediaBrowser.Controller.Entities.Audio if (query.User != null) { return query.User.RootFolder - .GetRecursiveChildren(query.User, i => !i.IsFolder && itemByNameFilter(i)); + .GetRecursiveChildren(query.User, i => + { + if (query.IsFolder.HasValue) + { + if (query.IsFolder.Value != i.IsFolder) + { + return false; + } + } + return itemByNameFilter(i); + }); } return LibraryManager.RootFolder - .GetRecursiveChildren(i => !i.IsFolder && itemByNameFilter(i)); + .GetRecursiveChildren(i => + { + if (query.IsFolder.HasValue) + { + if (query.IsFolder.Value != i.IsFolder) + { + return false; + } + } + return itemByNameFilter(i); + }); } protected override IEnumerable ActualChildren diff --git a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs index 85b6ead07b..e9ea49fa32 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs @@ -46,7 +46,12 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV { if (_liveTvOptions.EnableOriginalAudioWithEncodedRecordings) { - return Path.ChangeExtension(targetFile, ".mkv"); + // if the audio is aac_latm, stream copying to mp4 will fail + var streams = mediaSource.MediaStreams ?? new List(); + if (streams.Any(i => i.Type == MediaStreamType.Audio && (i.Codec ?? string.Empty).IndexOf("aac", StringComparison.OrdinalIgnoreCase) != -1)) + { + return Path.ChangeExtension(targetFile, ".mkv"); + } } return Path.ChangeExtension(targetFile, ".mp4"); diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs index b3972a6778..f85be5100b 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs @@ -135,7 +135,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv var channels = _libraryManager.GetItemList(new InternalItemsQuery { - IncludeItemTypes = new[] { typeof(LiveTvChannel).Name } + IncludeItemTypes = new[] { typeof(LiveTvChannel).Name }, + SortBy = new[] { ItemSortBy.SortName } }).Cast();