[Patch] Fix collection tree crashes when handling compilations

Aneurin Price aneurin.price at gmail.com
Fri Feb 29 19:09:14 CET 2008


This patch fixes crashes when editing tags for 'Various Artists' albums, 
and when adding them to the playlist either by dragging or using the 
context menu. As suggested by Max, the AlbumQueryMode is set to 
OnlyCompilations when data() is null, in order to prevent the query 
returning all other albums when the base 'Various Artists' entry is 
selected.

Currently the track list returned when using the context menu is in a 
seemingly random order. The order is as expected when dragging and 
dropping, and I don't believe this is caused by this patch (seems to 
happen sometimes for normal albums as well, but I haven't looked into why).

Since we have three identical code blocks here, I'm tempted to say it 
should be refactored into one method, but for the moment I'm trying to 
keep the changes to a minimum.

Thanks to Max and Nikolaj for the pointers.

- Nye

-------------- next part --------------
A non-text attachment was scrubbed...
Name: collection-tree-compilation-fix.diff
Type: text/x-diff
Size: 2377 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/amarok-devel/attachments/20080229/8841a003/attachment.bin 


More information about the Amarok-devel mailing list