Bug 143513

Summary: Playlist items stay greyed out even if songs are available
Product: [Applications] amarok Reporter: Gerrit Visscher <gerrit>
Component: PlaylistAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED FIXED    
Severity: normal CC: emisca
Priority: NOR    
Version: 1.4.5   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Gerrit Visscher 2007-03-27 14:58:41 UTC
Version:           1.4.5 (using KDE 3.5.6, Gentoo)
Compiler:          Target: i686-pc-linux-gnu
OS:                Linux (i686) release 2.6.20-gentoo

Sometimes I forget to mount my music partition and start amarok. It greys out all songs in the playlist (thats ok so far). But when I close amarok, mount the partition and start it again, the songs are still greyed out. They should be black again, it's a bit confusing.
I can play them and after that, they become black.
Comment 1 Kevin Funk 2007-03-27 15:32:25 UTC
My problem differs a bit from yours. I've got a encrypted disk; when i start amarok while the disk is encrypted and drag&drop some files from the collection into the playlist, the songs are greyed out and I can't play them (that's ok). But when I decrypt my partition and try to play some of the files I've just drag&dropped into the playlist, the files play fine but still are greyed out. They never get black again (using 1.4.5, this is a regression I think).
Comment 2 Jeff Mitchell 2007-06-11 20:08:44 UTC
SVN commit 674087 by mitchell:

Do a stat on files in the playlist when loading, to make sure their status is correct when Amarok loads up.

BUG: 143513


 M  +0 -2      playlist.cpp  
 M  +3 -8      playlistloader.cpp  


--- branches/stable/extragear/multimedia/amarok/src/playlist.cpp #674086:674087
@@ -3131,8 +3131,6 @@
         else if ( item == currentTrack() )
             attributes << "queue_index" << QString::number( 0 );
 
-        if( !item->isFilestatusEnabled() )
-            attributes << "filestatusdisabled" << "true";
         if( !item->isDynamicEnabled() )
             attributes << "dynamicdisabled" << "true";
 
--- branches/stable/extragear/multimedia/amarok/src/playlistloader.cpp #674086:674087
@@ -51,8 +51,7 @@
     int queue;
     bool stopafter;
     bool dynamicdisabled;
-    bool filestatusdisabled;
-    XMLData(): queue(-1), stopafter(false), dynamicdisabled(false), filestatusdisabled(false) { }
+    XMLData(): queue(-1), stopafter(false), dynamicdisabled(false) { }
 };
 
 class TagsEvent : public QCustomEvent {
@@ -293,10 +292,8 @@
             if( (*it).stopafter )
                 Playlist::instance()->m_stopAfterTrack = item;
 
-            if( (*it).filestatusdisabled || !( (*it).bundle.exists() ) )
-                item->setFilestatusEnabled( false );
-            if( (*it).dynamicdisabled )
-                item->setDynamicEnabled( false );
+            item->setFilestatusEnabled( (*it).bundle.exists() );
+            item->setDynamicEnabled( !( (*it).dynamicdisabled ) );
         }
         break;
     }
@@ -500,8 +497,6 @@
             data.stopafter = true;
         else if( atts[i].first == "dynamicdisabled" )
             data.dynamicdisabled = true;
-        else if( atts[i].first == "filestatusdisabled" )
-            data.filestatusdisabled = true;
     }
     data.bundle.checkExists();
     m_xml.append( data );
Comment 3 Kevin Funk 2007-09-06 16:07:35 UTC
*** Bug 149598 has been marked as a duplicate of this bug. ***
Comment 4 Seb Ruiz 2007-09-11 07:57:57 UTC
*** Bug 149598 has been marked as a duplicate of this bug. ***
Comment 5 Emilio Scalise 2007-09-11 08:16:45 UTC
Is there any way to make amarok refresh the song status when it's running?

If an usb disk is unmounted when amarok starts songs in the playlist from that disk are grayed. If I mount the disk without restarting amarok, songs remain grayed until they are played.
So how about a "refresh" playlist button or command? Or there is already such a command?