Ticket #3697: mythmusic-comp.patch

File mythmusic-comp.patch, 1.7 KB (added by maverik044, 14 years ago)
  • mythmusic/mythmusic/metaiotaglib.cpp

    old new bool MetaIOTagLib::write(Metadata* mdata 
    122122Metadata* MetaIOTagLib::read(QString filename)
    123123{
    124124    QString artist = "", compilation_artist = "", album = "", title = "",
    125             genre = "";
     125            genre = "", musicbrainz_id = "";
    126126    int year = 0, tracknum = 0, length = 0, playcount = 0, rating = 0, id = 0;
    127127    bool compilation = false;
    128128    QValueList<struct AlbumArtImage> albumart;
    Metadata* MetaIOTagLib::read(QString fil 
    156156    {
    157157        // Compilation Artist (TPE4)
    158158        if(!taglib->ID3v2Tag()->frameListMap()["TPE4"].isEmpty())
     159        {
    159160            compilation_artist = TStringToQString(
    160161            taglib->ID3v2Tag()->frameListMap()["TPE4"].front()->toString()
    161                 .stripWhiteSpace());
     162                .stripWhiteSpace());               
     163        }
    162164
    163165        // Look for MusicBrainz Album+Artist ID in TXXX Frame
    164166        UserTextIdentificationFrame *musicbrainz = find(taglib->ID3v2Tag(),
    Metadata* MetaIOTagLib::read(QString fil 
    166168
    167169        if (musicbrainz)
    168170        {
     171            musicbrainz_id = TStringToQString(musicbrainz->toString());
     172           
    169173            // If the MusicBrainz ID is the special "Various Artists" ID
    170174            // then compilation is TRUE
    171             compilation = (MYTH_MUSICBRAINZ_ALBUMARTIST_UUID
    172                 == TStringToQString(musicbrainz->toString()));
     175            compilation = musicbrainz_id.contains(MYTH_MUSICBRAINZ_ALBUMARTIST_UUID, FALSE);
    173176        }
    174177
    175178        // Length