diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-09-13 14:41:48 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-09-13 14:41:48 -0400 |
| commit | 38fe239f4490eb4bf839e9b872f7d9c8172decf9 (patch) | |
| tree | 8637dc9f758d709259d405109472b5c78d5b5472 /MediaBrowser.Controller/Entities/Audio | |
| parent | ca1ab81d3c9993542276f58b435a308c4590434c (diff) | |
3.2.30.19
Diffstat (limited to 'MediaBrowser.Controller/Entities/Audio')
| -rw-r--r-- | MediaBrowser.Controller/Entities/Audio/Audio.cs | 48 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs | 9 |
2 files changed, 18 insertions, 39 deletions
diff --git a/MediaBrowser.Controller/Entities/Audio/Audio.cs b/MediaBrowser.Controller/Entities/Audio/Audio.cs index 3ebf4da009..02a9f15a95 100644 --- a/MediaBrowser.Controller/Entities/Audio/Audio.cs +++ b/MediaBrowser.Controller/Entities/Audio/Audio.cs @@ -154,46 +154,28 @@ namespace MediaBrowser.Controller.Entities.Audio { var list = base.GetUserDataKeys(); - if (ConfigurationManager.Configuration.EnableStandaloneMusicKeys) - { - var songKey = IndexNumber.HasValue ? IndexNumber.Value.ToString("0000") : string.Empty; - - - if (ParentIndexNumber.HasValue) - { - songKey = ParentIndexNumber.Value.ToString("0000") + "-" + songKey; - } - songKey += Name; + var songKey = IndexNumber.HasValue ? IndexNumber.Value.ToString("0000") : string.Empty; - if (!string.IsNullOrWhiteSpace(Album)) - { - songKey = Album + "-" + songKey; - } - - var albumArtist = AlbumArtists.Length == 0 ? null : AlbumArtists[0]; - if (!string.IsNullOrWhiteSpace(albumArtist)) - { - songKey = albumArtist + "-" + songKey; - } - list.Insert(0, songKey); - } - else + if (ParentIndexNumber.HasValue) { - var parent = AlbumEntity; + songKey = ParentIndexNumber.Value.ToString("0000") + "-" + songKey; + } + songKey += Name; - if (parent != null && IndexNumber.HasValue) - { - list.InsertRange(0, parent.GetUserDataKeys().Select(i => - { - var songKey = (ParentIndexNumber != null ? ParentIndexNumber.Value.ToString("0000 - ") : "") - + IndexNumber.Value.ToString("0000 - "); + if (!string.IsNullOrWhiteSpace(Album)) + { + songKey = Album + "-" + songKey; + } - return i + songKey; - })); - } + var albumArtist = AlbumArtists.Length == 0 ? null : AlbumArtists[0]; + if (!string.IsNullOrWhiteSpace(albumArtist)) + { + songKey = albumArtist + "-" + songKey; } + list.Insert(0, songKey); + return list; } diff --git a/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs b/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs index 7af8161cab..acda9ae02b 100644 --- a/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs +++ b/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs @@ -145,13 +145,10 @@ namespace MediaBrowser.Controller.Entities.Audio { var list = base.GetUserDataKeys(); - if (ConfigurationManager.Configuration.EnableStandaloneMusicKeys) + var albumArtist = AlbumArtist; + if (!string.IsNullOrWhiteSpace(albumArtist)) { - var albumArtist = AlbumArtist; - if (!string.IsNullOrWhiteSpace(albumArtist)) - { - list.Insert(0, albumArtist + "-" + Name); - } + list.Insert(0, albumArtist + "-" + Name); } var id = this.GetProviderId(MetadataProviders.MusicBrainzAlbum); |
