Julien Cubizolles
2016-04-22 08:22:58 UTC
I just noticed a very weird behaviour where emms-cache-set-from-mpd-all
sometimes misses a "title" field for a song and each of the following entries
get the title from the previous one...
To make it clearer, consider the following mpd tag_cache entries:
--8<---------------cut here---------------start------------->8---
song_begin: 13 Melody Dean.ogg
Time: 242.499000
Artist: Amanda Palmer & The Grand Theft Orchestra
ArtistSort: Palmer, Amanda & Grand Theft Orchestra, The
Album: Theatre Is Evil
AlbumArtistSort: Palmer, Amanda & Grand Theft Orchestra, The
Title: Melody Dean
Track: 13
Date: 2012-09-10
Disc: 1
MUSICBRAINZ_ARTISTID: 3c0eb318-d2ba-45aa-9077-b83746cc56da
MUSICBRAINZ_ALBUMID: 7acc4d65-7996-4909-b290-81c066926814
MUSICBRAINZ_ALBUMARTISTID: 3c0eb318-d2ba-45aa-9077-b83746cc56da
MUSICBRAINZ_TRACKID: a7c661ac-02e1-4f58-8aa7-f90b03a4a7a5
Date: 2012
AlbumArtist: Amanda Palmer & The Grand Theft Orchestra
mtime: 1461228248
song_end
song_begin: 14 Berlin.ogg
Time: 437.903000
Album: Theatre Is Evil
AlbumArtist: Amanda Palmer & The Grand Theft Orchestra
AlbumArtistSort: Palmer, Amanda & Grand Theft Orchestra, The
Artist: Amanda Palmer & The Grand Theft Orchestra
ArtistSort: Palmer, Amanda & Grand Theft Orchestra, The
Date: 2012-09-10
Disc: 1
MUSICBRAINZ_ALBUMARTISTID: 3c0eb318-d2ba-45aa-9077-b83746cc56da
MUSICBRAINZ_ALBUMID: 7acc4d65-7996-4909-b290-81c066926814
MUSICBRAINZ_ARTISTID: 3c0eb318-d2ba-45aa-9077-b83746cc56da
MUSICBRAINZ_TRACKID: b6bd07e7-fa1d-43e7-97c8-ac590cdc37c2
Title: Berlin
Track: 14
mtime: 1461228268
song_end
song_begin: 15 Olly Olly Oxen Free.ogg
Time: 246.379000
Album: Theatre Is Evil
AlbumArtist: Amanda Palmer & The Grand Theft Orchestra
AlbumArtistSort: Palmer, Amanda & Grand Theft Orchestra, The
Artist: Amanda Palmer & The Grand Theft Orchestra
ArtistSort: Palmer, Amanda & Grand Theft Orchestra, The
Date: 2012-09-10
Disc: 1
MUSICBRAINZ_ALBUMARTISTID: 3c0eb318-d2ba-45aa-9077-b83746cc56da
MUSICBRAINZ_ALBUMID: 7acc4d65-7996-4909-b290-81c066926814
MUSICBRAINZ_ARTISTID: 3c0eb318-d2ba-45aa-9077-b83746cc56da
MUSICBRAINZ_TRACKID: df2ed938-c1ef-4ec8-b103-cb674b75d855
Title: Olly Olly Oxen Free
Track: 15
mtime: 1461228277
song_end
--8<---------------cut here---------------end--------------->8---
The corresponding entries in emms cache are (note that they are in
reverse order): the "first" one (the last in the tag_cache) has somehow
gotten the info-title, info-track-number and info-artist (not a problem
here) that the second one should have. And all the remaining entries of
the mpd tag_cache are affected, getting the wrong artist, title and
track number.
--8<---------------cut here---------------start------------->8---
(puthash "/var/lib/mpd/music/NAS/Synology/BEETS/Amanda Palmer & The Grand Theft Orchestra/Theatre Is Evil/15 Olly Olly Oxen Free.ogg" '(*track* (type . file) (name . "/var/lib/mpd/music/NAS/Synology/BEETS/Amanda Palmer & The Grand Theft Orchestra/Theatre Is Evil/15 Olly Olly Oxen Free.ogg") (info-album . "Theatre Is Evil") (info-playing-time . 246) (info-tracknumber . "14") (info-title . "Berlin") (info-year . "2012-09-10") (info-artist . "Amanda Palmer & The Grand Theft Orchestra")) emms-cache-db)
(puthash "/var/lib/mpd/music/NAS/Synology/BEETS/Amanda Palmer & The Grand Theft Orchestra/Theatre Is Evil/14 Berlin.ogg" '(*track* (type . file) (name . "/var/lib/mpd/music/NAS/Synology/BEETS/Amanda Palmer & The Grand Theft Orchestra/Theatre Is Evil/14 Berlin.ogg") (info-album . "Theatre Is Evil") (info-playing-time . 438) (info-year . "2012")) emms-cache-db)
(puthash "/var/lib/mpd/music/NAS/Synology/BEETS/Amanda Palmer & The Grand Theft Orchestra/Theatre Is Evil/13 Melody Dean.ogg" '(*track* (type . file) (name . "/var/lib/mpd/music/NAS/Synology/BEETS/Amanda Palmer & The Grand Theft Orchestra/Theatre Is Evil/13 Melody Dean.ogg") (info-year . "2012-09-10") (info-tracknumber . "13") (info-title . "Melody Dean") (info-album . "Theatre Is Evil") (info-artist . "Amanda Palmer & The Grand Theft Orchestra") (info-playing-time . 242)) emms-cache-db)
--8<---------------cut here---------------end--------------->8---
The problem remains when I only include this particular album in the mpd
database. I'm using the latest emms from git.
Julien.
sometimes misses a "title" field for a song and each of the following entries
get the title from the previous one...
To make it clearer, consider the following mpd tag_cache entries:
--8<---------------cut here---------------start------------->8---
song_begin: 13 Melody Dean.ogg
Time: 242.499000
Artist: Amanda Palmer & The Grand Theft Orchestra
ArtistSort: Palmer, Amanda & Grand Theft Orchestra, The
Album: Theatre Is Evil
AlbumArtistSort: Palmer, Amanda & Grand Theft Orchestra, The
Title: Melody Dean
Track: 13
Date: 2012-09-10
Disc: 1
MUSICBRAINZ_ARTISTID: 3c0eb318-d2ba-45aa-9077-b83746cc56da
MUSICBRAINZ_ALBUMID: 7acc4d65-7996-4909-b290-81c066926814
MUSICBRAINZ_ALBUMARTISTID: 3c0eb318-d2ba-45aa-9077-b83746cc56da
MUSICBRAINZ_TRACKID: a7c661ac-02e1-4f58-8aa7-f90b03a4a7a5
Date: 2012
AlbumArtist: Amanda Palmer & The Grand Theft Orchestra
mtime: 1461228248
song_end
song_begin: 14 Berlin.ogg
Time: 437.903000
Album: Theatre Is Evil
AlbumArtist: Amanda Palmer & The Grand Theft Orchestra
AlbumArtistSort: Palmer, Amanda & Grand Theft Orchestra, The
Artist: Amanda Palmer & The Grand Theft Orchestra
ArtistSort: Palmer, Amanda & Grand Theft Orchestra, The
Date: 2012-09-10
Disc: 1
MUSICBRAINZ_ALBUMARTISTID: 3c0eb318-d2ba-45aa-9077-b83746cc56da
MUSICBRAINZ_ALBUMID: 7acc4d65-7996-4909-b290-81c066926814
MUSICBRAINZ_ARTISTID: 3c0eb318-d2ba-45aa-9077-b83746cc56da
MUSICBRAINZ_TRACKID: b6bd07e7-fa1d-43e7-97c8-ac590cdc37c2
Title: Berlin
Track: 14
mtime: 1461228268
song_end
song_begin: 15 Olly Olly Oxen Free.ogg
Time: 246.379000
Album: Theatre Is Evil
AlbumArtist: Amanda Palmer & The Grand Theft Orchestra
AlbumArtistSort: Palmer, Amanda & Grand Theft Orchestra, The
Artist: Amanda Palmer & The Grand Theft Orchestra
ArtistSort: Palmer, Amanda & Grand Theft Orchestra, The
Date: 2012-09-10
Disc: 1
MUSICBRAINZ_ALBUMARTISTID: 3c0eb318-d2ba-45aa-9077-b83746cc56da
MUSICBRAINZ_ALBUMID: 7acc4d65-7996-4909-b290-81c066926814
MUSICBRAINZ_ARTISTID: 3c0eb318-d2ba-45aa-9077-b83746cc56da
MUSICBRAINZ_TRACKID: df2ed938-c1ef-4ec8-b103-cb674b75d855
Title: Olly Olly Oxen Free
Track: 15
mtime: 1461228277
song_end
--8<---------------cut here---------------end--------------->8---
The corresponding entries in emms cache are (note that they are in
reverse order): the "first" one (the last in the tag_cache) has somehow
gotten the info-title, info-track-number and info-artist (not a problem
here) that the second one should have. And all the remaining entries of
the mpd tag_cache are affected, getting the wrong artist, title and
track number.
--8<---------------cut here---------------start------------->8---
(puthash "/var/lib/mpd/music/NAS/Synology/BEETS/Amanda Palmer & The Grand Theft Orchestra/Theatre Is Evil/15 Olly Olly Oxen Free.ogg" '(*track* (type . file) (name . "/var/lib/mpd/music/NAS/Synology/BEETS/Amanda Palmer & The Grand Theft Orchestra/Theatre Is Evil/15 Olly Olly Oxen Free.ogg") (info-album . "Theatre Is Evil") (info-playing-time . 246) (info-tracknumber . "14") (info-title . "Berlin") (info-year . "2012-09-10") (info-artist . "Amanda Palmer & The Grand Theft Orchestra")) emms-cache-db)
(puthash "/var/lib/mpd/music/NAS/Synology/BEETS/Amanda Palmer & The Grand Theft Orchestra/Theatre Is Evil/14 Berlin.ogg" '(*track* (type . file) (name . "/var/lib/mpd/music/NAS/Synology/BEETS/Amanda Palmer & The Grand Theft Orchestra/Theatre Is Evil/14 Berlin.ogg") (info-album . "Theatre Is Evil") (info-playing-time . 438) (info-year . "2012")) emms-cache-db)
(puthash "/var/lib/mpd/music/NAS/Synology/BEETS/Amanda Palmer & The Grand Theft Orchestra/Theatre Is Evil/13 Melody Dean.ogg" '(*track* (type . file) (name . "/var/lib/mpd/music/NAS/Synology/BEETS/Amanda Palmer & The Grand Theft Orchestra/Theatre Is Evil/13 Melody Dean.ogg") (info-year . "2012-09-10") (info-tracknumber . "13") (info-title . "Melody Dean") (info-album . "Theatre Is Evil") (info-artist . "Amanda Palmer & The Grand Theft Orchestra") (info-playing-time . 242)) emms-cache-db)
--8<---------------cut here---------------end--------------->8---
The problem remains when I only include this particular album in the mpd
database. I'm using the latest emms from git.
Julien.