Don't poll for album art when track is stopped.
authordruid23 <usr@dru-id.co.uk>
Sun, 5 Sep 2010 11:02:10 +0000 (12:02 +0100)
committerdruid23 <usr@dru-id.co.uk>
Sun, 5 Sep 2010 11:02:10 +0000 (12:02 +0100)
modified:   src/playermainwindow.cpp

src/playermainwindow.cpp

index f34a9c8..ff734cb 100644 (file)
       // key if we are going to look for album art later
       // for now we check length and title this will require further examination later
       mCurrentStatus.newtrack = true;
-      if (mCurrentStatus.length == length && !mCurrentStatus.title.isNull() && 0 == QString::compare(mCurrentStatus.title, title)) {
+      if ( (0 == mCurrentStatus.length || STOP == mCurrentStatus.state) // stopped or null
+              || // same track as current playing
+           (mCurrentStatus.length == length && !mCurrentStatus.title.isNull() && 0 == QString::compare(mCurrentStatus.title, title)) ){
         mCurrentStatus.newtrack = false;
       }
       mCurrentStatus.volume = volume;