Summary: | 100% cpu and no response when unfolding the unknown category in jamendo | ||
---|---|---|---|
Product: | [Applications] amarok | Reporter: | Guido Schmidt <guido> |
Component: | Internet Services | Assignee: | Amarok Developers <amarok-bugs-dist> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | dikmax, nhn |
Priority: | NOR | Keywords: | release_blocker |
Version: | 2.2.1 | ||
Target Milestone: | 2.2.2 | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Guido Schmidt
2009-11-04 23:48:33 UTC
And what exact Amarok version are you talking about? That's funny. While filling out the bug report I chose the version from a drop-down-list. Don't know why it didn't make into the report. Anyway, version is 2.2.0. Added to the filed now, thx. Can somebody reproduce this with current Amarok 2.2.1 or Amarok 2.2-git? I can. Version is 2.2.1. BTW: With the UI already frozen playback continues until the current title ends. Setting it to unconfirmed. If this is not the desired status please let me know. (Couldn't find any documentation about that. If there is any I would be grateful if someone could point me to it.) Thanks for the prompt feedback, we need another confirmation though, since you are the original reporter. I can confirm this bug. I'm using Amarok 2.2.1 on KDE 4.3.4 And it uses 100% CPU because Amarok read something from hard disk. iotop shows throughput ~60M/s all time. Thanks for the feedback. commit 0ffe80bbd8fe074dea64abb985a413885a1ab765 Author: Nikolaj Hald Nielsen <nhnFreespirit@gmail.com> Date: Wed Dec 16 13:04:00 2009 +0100 Prune out any genres with empty names or the name "Unknown" when importing the Jamendo database. This gets rid of the "Unknown" genre at the top of the lsit that freezes Amarok when you try to expand it. Some albums might be filtered out by this, but a) these were not accessible anyway and b) if the album has not been tagged with even a single genre by the artist, then it is r BUG: 213165 commit 0ffe80bbd8fe074dea64abb985a413885a1ab765 Author: Nikolaj Hald Nielsen <nhnFreespirit@gmail.com> Date: Wed Dec 16 13:04:00 2009 +0100 Prune out any genres with empty names or the name "Unknown" when importing the Jamendo database. This gets rid of the "Unknown" genre at the top of the lsit that freezes Amarok when you try to expand it. Some albums might be filtered out by this, but a) these were not accessible anyway and b) if the album has not been tagged with even a single genre by the artist, then it is really their own fault that their album does not get much exposure... BUG: 213165 diff --git a/src/services/ServiceSqlQueryMaker.cpp b/src/services/ServiceSqlQueryMaker.cpp index 87a8bfd..0c01dfe 100644 --- a/src/services/ServiceSqlQueryMaker.cpp +++ b/src/services/ServiceSqlQueryMaker.cpp @@ -564,10 +564,13 @@ ServiceSqlQueryMaker::query() QStringList ServiceSqlQueryMaker::runQuery( const QString &query ) { + DEBUG_BLOCK if( d->albumMode == OnlyCompilations ) return QStringList(); - return m_collection->query( query ); + + debug() << "query: " << query; + return m_collection->query( query ); } void diff --git a/src/services/jamendo/JamendoXmlParser.cpp b/src/services/jamendo/JamendoXmlParser.cpp index f6109e0..1584f1c 100644 --- a/src/services/jamendo/JamendoXmlParser.cpp +++ b/src/services/jamendo/JamendoXmlParser.cpp @@ -281,7 +281,7 @@ JamendoXmlParser::readAlbum() Q_ASSERT( m_reader.isStartElement() && m_reader.name() == "album" ); //debug() << "Found album: "; - m_nNumberOfAlbums++; + QString name; QString genre; @@ -322,25 +322,30 @@ JamendoXmlParser::readAlbum() } } - JamendoAlbum currentAlbum( name ); - currentAlbum.setGenre( genre ); - currentAlbum.setDescription( description ); - currentAlbum.setId( m_currentAlbumId ); - currentAlbum.setArtistId( m_currentArtistId ); - currentAlbum.setLaunchYear( releaseDate.left( 4 ).toInt() ); - currentAlbum.setCoverUrl( COVERURL_BASE.arg( m_currentAlbumId ) ); - currentAlbum.setMp3TorrentUrl( TORRENTURL_BASE.arg( QString::number( m_currentAlbumId ), "mp32" ) ); - currentAlbum.setOggTorrentUrl( TORRENTURL_BASE.arg( QString::number( m_currentAlbumId ), "ogg3" ) ); - m_albumArtistMap.insert( currentAlbum.id(), currentAlbum.artistId() ); - - int newId = m_dbHandler->insertAlbum( ¤tAlbum ); - countTransaction(); - - //debug() << "inserting genre with album_id = " << newId << " and name = " << genreName; - ServiceGenre currentGenre( genre ); - currentGenre.setAlbumId( newId ); - m_dbHandler->insertGenre( ¤tGenre ); - countTransaction(); + //We really do not like albums with no genres, makes the service freeze, so simply ignore this. + if( !genre.isEmpty() && genre != "Unknown" ) + { + m_nNumberOfAlbums++; + JamendoAlbum currentAlbum( name ); + currentAlbum.setGenre( genre ); + currentAlbum.setDescription( description ); + currentAlbum.setId( m_currentAlbumId ); + currentAlbum.setArtistId( m_currentArtistId ); + currentAlbum.setLaunchYear( releaseDate.left( 4 ).toInt() ); + currentAlbum.setCoverUrl( COVERURL_BASE.arg( m_currentAlbumId ) ); + currentAlbum.setMp3TorrentUrl( TORRENTURL_BASE.arg( QString::number( m_currentAlbumId ), "mp32" ) ); + currentAlbum.setOggTorrentUrl( TORRENTURL_BASE.arg( QString::number( m_currentAlbumId ), "ogg3" ) ); + m_albumArtistMap.insert( currentAlbum.id(), currentAlbum.artistId() ); + + int newId = m_dbHandler->insertAlbum( ¤tAlbum ); + countTransaction(); + + //debug() << "inserting genre with album_id = " << newId << " and name = " << genreName; + ServiceGenre currentGenre( genre ); + currentGenre.setAlbumId( newId ); + m_dbHandler->insertGenre( ¤tGenre ); + countTransaction(); + } } void |