diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-07-22 20:03:33 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-07-22 20:03:33 -0400 |
| commit | ea936ab489a0a2ef023f5f752afdcc59ed866671 (patch) | |
| tree | 5b7b8baf8b8b539e6a1f3885ed7df97a46a307eb | |
| parent | 5435c66c5282cc07e4e33fbb9f66ee789d91e112 (diff) | |
move music video dto code to right method
| -rw-r--r-- | MediaBrowser.Controller/Dto/DtoBuilder.cs | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/MediaBrowser.Controller/Dto/DtoBuilder.cs b/MediaBrowser.Controller/Dto/DtoBuilder.cs index 30ff9eecc..078b3c664 100644 --- a/MediaBrowser.Controller/Dto/DtoBuilder.cs +++ b/MediaBrowser.Controller/Dto/DtoBuilder.cs @@ -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 }; } |
