mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-08-28 04:52:18 +00:00
preserve image with audio sync encoding
This commit is contained in:
parent
6375920933
commit
c37652058c
3 changed files with 30 additions and 4 deletions
|
|
@ -60,6 +60,14 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
|
||||
state.IsInputVideo = string.Equals(item.MediaType, MediaType.Video, StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
var primaryImage = item.GetImageInfo(ImageType.Primary, 0) ??
|
||||
item.Parents.Select(i => i.GetImageInfo(ImageType.Primary, 0)).FirstOrDefault(i => i != null);
|
||||
|
||||
if (primaryImage != null)
|
||||
{
|
||||
state.AlbumCoverPath = primaryImage.Path;
|
||||
}
|
||||
|
||||
var mediaSources = await _mediaSourceManager.GetPlayackMediaSources(request.ItemId, null, false, new[] { MediaType.Audio, MediaType.Video }, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
var mediaSource = string.IsNullOrEmpty(request.MediaSourceId)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue