From a82fc184d5e7f5aa0849f02f572bdb05b7b5d12c Mon Sep 17 00:00:00 2001 From: Eric Reed Date: Thu, 14 Mar 2013 15:31:52 -0400 Subject: [PATCH] Fix exception in LastfmBaseProvider.cs --- MediaBrowser.Controller/Providers/Music/LastfmBaseProvider.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MediaBrowser.Controller/Providers/Music/LastfmBaseProvider.cs b/MediaBrowser.Controller/Providers/Music/LastfmBaseProvider.cs index 97bfa45703..ff4e66da0f 100644 --- a/MediaBrowser.Controller/Providers/Music/LastfmBaseProvider.cs +++ b/MediaBrowser.Controller/Providers/Music/LastfmBaseProvider.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Net; using MediaBrowser.Common.Net; +using MediaBrowser.Common.Extensions; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Entities; using MediaBrowser.Model.Entities; @@ -228,7 +229,8 @@ namespace MediaBrowser.Controller.Providers.Music cancellationToken.ThrowIfCancellationRequested(); - if (!ConfigurationManager.Configuration.SaveLocalMeta || !HasLocalMeta(item) || (force && !HasLocalMeta(item)) || (RefreshOnVersionChange && item.ProviderData[Id].ProviderVersion != ProviderVersion)) + var providerData = item.ProviderData.GetValueOrDefault(Id, new BaseProviderInfo { ProviderId = Id }); + if (!ConfigurationManager.Configuration.SaveLocalMeta || !HasLocalMeta(item) || (force && !HasLocalMeta(item)) || (RefreshOnVersionChange && providerData.ProviderVersion != ProviderVersion)) { try {