PDA

View Full Version : The case of the disappearing song



Steve Baumgarten
2004-04-18, 10:47
In playing around with the tag cache db the other day I was curious to see
what was in it, how rescans affected it, how it corresponded to what was
actually in my music library. So I did pulled down a playlist of all
songs and compared it to a find -name \*.mp3 run against my music
directory, and came across a difference: one song was missing.

Yet everything about the song looked fine; if I wiped the cache and
restarted with logging, I could see the server pick up and merge the song,
so there were no errors there. And in fact if I put just that song in a
directory all by itself, pointed the server at that directory and told it
to rescan, it showed up in all listings just fine. I could also see the
song saved out in slimserver.db (via editing the file in emacs), right
there along with the other 4500 songs in my library. Yet when I clicked
on the album in the web interface, the song wasn't there.

You may guess what had happened: that both this track and another had been
assigned track number 4, and because of that only the other was showing up
in any and all listings generated by the server -- even though the song I
was looking for was definitely picked up by a rescan.

I think I remember reading here that songs were indexed by album name and
track number -- that's when the light bulb click on and I double-checked
all the songs in that album and found the "problem".

But should it really have been a problem?

It seems to me that it would be better to use track number only for
puposes of ordering songs -- not for determining how many unique songs are
associated with each album. I'd think that album/song name would be
better and less likely to cause this kind of conflict (or "hiding", I
suppose).

In any event, nothing in the log indicated that there was a duplicate
track number issue, making the problem just slightly harder to debug than
it might have been. If I'd seen a message indicating "duplicate track
number" or something like that, I'd have saved a half hour or so of
detective work.

SBB