From 413febb8313d254a0ee4e649222b774e4972c93e Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 25 Apr 2013 21:52:29 -0400 Subject: [PATCH] add artist links on song page --- .../ScheduledTasks/AudioImagesTask.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/MediaBrowser.Server.Implementations/ScheduledTasks/AudioImagesTask.cs b/MediaBrowser.Server.Implementations/ScheduledTasks/AudioImagesTask.cs index 66ca9db9a5..4d323ebd0d 100644 --- a/MediaBrowser.Server.Implementations/ScheduledTasks/AudioImagesTask.cs +++ b/MediaBrowser.Server.Implementations/ScheduledTasks/AudioImagesTask.cs @@ -95,14 +95,16 @@ namespace MediaBrowser.Server.Implementations.ScheduledTasks progress.Report(0); var numComplete = 0; - + foreach (var item in items) { cancellationToken.ThrowIfCancellationRequested(); var album = item.Parent as MusicAlbum; - var filename = album != null && string.IsNullOrEmpty(item.Album + album.DateModified.Ticks) ? (item.Id.ToString() + item.DateModified.Ticks) : item.Album; + var filename = item.Album ?? string.Empty; + + filename += album == null ? item.Id.ToString() + item.DateModified.Ticks : album.Id.ToString() + album.DateModified.Ticks; var path = ImageCache.GetResourcePath(filename + "_primary", ".jpg"); @@ -142,7 +144,7 @@ namespace MediaBrowser.Server.Implementations.ScheduledTasks percent /= items.Count; progress.Report(100 * percent); - + if (success) { // Image is already in the cache