Amarok 1.4 collection and artwork importing

Jeff Mitchell mitchell at kde.org
Sat Oct 31 07:43:47 UTC 2009


Pedro de Carvalho Gomes wrote:
> OK, I think I finally got it. For each statistic row I get from A1, I
> should check if there is already an entry with the same url at the url
> table. If there isn't, create a new entry at url table only

No, you shouldn't touch the URL table.

The user should scan the files into A2, which will populate the URL
table. Then the importer should be run, which should check for identical
file URLs using the URL table, and if found, should add the track to the
statistics table.

Note that it's valid to correlate statistics to URL entries that are not
currently scanned into the collection, since the URL table doesn't clear
these out (on purpose)...this is why the intended behavior of the
previous patch was not correct. However, given that they will most
likely be running this at the time of switching from A1 to A2 (since it
doesn't make much sense at any other time), it is reasonable to make an
assumption that the URLs of their songs will stay consistent in the
interim five minutes.

I say "intended behavior" because I just checked the code for
SqlCollection's implementation of inCollection(), which is "return
true;". So putting the inCollection statements in your previous patch
was wrong in intent, but less wrong in execution  :-)

--Jeff

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://mail.kde.org/pipermail/amarok/attachments/20091031/f0152def/attachment.sig>


More information about the Amarok mailing list