Bug 227474 - Moving tracks in a saved playlist result in duplicate tracks
Summary: Moving tracks in a saved playlist result in duplicate tracks
Status: RESOLVED NOT A BUG
Alias: None
Product: amarok
Classification: Applications
Component: Playlists/Saved Playlists (show other bugs)
Version: 2.3-GIT
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: 2.4.0
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-18 08:28 UTC by Carlos Quiros
Modified: 2011-11-07 12:08 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Quiros 2010-02-18 08:28:59 UTC
Version:           2.2.2 (using KDE 4.4.0)
Compiler:          gcc (GCC) 4.3.3 -- cmake version 2.6-patch 2  -- QMake version 2.01a Using Qt version 4.6.1 (kde-qt) 
OS:                Linux
Installed from:    Compiled From Sources

I created a playlist using the "Save current playlist" button. This created a playlist in "Saved Playlists". Having a playlist with 20 items, if I want to move any item to a different position this result in a duplication of the same item. When I try to removed the duplicated items, Amarok removes other unselected items.

A second Bugs seems to appear. When having more the one playlists if I select an item of a play list and I use the popup menu to remove the item, the label "Remove from xxx" xxx does not change according to the playlist.


Amarok compiled from sources in a Slackware 13.0 distro.
Comment 1 Myriam Schweingruber 2010-02-18 09:25:18 UTC
Please only report one item per bug report. I guess you are moving tracks in the Saved Playlist view, right? 
FWIW, I can't reproduce the first part of your report here on Amarok 2.3-git so it is most likely already fixed, but the second part is confusing, since it doesn't actually remove an item but changes the name of the one I tried to remove when I try on a xspf playlist, and removes nothing when I try in a m3u playlist.
Comment 2 Carlos Quiros 2010-02-18 11:50:44 UTC
(In reply to comment #1)
> Please only report one item per bug report. I guess you are moving tracks in
> the Saved Playlist view, right? 
> FWIW, I can't reproduce the first part of your report here on Amarok 2.3-git so
> it is most likely already fixed, but the second part is confusing, since it
> doesn't actually remove an item but changes the name of the one I tried to
> remove when I try on a xspf playlist, and removes nothing when I try in a m3u
> playlist.

Some clarifications for the second bug:

I have three playslists (A, B and C). If if right-click on an item of playlist C the pop-up menu says: "Remove X song from C". Then if I go to playlist A and I right-click on any item of playlist A the pop-up menu says "Remove X song from C". So here instead of "C" it must say "A".

Hope is clear.
Comment 3 Bart Cerneels 2010-02-18 13:09:33 UTC
Second part of this bug report has been fixed already.

The first one is about dragging a track in a playlist onto the same playlist. This indeed duplicates the track. There is nothing wrong with having the same track in a playlist twice, just a bit uncommon. In any case I won't prevent it.
When a track is dropped onto the same playlist though there should be an exception, since that is obviously a move. I've lacked the time to look for a good technical solution before but will spend some effort on it tonight.
Comment 4 Bart Cerneels 2010-02-18 13:44:37 UTC
Seems like there are actually 3 issues in your report

1) See title of this report -> working on it.

2) removals fail -> investigating, need confirmation (in a new bug)

3) playlist name on remove action not updated -> fixed

Myriam: investigating your issue, it looks like it's just the view not updating correctly.
Comment 5 Myriam Schweingruber 2010-05-22 12:27:40 UTC
Changing target.
Comment 6 Pierre Dumuid 2010-09-15 04:17:55 UTC
Just an observation for those developers: The main playlist actually differentiates between remote and local drag operations.  See:

void Playlist::PrettyListView::dropEvent()

and once can observe  that if the event->source() is the same as the object itself, a move operation is performed instead of an insert.  I'm guessing the same code could possibly be re-used.  However, there are two other bugs that might be considered: Bug 170689, and Bug 251265.

I have tried to write a patch myself, but didn't succeed with the desired result but I thought I'd share the direction of my attempts.
Comment 7 Myriam Schweingruber 2011-09-26 15:33:19 UTC
Is this still valid with Amarok 2.4.3 or current git?
Comment 8 Myriam Schweingruber 2011-11-07 12:08:10 UTC
Closing for lack of feedback. Feel free to reopen if you can reproduce this with the latest stable or git build.