diff --git a/ChangeLog b/ChangeLog index 4f916b0bc..c48cfff32 100644 --- a/ChangeLog +++ b/ChangeLog @@ -76,6 +76,8 @@ workaround applied - revert this before requesting data. 48. When reading mpd.conf file, if bind_to_address is set to "any", then use default of "locahost". +49. Fix noticing of tag chages when MPD database is updated. When comparing + songs need to check all fields - not just filename! 0.7.1 ----- diff --git a/mpd/song.cpp b/mpd/song.cpp index 5bad9078c..8c09c58f8 100644 --- a/mpd/song.cpp +++ b/mpd/song.cpp @@ -75,41 +75,57 @@ Song & Song::operator=(const Song &s) bool Song::operator==(const Song &o) const { - return file == o.file; + return 0==compareTo(o); } bool Song::operator<(const Song &o) const +{ + return compareTo(o)<0; +} + +int Song::compareTo(const Song &o) const { bool sortDateBeforeAlbum=MusicLibraryItemAlbum::showDate(); int compare=albumArtist().localeAwareCompare(o.albumArtist()); if (0!=compare) { - return compare<0; + return compare; } if (sortDateBeforeAlbum && year!=o.year) { - return year