Commit 07a385ccdd57629f7588503d8d1bfe500b43f15b

  • avatar
  • Stefan Bogner <bochi @onl…ne.ms>
  • Sat Jan 08 18:09:13 CET 2005
reverted Stefan's commit for beta3, it breaks mysql support (probably sqlite is also affected?).

svn path=/trunk/kdeextragear-1/amarok/; revision=376527
  
13831383
13841384
13851385void
1386CollectionDB::checkCompilations( const QString &path, const bool temporary, DbConnection *conn )
1386CollectionDB::checkCompilations( const QString &path, DbConnection *conn )
13871387{
13881388 QStringList albums;
13891389 QStringList artists;
13901390 QStringList dirs;
13911391
1392 albums = query( QString( "SELECT DISTINCT album.name FROM tags_temp, album%1 AS album WHERE tags_temp.dir = '%2' AND album.id = tags_temp.album;" )
1393 .arg( temporary ? "_temp" : "" )
1392 albums = query( QString( "SELECT DISTINCT album_temp.name FROM tags_temp, album_temp WHERE tags_temp.dir = '%1' AND album_temp.id = tags_temp.album;" )
13941393 .arg( escapeString( path ) ), conn );
13951394
13961395 for ( uint i = 0; i < albums.count(); i++ )
13971396 {
13981397 if ( albums[ i ].isEmpty() ) continue;
13991398
1400 const uint album_id = albumID( albums[ i ], false, temporary );
1401 artists = query( QString( "SELECT DISTINCT artist.name FROM tags_temp, artist%1 AS artist WHERE tags_temp.album = '%2' AND tags_temp.artist = artist.id;" )
1402 .arg( temporary ? "_temp" : "" )
1399 const uint album_id = albumID( albums[ i ], FALSE, TRUE, conn );
1400 artists = query( QString( "SELECT DISTINCT artist_temp.name FROM tags_temp, artist_temp WHERE tags_temp.album = '%1' AND tags_temp.artist = artist_temp.id;" )
14031401 .arg( album_id ), conn );
14041402 dirs = query( QString( "SELECT DISTINCT dir FROM tags_temp WHERE album = '%1';" )
14051403 .arg( album_id ), conn );
  
155155 QStringList similarArtists( const QString &artist, uint count );
156156
157157 //album methods
158 void checkCompilations( const QString &path, const bool temporary = false, DbConnection *conn = NULL );
158 void checkCompilations( const QString &path, DbConnection *conn = NULL );
159159 QString albumSongCount( const QString &artist_id, const QString &album_id );
160160
161161 //list methods
  
248248
249249 cbl.clear();
250250 images.clear();
251 CollectionDB::instance()->checkCompilations( url.path().section( '/', 0, -2 ), !m_incremental, m_staticDbConnection );
251 CollectionDB::instance()->checkCompilations( url.path().section( '/', 0, -2 ), m_staticDbConnection );
252252 }
253253 }
254254