import shared media info component

pull/702/head
Luke Pulverenti 9 years ago
parent 761a476ea0
commit c4e3bbaf4a

@ -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<BaseItem> ActualChildren

@ -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<MediaStream>();
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");

@ -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<LiveTvChannel>();

Loading…
Cancel
Save