Ticket #3697: mythmusic-comp.patch
File mythmusic-comp.patch, 1.7 KB (added by , 17 years ago) |
---|
-
mythmusic/mythmusic/metaiotaglib.cpp
old new bool MetaIOTagLib::write(Metadata* mdata 122 122 Metadata* MetaIOTagLib::read(QString filename) 123 123 { 124 124 QString artist = "", compilation_artist = "", album = "", title = "", 125 genre = "" ;125 genre = "", musicbrainz_id = ""; 126 126 int year = 0, tracknum = 0, length = 0, playcount = 0, rating = 0, id = 0; 127 127 bool compilation = false; 128 128 QValueList<struct AlbumArtImage> albumart; … … Metadata* MetaIOTagLib::read(QString fil 156 156 { 157 157 // Compilation Artist (TPE4) 158 158 if(!taglib->ID3v2Tag()->frameListMap()["TPE4"].isEmpty()) 159 { 159 160 compilation_artist = TStringToQString( 160 161 taglib->ID3v2Tag()->frameListMap()["TPE4"].front()->toString() 161 .stripWhiteSpace()); 162 .stripWhiteSpace()); 163 } 162 164 163 165 // Look for MusicBrainz Album+Artist ID in TXXX Frame 164 166 UserTextIdentificationFrame *musicbrainz = find(taglib->ID3v2Tag(), … … Metadata* MetaIOTagLib::read(QString fil 166 168 167 169 if (musicbrainz) 168 170 { 171 musicbrainz_id = TStringToQString(musicbrainz->toString()); 172 169 173 // If the MusicBrainz ID is the special "Various Artists" ID 170 174 // then compilation is TRUE 171 compilation = (MYTH_MUSICBRAINZ_ALBUMARTIST_UUID 172 == TStringToQString(musicbrainz->toString())); 175 compilation = musicbrainz_id.contains(MYTH_MUSICBRAINZ_ALBUMARTIST_UUID, FALSE); 173 176 } 174 177 175 178 // Length