mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-15 18:08:53 -07:00
move music video dto code to right method
This commit is contained in:
parent
5435c66c52
commit
ea936ab489
@ -707,25 +707,25 @@ namespace MediaBrowser.Controller.Dto
|
||||
|
||||
if (musicVideo != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(musicVideo.Album))
|
||||
{
|
||||
var parentAlbum = _libraryManager.RootFolder
|
||||
.RecursiveChildren
|
||||
.OfType<MusicAlbum>()
|
||||
.FirstOrDefault(i => string.Equals(i.Name, musicVideo.Album, StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
if (parentAlbum != null)
|
||||
{
|
||||
dto.AlbumId = GetClientItemId(parentAlbum);
|
||||
}
|
||||
}
|
||||
|
||||
SetMusicVideoProperties(dto, musicVideo);
|
||||
}
|
||||
}
|
||||
|
||||
private void SetMusicVideoProperties(BaseItemDto dto, MusicVideo item)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(item.Album))
|
||||
{
|
||||
var parentAlbum = _libraryManager.RootFolder
|
||||
.RecursiveChildren
|
||||
.OfType<MusicAlbum>()
|
||||
.FirstOrDefault(i => string.Equals(i.Name, item.Album, StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
if (parentAlbum != null)
|
||||
{
|
||||
dto.AlbumId = GetClientItemId(parentAlbum);
|
||||
}
|
||||
}
|
||||
|
||||
dto.Album = item.Album;
|
||||
dto.Artists = string.IsNullOrEmpty(item.Artist) ? new string[] { } : new[] { item.Artist };
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user