Bug 187592

Summary: delete song doesn't work
Product: [Applications] amarok Reporter: Lydia Pintscher <lydia>
Component: Collection BrowserAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED FIXED    
Severity: normal CC: unnamedrambler, valentyn.pavliuchenko, Yannick.Roedl
Priority: NOR Keywords: junior-jobs
Version First Reported In: 2.1-SVN   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Patch for deleting files in Amarok2

Description Lydia Pintscher 2009-03-19 12:50:49 UTC
Deleting a song from the collection using the context menu action in the collection browser doesn't work.
Comment 1 Casey Link 2009-03-19 14:13:59 UTC
Can you check to see if the file is being deleted _from_ disk.

Likely you are seeing that the song entry isn't removed from the Collection Browser tree view, even though the file has been deleted from disk. 

If this is the case (which I think it is), then this is a bug somewhere in the collection model.
Comment 2 Yannick Rödl 2009-03-19 16:20:46 UTC
I think this Bug is located where the Database is updated.

Could bei in DatabaseUpdater.cpp or in SqlCollection.cpp in collection/sqlcollection.
Comment 3 Lydia Pintscher 2009-03-19 17:45:01 UTC
Casey: Sorry, should have been more specific. I delete a song with the context menu action. It does not go away from the collection browser. I drag it to the playlist and can play it just fine.
Comment 4 Valentyn Pavliuchenko 2009-03-20 20:59:07 UTC
Created attachment 32295 [details]
Patch for deleting files in Amarok2
Comment 5 Valentyn Pavliuchenko 2009-03-20 20:59:44 UTC
I confirm this bug on amarok SVN (rev 941944). I've found a reason of the bug and have posted a patch (look at attachement).
Comment 6 Valentyn Pavliuchenko 2009-03-21 21:30:31 UTC
Comments on patch:
File wasn't deleted from both collection and a disk because of incorrect result checking of delete confirmation dialog. It returns Cancel or Continue, but in code the return value was compared to Yes. So everything worked like the confirmation failed (user pressed Cancel) and nothing was done.
Comment 7 Mark Kretschmann 2009-03-22 08:28:13 UTC
SVN commit 942588 by markey:

Fix deleting tracks from the Collection browser.

Many thanks for the patch go to Valentin Pavlyuchenko
<TheValik@gmail.com>.

Please review and test this a bit, everyone (I'm not familiar with the
code).

BUG: 187592

 M  +1 -1      SqlCollection.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=942588