Summary: | files are not shown in collection, but will show up in a random playlist (with no metadata) | ||
---|---|---|---|
Product: | [Applications] amarok | Reporter: | Aran Cox <arancox> |
Component: | general | Assignee: | Amarok Developers <amarok-bugs-dist> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | adrian, dmeltzer.devel, sebstrand |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Aran Cox
2009-02-24 23:32:26 UTC
Can confirm. I've been looking into this myself lately... This may be obvious from the symptoms but I started poking around in the tables and it's easy to find the "missing" files in the urls table. They point to a row in the tracks table that contains essentially no information. I assume that when I rename the files amarok sees it as a completely new file and populates the database appropriately. It turns out I have 1742 tracks entries where the artist and album are 0 and the title is blank. The entries look like this: +------+------+--------+-------+-------+----------+------+-------+---------+-------------+------------+---------+--------+------------+----------+----------+------+------------+------------+-----------+---------------+-----------+---------------+ | id | url | artist | album | genre | composer | year | title | comment | tracknumber | discnumber | bitrate | length | samplerate | filesize | filetype | bpm | createdate | modifydate | albumgain | albumpeakgain | trackgain | trackpeakgain | +------+------+--------+-------+-------+----------+------+-------+---------+-------------+------------+---------+--------+------------+----------+----------+------+------------+------------+-----------+---------------+-----------+---------------+ | 7909 | 7796 | 0 | 0 | 0 | 0 | 0 | | | 0 | 0 | 128 | 174 | 44100 | 0 | 0 | 0 | 1235083375 | 1222370421 | NULL | NULL | NULL | NULL | +------+------+--------+-------+-------+----------+------+-------+---------+-------------+------------+---------+--------+------------+----------+----------+------+------------+------------+-----------+---------------+-----------+---------------+ Formerly I thought this only affect oggs and whole directories of them at that but looking at the database there are also flacs and mp3s with no metadata and it isn't always a whole directory. Since it could be useful to others, coping music files from 'musicfolder' (not by Ctrl+A, but using Shift) to 'musicfolder2', removing 'musicfolder' and renaming 'musicfolder2' as 'musicfolder' solved this problem for me. I can fix one directory at a time by opening the database with the mysqld daemon and using the mysql client to update the changedate for a directory to 10. (Would other values work, probably.) When mysql starts up the next time it updates the collection and the metadata gets populated correctly in the tracks table. This (very slow, I don't know if there is a more efficient method) query returns all the affected directories on my system: select id,dir from directories where id IN (select distinct directories.id from tracks,urls,directories where artist=0 and album=0 and tracks.url=urls.id and urls.directory=directories.id) order by id; I thought I could fix it with something like: update directories set changedate=10 where id IN (select distinct directories.id from tracks,urls,directories where artist=0 and album=0 and tracks.url=urls.id and urls.directory=directories.id); but I get a mysql error. I can easily write a script to get the list of directories ids one by one and update each in turn which I will probably do. *** This bug has been marked as a duplicate of bug 171418 *** I do not believe this bug is related to the one it was marked as a duplicate of. Perhaps my description was unclear. My dynamic playlist shows files that are in my collection, but do not have metadata in the tracks table so they show up without metadata in the dynamic playlist. This bug continues to bite me with SVN from yesterday. Tracks are continuously losing their metadata and I have to use one of the above mentioned tricks to get amarok to put the track metadata back into the database. It seems like I'm doing something wrong... or why else aren't many others noticing this? This happens to me as well. Amarok will spontaneously lose most of the metadata in the tracks-table for a file, rendering it invisible. These columns are NOT affected: id, url, bitrate, length, samplerate, createdate and modifydate. Every other column gets set to 0/null, although since I don't use replay gain the gain columns are probably always 0. I just checked and I currently have 14 affected files. I have been unable to notice any particular trigger for this; yesterday one of the tracks in my short dynamic playlist got reset while amarok was stopped and hidden. No files had been modified when it happened. This was a known bug for earlier version, it should be solved in version 2.1.1 Also there has been a lot of work done in 2.2-git, so this is certainly fixed. |