Version: 1.4.0a (using KDE KDE 3.5.2) Installed from: Slackware Packages OS: Linux Try to play a file, where a CUE sheet is being used. Everything works fine. Now, load some radio station. The CUE sheet from previously played file remained activated and is showing incorrect data of course.
I can confirm this - playing a radio stream after playing a track with a cue sheet shows the wrong metadata for the stream, with both xine and helix engines, using svn revision 542344.
I observed the same situation - It's pretty annoying
jepp , made a comment on this issue in #112477, so here once again... *confirm*
I can confirm this, too. I noticed it while playing a last.fm stream.
*** This bug has been confirmed by popular vote. ***
Created attachment 18867 [details] Seems to fix this bug The diff looks like it changes a lot, but it's mostly an artifact of changed indentation. I added a call to m_cuefile->clear() if trackChanged (regardless of isLocalFile) and put the rest of the code in a nested if statement that then is only run if isLocalFile() returns true.
Created attachment 18868 [details] Same patch; no indentation changes This is the same patch as above but without changing the indentation of the inner block. For people whose brains have frozen and would prefer to see a simpler patch and fix the indentation themselves :)
Tested and works. Some things have changed in svn recently in the contextbrowser.cpp file recently so apply it with care.
SVN commit 620896 by aumuell: disable cue sheet when switching to streams - thanks to Ted Percival <ted@midg3t.net> for the patch! BUG: 127683 M +2 -0 ChangeLog M +54 -50 src/contextbrowser.cpp --- trunk/extragear/multimedia/amarok/ChangeLog #620895:620896 @@ -94,6 +94,8 @@ * Amarok now saves playlists with relative paths by default. BUGFIXES: + * Cue sheet would remain enabled when switching to a stream. Patch + by Ted Percival <ted@midg3t.net>. (BR 127683) * Length of tracks wouldn't be shown correctly for some cue files. Patch by Dawid Wróbel <dawid@klej.net> (BR 139707) * Assume that all dots but the last in script executable files belong to --- trunk/extragear/multimedia/amarok/src/contextbrowser.cpp #620895:620896 @@ -646,76 +646,80 @@ else if ( CollectionDB::instance()->isEmpty() || !CollectionDB::instance()->isValid() ) showCurrentTrack(); - - if (trackChanged && bundle.url().isLocalFile()) + if (trackChanged) { + m_cuefile->clear(); - /** The cue file that is provided with the media might have different name than the - * media file itself, hence simply cutting the media extension and adding ".cue" - * is not always enough to find the matching cue file. In such cases we have - * to search for all the cue files in the directory and have a look inside them for - * the matching FILE="" stanza. However the FILE="" stanza does not always - * point at the coresponding media file (e.g. it is quite often set to the misleading - * FILE="audio.wav" WAV). Therfore we also have to check blindly if there is a cue - * file having the same name as the media file played, as described above. - */ + if (bundle.url().isLocalFile()) + { - // look for the cue file that matches the media file played first - QString path = bundle.url().path(); - QString cueFile = path.left( path.findRev('.') ) + ".cue"; + /** The cue file that is provided with the media might have different name than the + * media file itself, hence simply cutting the media extension and adding ".cue" + * is not always enough to find the matching cue file. In such cases we have + * to search for all the cue files in the directory and have a look inside them for + * the matching FILE="" stanza. However the FILE="" stanza does not always + * point at the coresponding media file (e.g. it is quite often set to the misleading + * FILE="audio.wav" WAV). Therfore we also have to check blindly if there is a cue + * file having the same name as the media file played, as described above. + */ - m_cuefile->setCueFileName( cueFile ); + // look for the cue file that matches the media file played first + QString path = bundle.url().path(); + QString cueFile = path.left( path.findRev('.') ) + ".cue"; - if( m_cuefile->load( bundle.length() ) ) - debug() << "[CUEFILE]: " << cueFile << " - Shoot blindly, found and loaded. " << endl; + m_cuefile->setCueFileName( cueFile ); - // if unlucky, let's have a look inside cue files, if any - else - { - debug() << "[CUEFILE]: " << cueFile << " - Shoot blindly and missed, searching for other cue files." << endl; + if( m_cuefile->load( bundle.length() ) ) + debug() << "[CUEFILE]: " << cueFile << " - Shoot blindly, found and loaded. " << endl; - bool foundCueFile = false; - QDir dir ( bundle.directory() ); - dir.setFilter( QDir::Files ) ; - dir.setNameFilter( "*.cue *.CUE" ) ; + // if unlucky, let's have a look inside cue files, if any + else + { + debug() << "[CUEFILE]: " << cueFile << " - Shoot blindly and missed, searching for other cue files." << endl; - QStringList cueFilesList = dir.entryList(); + bool foundCueFile = false; + QDir dir ( bundle.directory() ); + dir.setFilter( QDir::Files ) ; + dir.setNameFilter( "*.cue *.CUE" ) ; - if ( !cueFilesList.empty() ) - for ( QStringList::Iterator it = cueFilesList.begin(); it != cueFilesList.end() && !foundCueFile; ++it ) - { - QFile file ( dir.filePath(*it) ); - if( file.open( IO_ReadOnly ) ) + QStringList cueFilesList = dir.entryList(); + + if ( !cueFilesList.empty() ) + for ( QStringList::Iterator it = cueFilesList.begin(); it != cueFilesList.end() && !foundCueFile; ++it ) { - debug() << "[CUEFILE]: " << *it << " - Opened, looking for the matching FILE stanza." << endl; - QTextStream stream( &file ); - QString line; - - while ( !stream.atEnd() && !foundCueFile) + QFile file ( dir.filePath(*it) ); + if( file.open( IO_ReadOnly ) ) { - line = stream.readLine().simplifyWhiteSpace(); + debug() << "[CUEFILE]: " << *it << " - Opened, looking for the matching FILE stanza." << endl; + QTextStream stream( &file ); + QString line; - if( line.startsWith( "file", false ) ) + while ( !stream.atEnd() && !foundCueFile) { - line = line.mid( 5 ).remove( '"' ); + line = stream.readLine().simplifyWhiteSpace(); - if ( line.contains( bundle.filename(), false ) ) + if( line.startsWith( "file", false ) ) { - cueFile = dir.filePath(*it); - foundCueFile = true; - m_cuefile->setCueFileName( cueFile ); - if( m_cuefile->load( bundle.length() ) ) - debug() << "[CUEFILE]: " << cueFile << " - Looked inside cue files, found and loaded proper one" << endl; + line = line.mid( 5 ).remove( '"' ); + + if ( line.contains( bundle.filename(), false ) ) + { + cueFile = dir.filePath(*it); + foundCueFile = true; + m_cuefile->setCueFileName( cueFile ); + if( m_cuefile->load( bundle.length() ) ) + debug() << "[CUEFILE]: " << cueFile << " - Looked inside cue files, found and loaded proper one" << endl; + } } } + + file.close(); } - - file.close(); } - } - if ( !foundCueFile ) - debug() << "[CUEFILE]: - Didn't find any matching cue file." << endl; + if ( !foundCueFile ) + debug() << "[CUEFILE]: - Didn't find any matching cue file." << endl; + } } } }
*** Bug 128769 has been marked as a duplicate of this bug. ***