From b2db6f73c47d3c3ec7a8174275fefeb20130c8ae Mon Sep 17 00:00:00 2001 From: tmarki Date: Thu, 19 Aug 2010 17:56:44 +0200 Subject: [PATCH] clear playlist while loading crash bug and enqueue -> next crash bug fixed --- tomamp/bugs.txt | 2 +- tomamp/mainwindow.cpp | 5 +++++ tomamp/playlistmanager.cpp | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tomamp/bugs.txt b/tomamp/bugs.txt index 8001ce8..1be80df 100644 --- a/tomamp/bugs.txt +++ b/tomamp/bugs.txt @@ -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 diff --git a/tomamp/mainwindow.cpp b/tomamp/mainwindow.cpp index f2a3cd0..dfd2cbc 100644 --- a/tomamp/mainwindow.cpp +++ b/tomamp/mainwindow.cpp @@ -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) { diff --git a/tomamp/playlistmanager.cpp b/tomamp/playlistmanager.cpp index 3c0cb95..b7fef15 100644 --- a/tomamp/playlistmanager.cpp +++ b/tomamp/playlistmanager.cpp @@ -116,7 +116,7 @@ void PlaylistManager::metaStateChanged(Phonon::State newState, Phonon::State old QMap 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"); -- 1.7.9.5