Bug 129136 - i can queue the same file more than once to be transfered to my media device
Summary: i can queue the same file more than once to be transfered to my media device
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Collections/Media Devices (show other bugs)
Version: unspecified
Platform: Slackware Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-14 12:22 UTC by solsTiCe
Modified: 2006-12-28 19:44 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description solsTiCe 2006-06-14 12:22:27 UTC
Version:           1.4-SVN-551276 (using KDE KDE 3.5.3)
Installed from:    Slackware Packages
OS:                Linux

when i use the right-click menu 'transfer to media device', i can queue the same file more than once. 

i.e. i have got in that queue twice or more times the same file. 

when i initiate the transfer, i got an error when the second instance is copied to the media device. 

expected behavior:
Only queue new file, and do not allow duplicate in the queue of files to be transfered to media device 

or 
find a way to mark the duplicates by a big and visual way in the queue window so that one can see there is a duplicate in the queue before initiating the transfer.

or 
ignore that bug report ;-)
Comment 1 solsTiCe 2006-08-19 18:08:43 UTC
just a too old bug. 
Comment 2 Martin Aumueller 2006-08-22 02:52:10 UTC
But it is still possible to queue the same track several times and you just 
closd it because it is no longer relevant to you, right?
Comment 3 solsTiCe 2006-08-24 18:58:34 UTC
it has been an error to close the bug report.
i stil can queue more than once a podcast to be transfered to my media device.

but i can't see anymore than entry in the right-click menu when you click on a track.
svn 572562
Comment 4 solsTiCe 2006-08-24 19:00:33 UTC
see the comment above (sorry)
Comment 5 Martin Aumueller 2006-12-28 19:44:56 UTC
SVN commit 617313 by aumuell:

the same track could be queued multiple times for transferring to a media device
BUG: 129136


 M  +2 -0      ChangeLog  
 M  +15 -0     src/mediabrowser.cpp  


--- trunk/extragear/multimedia/amarok/ChangeLog #617312:617313
@@ -87,6 +87,8 @@
     * Amarok now saves playlists with relative paths by default.
 
   BUGFIXES:
+    * The same track could be queued multiple times for transferring to a
+      media device. (BR 129136)
     * Migrate statistics for files moved from outside to the collection.
       (BR 127776)
     * Select All/Copy action would not copy from context browser. (BR 138635)
--- trunk/extragear/multimedia/amarok/src/mediabrowser.cpp #617312:617313
@@ -2247,6 +2247,21 @@
         return;
     }
 
+    if( playlistName.isNull() )
+    {
+        for( MediaItem *it = static_cast<MediaItem *>(firstChild());
+                it;
+                it = static_cast<MediaItem *>(it->nextSibling()) )
+        {
+            if( it->url() == url )
+            {
+                Amarok::StatusBar::instance()->shortMessage(
+                        i18n( "Track already queued for transfer: %1" ).arg( url.url() ) );
+                return;
+            }
+        }
+    }
+
     if(!bundle)
         bundle = new MetaBundle( url );