Skip to content

Commit

Permalink
Corrected change log
Browse files Browse the repository at this point in the history
  • Loading branch information
raphgodart committed Jul 7, 2017
1 parent 65025ca commit 0723a3f
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Dopamine.Common/Services/Playback/PlaybackService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ public async Task UpdateQueueOrderAsync(List<KeyValuePair<string, PlayableTrack>

public async Task UpdateQueueMetadataAsync(List<FileMetadata> 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());
Expand Down
42 changes: 29 additions & 13 deletions Dopamine.Common/Services/Playback/QueueManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,41 +30,46 @@ public OrderedDictionary<string, PlayableTrack> Queue
#region Private
private bool UpdateTrackPlaybackInfo(PlayableTrack track, FileMetadata fileMetadata)
{
bool isPlaybackInfoUpdated = false;
bool isDisplayedPlaybackInfoChanged = false;

try
{
// Only update the properties that are displayed on Now Playing screens
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)
{
LogClient.Error("Could not update the track metadata. Exception: {0}", ex.Message);
}

return isPlaybackInfoUpdated;
return isDisplayedPlaybackInfoChanged;
}
#endregion

Expand Down Expand Up @@ -545,7 +550,7 @@ await Task.Run(() =>
return isSuccess;
}

public async Task<UpdateQueueMetadataResult> UpdateQueueMetadataAsync(List<FileMetadata> fileMetadatas)
public async Task<UpdateQueueMetadataResult> UpdateMetadataAsync(List<FileMetadata> fileMetadatas)
{
var result = new UpdateQueueMetadataResult();

Expand All @@ -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;
}
}
});
Expand Down
12 changes: 6 additions & 6 deletions Dopamine/Changelog.txt
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Dopamine/Dopamine.wxs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<?define Version="1.3.0.926" ?>
<?define Version="1.3.0.927" ?>
<?define Manufacturer="Digimezzo" ?>
<?define Product="Dopamine" ?>
<?define ProductCab="Dopamine.cab" ?>
Expand Down
8 changes: 4 additions & 4 deletions Dopamine/SharedAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 0723a3f

Please sign in to comment.