clear playlist while loading crash bug and enqueue -> next crash bug fixed
authortmarki <tmarki@gmail.com>
Thu, 19 Aug 2010 15:56:44 +0000 (17:56 +0200)
committertmarki <tmarki@gmail.com>
Thu, 19 Aug 2010 15:56:44 +0000 (17:56 +0200)
tomamp/bugs.txt
tomamp/mainwindow.cpp
tomamp/playlistmanager.cpp

index 8001ce8..1be80df 100644 (file)
@@ -1,7 +1,6 @@
 - remember folder position when adding songs (takes time as adding a song and going one folder up for next song jumps to top of folder)
 - when saving a playlist, the default path seems invalid, so playlist doesn's save, and no error given
 - for some reasom, one folder shows 0 files, but filled with mp3 files (?)
-- quit while reading tags causes crash
 
 Fixed:
 + context menu event outside of musicTable causes crash
@@ -11,3 +10,4 @@ Fixed:
 + bold-italic highlight does not move on normal track switch (when one ends and the next starts)
 + quick next-next while playing stops playback
 + meta info display mismatch (title duplication, some files receive some other file's meta info instead of their ("reality")) (might be related to previous)
++ clear playlist while reading tags causes crash
index f2a3cd0..dfd2cbc 100644 (file)
@@ -205,6 +205,11 @@ void MainWindow::next()
     bool wasPlaying = isPlaying;
     if (mediaObject->state () == Phonon::ErrorState)
         wasPlaying = true;
+    if (mediaObject->queue().size())
+    {
+        setItem (plman.indexOf(mediaObject->queue()[0]), wasPlaying);
+        return;
+    }
     int index = plman.indexOf(mediaObject->currentSource());
     if (shuffle)
     {
index 3c0cb95..b7fef15 100644 (file)
@@ -116,7 +116,7 @@ void PlaylistManager::metaStateChanged(Phonon::State newState, Phonon::State old
     QMap<QString, QString> metaData = metaInformationResolver->metaData();
 
 
-    if (index >= 0 && newState != Phonon::ErrorState)
+    if (index >= 0 && newState != Phonon::ErrorState && index < items.size ())
     {
         items[index].artist = metaData.value("ARTIST");
         items[index].title = metaData.value("TITLE");