Bug 254411 - Drag and drop from collection to playlist create duplicates in playlist
Summary: Drag and drop from collection to playlist create duplicates in playlist
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Collection Browser (show other bugs)
Version: 2.5-git
Platform: Ubuntu Linux
: HI normal with 1 vote (vote)
Target Milestone: 2.6
Assignee: Amarok Developers
URL:
Keywords: regression
: 279744 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-10-16 21:52 UTC by Lukáš Karas
Modified: 2012-05-11 10:22 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.6


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lukáš Karas 2010-10-16 21:52:44 UTC
Version:           2.3.2 (using KDE 4.5.1) 
OS:                Linux

When is set collection grouping (Artist, Album), tree view is expanded (tracks in albums are visible) and all items in collection are select, it create duplicates when this view is draged to playlist.

Reproducible: Always

Steps to Reproduce:
Set grouping in collection (artist, album for example), expand some items, select all (ctrl+a) and grag selected items to playlist.

Actual Results:  
For expanded items is created duplicates in playlist. In collection view is selected album and all traks from it...

Expected Results:  
when I select album in collection view, I mean all tracks in album. When I select album and its tracks, I still mean only one copy of tracks.

It can be realized by option "remove duplicates when add new items to playlist"...
Comment 1 Myriam Schweingruber 2010-10-16 23:11:43 UTC
Confirmed in current 2.4-git. This only happens when one selects more than one album at a time, adding individual albums doesn't produce duplicates.
Comment 2 Ognyan Angelov 2010-12-06 23:40:55 UTC
Setup:
  Amarok 2.3.2
  KDE 4.4.5
Test Result:
  Confirm on 2.3.2.
Comment 3 Myriam Schweingruber 2012-01-01 12:24:41 UTC
*** Bug 279744 has been marked as a duplicate of this bug. ***
Comment 4 Myriam Schweingruber 2012-01-01 12:25:18 UTC
Is this still happening with Amarok 2.5?
Comment 5 Myriam Schweingruber 2012-01-03 08:52:47 UTC
Just tested here with Amarok 2.5 on KDE 4.8 RC1: selecting two albums, right click -> Add to playlist adds the complete collection!

It would be nice if somebody could test with Amarok 2.5 on KDE 4.7.x, I suspect KDE 4.8 to be the culprit.
Comment 6 Shlomi Fish 2012-01-15 14:58:49 UTC
(In reply to comment #5)
> Just tested here with Amarok 2.5 on KDE 4.8 RC1: selecting two albums, right
> click -> Add to playlist adds the complete collection!
> 
> It would be nice if somebody could test with Amarok 2.5 on KDE 4.7.x, I suspect
> KDE 4.8 to be the culprit.

For the record, this process only adds the two albums on KDE-4.7.97 (on Mageia Linux 2/Cauldron).

Regards,

-- Shlomi Fish
Comment 7 Matěj Laitl 2012-05-11 10:22:31 UTC
Git commit d47d8127cadd2affaf06f4d68f9250306f1379df by Matěj Laitl.
Committed on 09/05/2012 at 23:40.
Pushed by laitl into branch 'master'.

Collection browser: don't add duplicate tracks in mimeData

That could have happened when you selected e.g. both album and a track
from that album -> the track would be added twice.

The implemented algorithm is done at QModelIntex level and is O(n)
where n is the number of selected tracks so this should be okay.

There is an unrelated bug with the Various Artists item that behaves
as entire collection when dragged. This will be fixed soon.

BUGFIXES:
 * Don't add duplicates to playlist when dragging from collection
FIXED-IN: 2.6
DIGEST: Bugfix: Amarok now doesn't add unwanted duplicates to playlist

M  +1    -0    ChangeLog
M  +21   -3    src/browsers/CollectionTreeItemModelBase.cpp

http://commits.kde.org/amarok/d47d8127cadd2affaf06f4d68f9250306f1379df