Ticket #3041: mythmusic_scanner.diff
File mythmusic_scanner.diff, 25.1 KB (added by , 17 years ago) |
---|
-
mythmusic/mythmusic/metadata.cpp
169 169 if (m_genre == "") 170 170 m_genre = QObject::tr("Unknown Genre"); 171 171 172 // Don't update the database if a song with the exact same173 // metadata is already there174 172 MSqlQuery query(MSqlQuery::InitCon()); 175 query.prepare("SELECT music_songs.filename "176 "FROM music_songs "177 "LEFT JOIN music_artists ON music_songs.artist_id=music_artists.artist_id "178 "LEFT JOIN music_albums ON music_songs.album_id=music_albums.album_id "179 "LEFT JOIN music_artists AS music_comp_artists ON music_albums.artist_id=music_comp_artists.artist_id "180 "LEFT JOIN music_genres ON music_songs.genre_id=music_genres.genre_id "181 "WHERE music_artists.artist_name = :ARTIST"182 " AND music_comp_artists.artist_name = :COMPILATION_ARTIST"183 " AND music_albums.album_name = :ALBUM"184 " AND music_songs.name = :TITLE"185 " AND music_genres.genre = :GENRE"186 " AND music_songs.year = :YEAR"187 " AND music_songs.track = :TRACKNUM"188 " AND music_songs.length = :LENGTH"189 " AND music_songs.format = :FORMAT ;");190 173 191 query.bindValue(":ARTIST", m_artist.utf8()); 192 query.bindValue(":COMPILATION_ARTIST", m_compilation_artist.utf8()); 193 query.bindValue(":ALBUM", m_album.utf8()); 194 query.bindValue(":TITLE", m_title.utf8()); 195 query.bindValue(":GENRE", m_genre.utf8()); 196 query.bindValue(":YEAR", m_year); 197 query.bindValue(":TRACKNUM", m_tracknum); 198 query.bindValue(":LENGTH", m_length); 199 query.bindValue(":FORMAT", m_format); 200 201 if (query.exec() && query.size() > 0 ) 174 if (m_directoryid < 0) 202 175 { 203 if (m_id > 0) 204 { 205 query.prepare("UPDATE music_songs SET " 206 "date_modified = :DATE_MOD WHERE filename = :FILENAME;"); 207 query.bindValue(":DATE_MOD", QDateTime::currentDateTime()); 208 query.bindValue(":FILENAME", sqlfilename.utf8()); 209 if (!query.exec() || !query.isActive()) 210 { 211 MythContext::DBError("update modification date", query); 212 } 213 } 214 215 return; 216 } 217 218 // Load the directory id 219 unsigned int directoryId; 220 query.prepare("SELECT directory_id FROM music_directories " 221 "WHERE path = :DIRECTORY ;"); 222 query.bindValue(":DIRECTORY", sqldir.utf8()); 223 224 if (!query.exec() || !query.isActive()) 225 { 226 MythContext::DBError("music select directory id", query); 227 return; 228 } 229 if (query.next()) 230 { 231 directoryId = query.value(0).toInt(); 232 } 233 else 234 { 235 query.prepare("INSERT INTO music_directories (path) VALUES (:DIRECTORY);"); 176 // Load the directory id 177 query.prepare("SELECT directory_id FROM music_directories " 178 "WHERE path = :DIRECTORY ;"); 236 179 query.bindValue(":DIRECTORY", sqldir.utf8()); 237 180 238 if (!query.exec() || !query.isActive() || query.numRowsAffected() <= 0)181 if (!query.exec() || !query.isActive()) 239 182 { 240 MythContext::DBError("music insert directory", query);183 MythContext::DBError("music select directory id", query); 241 184 return; 242 185 } 243 directoryId = query.lastInsertId().toInt(); 186 if (query.next()) 187 { 188 m_directoryid = query.value(0).toInt(); 189 } 190 else 191 { 192 query.prepare("INSERT INTO music_directories (path) VALUES (:DIRECTORY);"); 193 query.bindValue(":DIRECTORY", sqldir.utf8()); 194 195 if (!query.exec() || !query.isActive() || query.numRowsAffected() <= 0) 196 { 197 MythContext::DBError("music insert directory", query); 198 return; 199 } 200 m_directoryid = query.lastInsertId().toInt(); 201 } 244 202 } 245 203 246 // Load the artist id or insert it and get the id 247 unsigned int artistId; 248 query.prepare("SELECT artist_id FROM music_artists " 249 "WHERE artist_name = :ARTIST ;"); 250 query.bindValue(":ARTIST", m_artist.utf8()); 251 252 if (!query.exec() || !query.isActive()) 204 if (m_artistid < 0) 253 205 { 254 MythContext::DBError("music select artist id", query); 255 return; 256 } 257 if (query.next()) 258 { 259 artistId = query.value(0).toInt(); 260 } 261 else 262 { 263 query.prepare("INSERT INTO music_artists (artist_name) VALUES (:ARTIST);"); 206 // Load the artist id 207 query.prepare("SELECT artist_id FROM music_artists " 208 "WHERE artist_name = :ARTIST ;"); 264 209 query.bindValue(":ARTIST", m_artist.utf8()); 265 210 266 if (!query.exec() || !query.isActive() || query.numRowsAffected() <= 0)211 if (!query.exec() || !query.isActive()) 267 212 { 268 MythContext::DBError("music insert artist", query);213 MythContext::DBError("music select artist id", query); 269 214 return; 270 215 } 271 artistId = query.lastInsertId().toInt(); 216 if (query.next()) 217 { 218 m_artistid = query.value(0).toInt(); 219 } 220 else 221 { 222 query.prepare("INSERT INTO music_artists (artist_name) VALUES (:ARTIST);"); 223 query.bindValue(":ARTIST", m_artist.utf8()); 224 225 if (!query.exec() || !query.isActive() || query.numRowsAffected() <= 0) 226 { 227 MythContext::DBError("music insert artist", query); 228 return; 229 } 230 m_artistid = query.lastInsertId().toInt(); 231 } 272 232 } 273 233 274 234 // Compilation Artist 275 unsigned int compilationArtistId;276 235 if (m_artist == m_compilation_artist) 277 236 { 278 compilationArtistId = artistId;237 m_compartistid = m_artistid; 279 238 } 280 239 else 281 240 { … … 289 248 } 290 249 if (query.next()) 291 250 { 292 compilationArtistId = query.value(0).toInt();251 m_compartistid = query.value(0).toInt(); 293 252 } 294 253 else 295 254 { … … 301 260 MythContext::DBError("music insert compilation artist", query); 302 261 return; 303 262 } 304 compilationArtistId = query.lastInsertId().toInt();263 m_compartistid = query.lastInsertId().toInt(); 305 264 } 306 265 } 307 266 308 267 // Album 309 unsigned int albumId; 310 query.prepare("SELECT album_id FROM music_albums " 311 "WHERE artist_id = :COMP_ARTIST_ID " 312 " AND album_name = :ALBUM ;"); 313 query.bindValue(":COMP_ARTIST_ID", compilationArtistId); 314 query.bindValue(":ALBUM", m_album.utf8()); 315 if (!query.exec() || !query.isActive()) 268 if (m_albumid < 0) 316 269 { 317 MythContext::DBError("music select album id", query); 318 return; 319 } 320 if (query.next()) 321 { 322 albumId = query.value(0).toInt(); 323 } 324 else 325 { 326 query.prepare("INSERT INTO music_albums (artist_id, album_name, compilation, year) VALUES (:COMP_ARTIST_ID, :ALBUM, :COMPILATION, :YEAR);"); 327 query.bindValue(":COMP_ARTIST_ID", compilationArtistId); 270 query.prepare("SELECT album_id FROM music_albums " 271 "WHERE artist_id = :COMP_ARTIST_ID " 272 " AND album_name = :ALBUM ;"); 273 query.bindValue(":COMP_ARTIST_ID", m_compartistid); 328 274 query.bindValue(":ALBUM", m_album.utf8()); 329 query.bindValue(":COMPILATION", m_compilation); 330 query.bindValue(":YEAR", m_year); 331 332 if (!query.exec() || !query.isActive() || query.numRowsAffected() <= 0) 275 if (!query.exec() || !query.isActive()) 333 276 { 334 MythContext::DBError("music insert album", query);277 MythContext::DBError("music select album id", query); 335 278 return; 336 279 } 337 albumId = query.lastInsertId().toInt(); 280 if (query.next()) 281 { 282 m_albumid = query.value(0).toInt(); 283 } 284 else 285 { 286 query.prepare("INSERT INTO music_albums (artist_id, album_name, compilation, year) VALUES (:COMP_ARTIST_ID, :ALBUM, :COMPILATION, :YEAR);"); 287 query.bindValue(":COMP_ARTIST_ID", m_compartistid); 288 query.bindValue(":ALBUM", m_album.utf8()); 289 query.bindValue(":COMPILATION", m_compilation); 290 query.bindValue(":YEAR", m_year); 291 292 if (!query.exec() || !query.isActive() || query.numRowsAffected() <= 0) 293 { 294 MythContext::DBError("music insert album", query); 295 return; 296 } 297 m_albumid = query.lastInsertId().toInt(); 298 } 338 299 } 339 300 340 // Genres 341 unsigned int genreId; 342 query.prepare("SELECT genre_id FROM music_genres " 343 "WHERE genre = :GENRE ;"); 344 query.bindValue(":GENRE", m_genre.utf8()); 345 if (!query.exec() || !query.isActive()) 301 if (m_genreid < 0) 346 302 { 347 MythContext::DBError("music select genre id", query); 348 return; 349 } 350 if (query.next()) 351 { 352 genreId = query.value(0).toInt(); 353 } 354 else 355 { 356 query.prepare("INSERT INTO music_genres (genre) VALUES (:GENRE);"); 303 // Genres 304 query.prepare("SELECT genre_id FROM music_genres " 305 "WHERE genre = :GENRE ;"); 357 306 query.bindValue(":GENRE", m_genre.utf8()); 358 359 if (!query.exec() || !query.isActive() || query.numRowsAffected() <= 0) 307 if (!query.exec() || !query.isActive()) 360 308 { 361 MythContext::DBError("music insert genre", query);309 MythContext::DBError("music select genre id", query); 362 310 return; 363 311 } 364 genreId = query.lastInsertId().toInt(); 312 if (query.next()) 313 { 314 m_genreid = query.value(0).toInt(); 315 } 316 else 317 { 318 query.prepare("INSERT INTO music_genres (genre) VALUES (:GENRE);"); 319 query.bindValue(":GENRE", m_genre.utf8()); 320 321 if (!query.exec() || !query.isActive() || query.numRowsAffected() <= 0) 322 { 323 MythContext::DBError("music insert genre", query); 324 return; 325 } 326 m_genreid = query.lastInsertId().toInt(); 327 } 365 328 } 366 329 367 330 // We have all the id's now. We can insert it. … … 397 360 } 398 361 399 362 query.prepare(strQuery); 400 /* 401 query.prepare("INSERT INTO music_songs " 402 " (artist_id, album_id, name," 403 " genre_id, year, track, length," 404 " filename, date_entered, date_modified," 405 " format, size, bitrate) " 406 "VALUES " 407 " (:ARTIST, :ALBUM, :TITLE," 408 " :GENRE, :YEAR, :TRACKNUM, :LENGTH," 409 " :FILENAME, :DATE_ADD, :DATE_MOD," 410 " :FORMAT, :FILESIZE, :BITRATE)" 411 ); 412 */ 413 query.bindValue(":DIRECTORY", directoryId); 414 query.bindValue(":ARTIST", artistId); 415 query.bindValue(":ALBUM", albumId); 363 364 query.bindValue(":DIRECTORY", m_directoryid); 365 query.bindValue(":ARTIST", m_artistid); 366 query.bindValue(":ALBUM", m_albumid); 416 367 query.bindValue(":TITLE", m_title.utf8()); 417 query.bindValue(":GENRE", genreId);368 query.bindValue(":GENRE", m_genreid); 418 369 query.bindValue(":YEAR", m_year); 419 370 query.bindValue(":TRACKNUM", m_tracknum); 420 371 query.bindValue(":LENGTH", m_length); -
mythmusic/mythmusic/metadata.h
40 40 m_changed = false; 41 41 m_show = true; 42 42 m_format = lformat; 43 44 m_directoryid = -1; 45 m_artistid = -1; 46 m_albumid = -1; 47 m_genreid = -1; 43 48 } 44 49 45 50 Metadata(const Metadata &other) … … 89 94 QString Genre() { return m_genre; } 90 95 void setGenre(const QString &lgenre) { m_genre = lgenre; } 91 96 97 void setDirectoryId(int ldirectoryid) { m_directoryid = ldirectoryid; } 98 int getDirectoryId() { return m_directoryid; } 99 void setArtistId(int lartistid) { m_artistid = lartistid; } 100 int getArtistId() { return m_artistid; } 101 void setAlbumId(int lalbumid) { m_albumid = lalbumid; } 102 int getAlbumId() { return m_albumid; } 103 void setGenreId(int lgenreid) { m_genreid = lgenreid; } 104 int getGenreId() { return m_genreid; } 105 92 106 int Year() { return m_year; } 93 107 void setYear(int lyear) { m_year = lyear; } 94 108 95 109 int Track() { return m_tracknum; } 96 110 void setTrack(int ltrack) { m_tracknum = ltrack; } 97 111 … … 159 173 int m_tracknum; 160 174 int m_length; 161 175 int m_rating; 176 int m_directoryid; 177 int m_artistid; 178 int m_compartistid; 179 int m_albumid; 180 int m_genreid; 162 181 QString m_lastplay; 163 182 int m_playcount; 164 183 bool m_compilation; 165 184 166 185 unsigned int m_id; 167 186 QString m_filename; 168 187 bool m_changed; -
mythmusic/mythmusic/filescanner.h
13 13 }; 14 14 15 15 typedef QMap <QString, MusicFileLocation> MusicLoadedMap; 16 typedef QMap<QString, int> IdCache; 16 17 17 18 class FileScanner 18 19 { … … 24 25 25 26 private: 26 27 void BuildFileList(QString &directory, MusicLoadedMap &music_files, int parentid); 28 int GetDirectoryId(const QString &directory, const int &parentid); 27 29 bool HasFileChanged(const QString &filename, const QString &date_modified); 28 30 void AddFileToDB(const QString &filename); 29 31 void RemoveFileFromDB (const QString &directory, const QString &filename); 30 32 void UpdateFileInDB(const QString &filename); 31 33 32 34 QString m_startdir; 35 IdCache m_directoryid; 36 IdCache m_artistid; 37 IdCache m_genreid; 38 IdCache m_albumid; 39 40 Decoder *m_decoder; 33 41 }; 34 42 35 43 #endif // _FILESCANNER_H_ -
mythmusic/mythmusic/metaio.cpp
43 43 44 44 static QString regext = mFileExtension + "$"; 45 45 int part_num = 0; 46 filename.replace(QRegExp(QString("_")), QString(" ")); 47 filename.replace(QRegExp(regext, FALSE), QString("")); 46 48 QStringList fmt_list = QStringList::split("/", mFilenameFormat); 47 49 QStringList::iterator fmt_it = fmt_list.begin(); 48 50 … … 54 56 for(; fmt_it != fmt_list.end(); fmt_it++, part_num++) 55 57 { 56 58 QString part_str = filename.section( "/", part_num, part_num); 57 part_str.replace(QRegExp(QString("_")), QString(" "));58 part_str.replace(QRegExp(regext, FALSE), QString(""));59 59 60 60 if ( *fmt_it == "GENRE" ) 61 61 genre = part_str; -
mythmusic/mythmusic/filescanner.cpp
18 18 19 19 FileScanner::FileScanner () 20 20 { 21 MSqlQuery query(MSqlQuery::InitCon()); 21 22 23 // Cache the directory ids from the database 24 query.prepare("SELECT directory_id, LOWER(path) FROM music_directories"); 25 if (query.exec() || query.isActive()) 26 { 27 while(query.next()) 28 { 29 m_directoryid[query.value(1).toString()] = query.value(0).toInt(); 30 } 31 } 32 33 // Cache the genre ids from the database 34 query.prepare("SELECT genre_id, LOWER(genre) FROM music_genres"); 35 if (query.exec() || query.isActive()) 36 { 37 while(query.next()) 38 { 39 m_genreid[query.value(1).toString()] = query.value(0).toInt(); 40 } 41 } 42 43 // Cache the artist ids from the database 44 query.prepare("SELECT artist_id, LOWER(artist_name) FROM music_artists"); 45 if (query.exec() || query.isActive()) 46 { 47 while(query.next()) 48 { 49 m_artistid[query.value(1).toString()] = query.value(0).toInt(); 50 } 51 } 52 53 // Cache the album ids from the database 54 query.prepare("SELECT album_id, artist_id, LOWER(album_name) FROM music_albums"); 55 if (query.exec() || query.isActive()) 56 { 57 while(query.next()) 58 { 59 m_albumid[query.value(1).toString() + "#" + query.value(2).toString()] = query.value(0).toInt(); 60 } 61 } 22 62 } 23 63 24 64 FileScanner::~FileScanner () … … 40 80 QFileInfoListIterator it(*list); 41 81 QFileInfo *fi; 42 82 43 MSqlQuery query(MSqlQuery::InitCon());44 45 83 /* Recursively traverse directory, calling QApplication::processEvents() 46 84 every now and then to ensure the UI updates */ 47 85 int update_interval = 0; … … 55 93 if (fi->isDir()) 56 94 { 57 95 58 QString directory(filename); 59 directory.remove(0, m_startdir.length()); 60 // Load the directory id or insert it and get the id 61 query.prepare("SELECT directory_id FROM music_directories " 62 "WHERE path = :DIRECTORY ;"); 63 query.bindValue(":DIRECTORY", directory.utf8()); 96 QString dir(filename); 97 dir.remove(0, m_startdir.length()); 64 98 65 if (query.exec() || query.isActive()) 66 { 67 if (query.size() == 0) 99 newparentid = m_directoryid[dir.utf8().lower()]; 100 101 if (newparentid == 0) { 102 if ((m_directoryid[dir.utf8().lower()] = GetDirectoryId(dir, parentid)) > 0) 68 103 { 69 query.prepare("INSERT INTO music_directories (path, parent_id) " 70 "VALUES (:DIRECTORY, :PARENTID);"); 71 query.bindValue(":DIRECTORY", directory.utf8()); 72 query.bindValue(":PARENTID", parentid); 73 74 if (!query.exec() || !query.isActive() 75 || query.numRowsAffected() <= 0) 76 { 77 MythContext::DBError("music insert directory", query); 78 return; 79 } 80 newparentid = query.lastInsertId().toInt(); 104 newparentid = m_directoryid[dir.utf8().lower()]; 81 105 } 82 106 else 83 107 { 84 query.next(); 85 newparentid = query.value(0).toInt(); 108 VERBOSE(VB_IMPORTANT, QString("Failed to get directory id for path %1").arg(dir).arg(m_directoryid[dir.utf8().lower()])); 86 109 } 87 110 } 88 else89 {90 MythContext::DBError("music select directory id", query);91 return;92 }93 111 94 112 BuildFileList(filename, music_files, newparentid); 113 95 114 qApp->processEvents (); 96 115 } 97 116 else … … 101 120 qApp->processEvents(); 102 121 update_interval = 0; 103 122 } 123 104 124 music_files[filename] = kFileSystem; 105 125 } 106 126 } 107 127 } 108 128 129 int FileScanner::GetDirectoryId(const QString &directory, const int &parentid) 130 { 131 MSqlQuery query(MSqlQuery::InitCon()); 132 133 // Load the directory id or insert it and get the id 134 query.prepare("SELECT directory_id FROM music_directories " 135 "WHERE path = :DIRECTORY ;"); 136 query.bindValue(":DIRECTORY", directory.utf8()); 137 138 if (query.exec() || query.isActive()) 139 { 140 if (query.next()) 141 { 142 return query.value(0).toInt(); 143 } 144 else 145 { 146 query.prepare("INSERT INTO music_directories (path, parent_id) " 147 "VALUES (:DIRECTORY, :PARENTID);"); 148 query.bindValue(":DIRECTORY", directory.utf8()); 149 query.bindValue(":PARENTID", parentid); 150 151 if (!query.exec() || !query.isActive() 152 || query.numRowsAffected() <= 0) 153 { 154 MythContext::DBError("music insert directory", query); 155 return -1; 156 } 157 return query.lastInsertId().toInt(); 158 } 159 } 160 else 161 { 162 MythContext::DBError("music select directory id", query); 163 return -1; 164 } 165 166 return -1; 167 } 168 109 169 bool FileScanner::HasFileChanged(const QString &filename, const QString &date_modified) 110 170 { 111 171 struct stat stbuf; 112 172 113 if (stat(filename. ascii(), &stbuf) == 0)173 if (stat(filename.local8Bit(), &stbuf) == 0) 114 174 { 115 175 if (date_modified.isEmpty() || 116 176 stbuf.st_mtime > … … 121 181 } 122 182 } 123 183 else { 124 VERBOSE(VB_IMPORTANT, QString("Failed to stat file: %1").arg(filename.ascii())); 184 VERBOSE(VB_IMPORTANT, QString("Failed to stat file: %1") 185 .arg(filename.local8Bit())); 125 186 } 126 187 return false; 127 188 } … … 132 193 133 194 if (decoder) 134 195 { 135 Metadata *data = decoder-> getMetadata();196 Metadata *data = decoder->readMetadata(); 136 197 if (data) { 198 QString directory = filename; 199 directory.remove(0, m_startdir.length()); 200 directory = directory.section( '/', 0, -2); 201 202 QString album_cache_string; 203 204 // Set values from cache 205 if (m_directoryid[directory.utf8().lower()] > 0) 206 data->setDirectoryId(m_directoryid[directory.utf8().lower()]); 207 if (m_artistid[data->Artist().utf8().lower()] > 0) 208 { 209 data->setArtistId(m_artistid[data->Artist().utf8().lower()]); 210 211 // The album cache depends on the artist id 212 album_cache_string = data->getArtistId() + "#" 213 + data->Album().utf8().lower(); 214 215 if (m_albumid[album_cache_string] > 0) 216 data->setAlbumId(m_albumid[album_cache_string]); 217 } 218 if (m_genreid[data->Genre().utf8().lower()] > 0) 219 data->setGenreId(m_genreid[data->Genre().utf8().lower()]); 220 221 // Commit track info to database 137 222 data->dumpToDatabase(); 223 224 // Update the cache 225 m_artistid[data->Artist().utf8().lower()] = data->getArtistId(); 226 m_genreid[data->Genre().utf8().lower()] = data->getGenreId(); 227 album_cache_string = data->getArtistId() + "#" 228 + data->Album().utf8().lower(); 229 m_albumid[album_cache_string] = data->getAlbumId(); 138 230 delete data; 139 231 } 140 232 … … 143 235 } 144 236 145 237 // Remove a file from the database 146 void FileScanner::RemoveFileFromDB (const QString &directory, const QString &filename) 238 void FileScanner::RemoveFileFromDB (const QString &directory, 239 const QString &filename) 147 240 { 148 241 QString sqlfilename(filename); 149 242 // We know that the filename will not contain :// as the SQL limits this 150 243 sqlfilename.remove(0, directory.length()); 244 sqlfilename = sqlfilename.section( '/', -1 ) ; 151 245 MSqlQuery query(MSqlQuery::InitCon()); 152 246 query.prepare("DELETE FROM music_songs WHERE " 153 247 "filename = :NAME ;"); … … 166 260 167 261 if (db_meta && disk_meta) 168 262 { 263 QString directory = filename; 264 directory.remove(0, m_startdir.length()); 265 directory = directory.section( '/', 0, -2); 266 169 267 disk_meta->setID(db_meta->ID()); 170 268 disk_meta->setRating(db_meta->Rating()); 269 270 QString album_cache_string; 271 272 // Set values from cache 273 if (m_directoryid[directory.utf8().lower()] > 0) 274 disk_meta->setDirectoryId(m_directoryid[directory 275 .utf8().lower()]); 276 if (m_artistid[disk_meta->Artist().utf8().lower()] > 0) 277 { 278 disk_meta->setArtistId(m_artistid[disk_meta->Artist() 279 .utf8().lower()]); 280 281 // The album cache depends on the artist id 282 album_cache_string = disk_meta->getArtistId() + "#" 283 + disk_meta->Album().utf8().lower(); 284 285 if (m_albumid[album_cache_string] > 0) 286 disk_meta->setAlbumId(m_albumid[album_cache_string]); 287 } 288 if (m_genreid[disk_meta->Genre().utf8().lower()] > 0) 289 disk_meta->setGenreId(m_genreid[disk_meta->Genre() 290 .utf8().lower()]); 291 292 // Commit track info to database 171 293 disk_meta->dumpToDatabase(); 294 295 // Update the cache 296 m_artistid[disk_meta->Artist().utf8().lower()] 297 = disk_meta->getArtistId(); 298 m_genreid[disk_meta->Genre().utf8().lower()] 299 = disk_meta->getGenreId(); 300 album_cache_string = disk_meta->getArtistId() + "#" 301 + disk_meta->Album().utf8().lower(); 302 m_albumid[album_cache_string] = disk_meta->getAlbumId(); 172 303 } 173 304 174 305 if (disk_meta) … … 269 400 file_checking->Close(); 270 401 delete file_checking; 271 402 } 272