diff --git a/Dopamine.Common/Services/Playback/PlaybackService.cs b/Dopamine.Common/Services/Playback/PlaybackService.cs index 45b5b5723..47590ded9 100644 --- a/Dopamine.Common/Services/Playback/PlaybackService.cs +++ b/Dopamine.Common/Services/Playback/PlaybackService.cs @@ -403,7 +403,7 @@ public async Task UpdateQueueOrderAsync(List public async Task UpdateQueueMetadataAsync(List fileMetadatas) { - UpdateQueueMetadataResult result = await this.queueManager.UpdateQueueMetadataAsync(fileMetadatas); + UpdateQueueMetadataResult result = await this.queueManager.UpdateMetadataAsync(fileMetadatas); // Raise events if (result.IsPlayingTrackPlaybackInfoChanged) this.PlayingTrackPlaybackInfoChanged(this, new EventArgs()); diff --git a/Dopamine.Common/Services/Playback/QueueManager.cs b/Dopamine.Common/Services/Playback/QueueManager.cs index cf85d9307..dbd995623 100644 --- a/Dopamine.Common/Services/Playback/QueueManager.cs +++ b/Dopamine.Common/Services/Playback/QueueManager.cs @@ -30,7 +30,7 @@ public OrderedDictionary Queue #region Private private bool UpdateTrackPlaybackInfo(PlayableTrack track, FileMetadata fileMetadata) { - bool isPlaybackInfoUpdated = false; + bool isDisplayedPlaybackInfoChanged = false; try { @@ -38,25 +38,30 @@ private bool UpdateTrackPlaybackInfo(PlayableTrack track, FileMetadata fileMetad if (fileMetadata.Title.IsValueChanged) { track.TrackTitle = fileMetadata.Title.Value; - isPlaybackInfoUpdated = true; + isDisplayedPlaybackInfoChanged = true; } if (fileMetadata.Artists.IsValueChanged) { track.ArtistName = fileMetadata.Artists.Values.FirstOrDefault(); - isPlaybackInfoUpdated = true; + isDisplayedPlaybackInfoChanged = true; } if (fileMetadata.Year.IsValueChanged) { track.Year = fileMetadata.Year.Value.SafeConvertToLong(); - isPlaybackInfoUpdated = true; + isDisplayedPlaybackInfoChanged = true; } if (fileMetadata.Album.IsValueChanged) { track.AlbumTitle = fileMetadata.Album.Value; - isPlaybackInfoUpdated = true; + isDisplayedPlaybackInfoChanged = true; + } + + if (fileMetadata.ArtworkData.IsValueChanged) + { + isDisplayedPlaybackInfoChanged = true; } } catch (Exception ex) @@ -64,7 +69,7 @@ private bool UpdateTrackPlaybackInfo(PlayableTrack track, FileMetadata fileMetad LogClient.Error("Could not update the track metadata. Exception: {0}", ex.Message); } - return isPlaybackInfoUpdated; + return isDisplayedPlaybackInfoChanged; } #endregion @@ -545,7 +550,7 @@ await Task.Run(() => return isSuccess; } - public async Task UpdateQueueMetadataAsync(List fileMetadatas) + public async Task UpdateMetadataAsync(List fileMetadatas) { var result = new UpdateQueueMetadataResult(); @@ -555,20 +560,31 @@ await Task.Run(() => { if (this.Queue != null) { - bool isQueueChanged = false; - foreach (PlayableTrack track in this.queue.Values) { FileMetadata fmd = fileMetadatas.Select(f => f).Where(f => f.SafePath == track.SafePath).FirstOrDefault(); if (fmd != null) { - this.UpdateTrackPlaybackInfo(track, fmd); - isQueueChanged = true; + // Queue + if (this.UpdateTrackPlaybackInfo(track, fmd)) + { + result.IsQueueChanged = true; + + // Playing track + if (track.SafePath.Equals(this.currentTrack.Value.SafePath)) + { + result.IsPlayingTrackPlaybackInfoChanged = true; + + // Playing track artwork + if (fmd.ArtworkData.IsValueChanged) + { + result.IsPlayingTrackArtworkChanged = true; + } + } + } } } - - if (isQueueChanged) result.IsQueueChanged = true; } } }); diff --git a/Dopamine/Changelog.txt b/Dopamine/Changelog.txt index 2ed10d42d..d6638d793 100644 --- a/Dopamine/Changelog.txt +++ b/Dopamine/Changelog.txt @@ -1,14 +1,14 @@ -2017-07-06: Dopamine 1.3 Build 926 (Release) +2017-07-07: Dopamine 1.3 Build 927 (Release) -------------------------------------------- Disclaimer: Playlist support was rewritten from scratch. Your existing playlists will not be migrated. -Save you playlists to files manually before upgrading to this version. Import your saved +Save your playlists to files manually before upgrading to this version. Import your saved playlists after upgrading to this version. - [Added] Added a button to export album and song covers to files -- [Added] Added option to switch between 4 styles of spectrum analyzers +- [Added] Added an option to switch between 4 styles of spectrum analyzers - [Added] Smoother list animations - [Added] Added extra album sorting option "By date created" - [Added] Added optional play count, skip count and date last played column to the songs screen @@ -26,8 +26,8 @@ playlists after upgrading to this version. - [Changed] Lyrics are not downloaded anymore when the lyrics screen is not visible - [Changed] When using "Loop one", pressing Previous or Next now skips to the previous or next song. - [Changed] Playlists support has been rewritten: playlists are now saved to files automatically. -- [Changed] 'Cloud' screen was renamed to 'Frequent' and the layout was changed -- [Changed] Song title on playback info panes now scales to the available width +- [Changed] The 'Cloud' screen was renamed to 'Frequent' and the layout was changed +- [Changed] The song title on playback info panes now scales to the available width - [Changed] Updated the Swedish translation - [Changed] Updated the Spanish translation - [Changed] Updated the French translation @@ -43,7 +43,7 @@ playlists after upgrading to this version. - [Fixed] Blurry context menu, notification window and tooltips at desktop scaling higher as 100% - [Fixed] Timestamped lyrics for songs longer than 1 hour don't work - [Fixed] Audio files which reside on a NAS cannot be played from playlists -- [Fixed] Dopamine process remains active in Task Manager after a controlled crash +- [Fixed] Dopamine process remains active in Task Manager after a crash - [Fixed] Tray controls are positioned outside of the screen when using desktop scaling > 100% - [Fixed] Fixed an occasional crash which happened when automatically scrolling to the playing song - [Fixed] Mini player windows are buggy in Windows 10 tablet mode diff --git a/Dopamine/Dopamine.wxs b/Dopamine/Dopamine.wxs index b88eea588..712194706 100644 --- a/Dopamine/Dopamine.wxs +++ b/Dopamine/Dopamine.wxs @@ -1,5 +1,5 @@ - + diff --git a/Dopamine/SharedAssemblyInfo.cs b/Dopamine/SharedAssemblyInfo.cs index 8b630a434..2930b5d71 100644 --- a/Dopamine/SharedAssemblyInfo.cs +++ b/Dopamine/SharedAssemblyInfo.cs @@ -2,11 +2,11 @@ [assembly: AssemblyCompany("Digimezzo")] [assembly: AssemblyCopyright("Copyright Digimezzo © 2014 - 2017")] -[assembly: AssemblyVersion("1.3.0.926")] -[assembly: AssemblyFileVersion("1.3.0.926")] +[assembly: AssemblyVersion("1.3.0.927")] +[assembly: AssemblyFileVersion("1.3.0.927")] #if DEBUG -[assembly: AssemblyInformationalVersion("1.3.0.926 Preview")] +[assembly: AssemblyInformationalVersion("1.3.0.927 Preview")] #else -[assembly: AssemblyInformationalVersion("1.3.0.926")] +[assembly: AssemblyInformationalVersion("1.3.0.927")] #endif