From 8c64af83cdb12f92d22fe21387d7296033bdd0d5 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 10 Aug 2013 09:22:13 -0400 Subject: [PATCH] fixed albums displaying wrong name --- .../Music/AlbumInfoFromSongProvider.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/MediaBrowser.Providers/Music/AlbumInfoFromSongProvider.cs b/MediaBrowser.Providers/Music/AlbumInfoFromSongProvider.cs index 3abdf8a27..245426335 100644 --- a/MediaBrowser.Providers/Music/AlbumInfoFromSongProvider.cs +++ b/MediaBrowser.Providers/Music/AlbumInfoFromSongProvider.cs @@ -25,6 +25,22 @@ namespace MediaBrowser.Providers.Music return item is MusicAlbum; } + protected override bool RefreshOnVersionChange + { + get + { + return true; + } + } + + protected override string ProviderVersion + { + get + { + return "1"; + } + } + protected override bool NeedsRefreshInternal(BaseItem item, BaseProviderInfo providerInfo) { // If song metadata has changed @@ -83,7 +99,7 @@ namespace MediaBrowser.Providers.Music if (!item.LockedFields.Contains(MetadataFields.Name)) { - var name = songs.Select(i => i.Name).FirstOrDefault(i => !string.IsNullOrEmpty(i)); + var name = songs.Select(i => i.Album).FirstOrDefault(i => !string.IsNullOrEmpty(i)); if (!string.IsNullOrEmpty(name)) {