|
@@ -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;
|
|
|
}
|
|
|
|