Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > by-pkgid > 64bc2c1ece402a3bf975c32d9e37c2a5 > files > 10

amarok-1.4.8-12mdv2008.1.src.rpm

--- amarok/src/dynamicmode.cpp	2008/01/24 19:15:31	765839
+++ amarok/src/dynamicmode.cpp	2008/01/24 19:15:41	765840
@@ -390,7 +390,8 @@
             break;
         const int pos = KApplication::random() % m_cachedItemSet.count();
         KURL::List::iterator newItem = m_cachedItemSet.at( pos );
-        retrieval << (*newItem);
+        if( QFile::exists( (*newItem).path() ) )
+            retrieval << (*newItem);
         m_cachedItemSet.remove( newItem );
     }

--- amarok/src/playlist.cpp	2008/01/24 19:15:31	765839
+++ amarok/src/playlist.cpp	2008/01/24 19:15:41	765840
@@ -1002,9 +1002,8 @@
             }
             else
                 for( MyIt it( this ); *it; ++it )
-                    if ( !m_prevTracks.containsRef( *it ) )
+                    if ( !m_prevTracks.containsRef( *it ) && checkFileStatus( *it ) && (*it)->exists() )
                         tracks.push_back( *it );
-
             if( tracks.isEmpty() )
             {
                 //we have played everything