Skip to content

Commit

Permalink
reuse album art url if its the same album
Browse files Browse the repository at this point in the history
  • Loading branch information
PKBeam committed Mar 2, 2024
1 parent 44c2490 commit c0466ed
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions AMWin-RichPresence/AppleMusicClientScraper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ public void Refresh(object? source, ElapsedEventArgs? e) {
// if this is a new song, clear out the current song
var newSong = new AppleMusicInfo(songName, songAlbumArtist, songAlbum, songArtist);
if (currentSong != newSong) {
// keep the same album art if it's another song in the same album
if (newSong.SongAlbum == currentSong?.SongAlbum && newSong.SongArtist == currentSong?.SongArtist) {
newSong.CoverArtUrl = currentSong.CoverArtUrl;
}
currentSong = newSong;
}

Expand Down

0 comments on commit c0466ed

Please sign in to comment.