diff options
-rw-r--r-- | xbmc/filesystem/DAAPDirectory.cpp | 6 | ||||
-rw-r--r-- | xbmc/interfaces/legacy/ListItem.cpp | 2 | ||||
-rw-r--r-- | xbmc/music/MusicDatabase.cpp | 2 | ||||
-rw-r--r-- | xbmc/music/Song.cpp | 2 | ||||
-rw-r--r-- | xbmc/music/tags/MusicInfoTag.cpp | 10 | ||||
-rw-r--r-- | xbmc/music/tags/MusicInfoTag.h | 6 | ||||
-rw-r--r-- | xbmc/music/tags/TagLoaderTagLib.cpp | 10 | ||||
-rw-r--r-- | xbmc/utils/LabelFormatter.cpp | 2 |
8 files changed, 18 insertions, 22 deletions
diff --git a/xbmc/filesystem/DAAPDirectory.cpp b/xbmc/filesystem/DAAPDirectory.cpp index 3279241ec3..98406848a8 100644 --- a/xbmc/filesystem/DAAPDirectory.cpp +++ b/xbmc/filesystem/DAAPDirectory.cpp @@ -205,11 +205,7 @@ bool CDAAPDirectory::GetDirectory(const CURL& url, CFileItemList &items) pItem->GetMusicInfoTag()->SetTitle(m_currentSongItems[idx].itemname); pItem->GetMusicInfoTag()->SetArtist(m_currentSongItems[idx].songartist); pItem->GetMusicInfoTag()->SetAlbum(m_currentSongItems[idx].songalbum); - - //pItem->m_musicInfoTag.SetTrackNumber(m_currentSongItems[idx].songtracknumber); pItem->GetMusicInfoTag()->SetTrackNumber(m_thisHost->dbplaylists->playlists[c].items[j].songid); - //pItem->m_musicInfoTag.SetTrackNumber(j+1); - //pItem->m_musicInfoTag.SetPartOfSet(m_currentSongItems[idx].songdiscnumber); pItem->GetMusicInfoTag()->SetDuration((int) (m_currentSongItems[idx].songtime / 1000)); pItem->GetMusicInfoTag()->SetLoaded(true); @@ -296,7 +292,7 @@ bool CDAAPDirectory::GetDirectory(const CURL& url, CFileItemList &items) pItem->GetMusicInfoTag()->SetAlbum(m_selectedAlbum); pItem->GetMusicInfoTag()->SetTrackNumber(m_currentSongItems[c].songtracknumber); - pItem->GetMusicInfoTag()->SetPartOfSet(m_currentSongItems[c].songdiscnumber); + pItem->GetMusicInfoTag()->SetDiscNumber(m_currentSongItems[c].songdiscnumber); pItem->GetMusicInfoTag()->SetDuration((int) (m_currentSongItems[c].songtime / 1000)); pItem->GetMusicInfoTag()->SetLoaded(true); diff --git a/xbmc/interfaces/legacy/ListItem.cpp b/xbmc/interfaces/legacy/ListItem.cpp index a968d14e6c..a6cb1f9da4 100644 --- a/xbmc/interfaces/legacy/ListItem.cpp +++ b/xbmc/interfaces/legacy/ListItem.cpp @@ -411,7 +411,7 @@ namespace XBMCAddon if (key == "tracknumber") item->GetMusicInfoTag()->SetTrackNumber(strtol(value.c_str(), NULL, 10)); else if (key == "discnumber") - item->GetMusicInfoTag()->SetPartOfSet(strtol(value.c_str(), NULL, 10)); + item->GetMusicInfoTag()->SetDiscNumber(strtol(value.c_str(), NULL, 10)); else if (key == "count") item->m_iprogramCount = strtol(value.c_str(), NULL, 10); else if (key == "size") diff --git a/xbmc/music/MusicDatabase.cpp b/xbmc/music/MusicDatabase.cpp index a6a49a4799..5f339438fe 100644 --- a/xbmc/music/MusicDatabase.cpp +++ b/xbmc/music/MusicDatabase.cpp @@ -1577,7 +1577,7 @@ void CMusicDatabase::GetFileItemFromDataset(const dbiplus::sql_record* const rec // and the rest... item->GetMusicInfoTag()->SetAlbum(record->at(song_strAlbum).get_asString()); item->GetMusicInfoTag()->SetAlbumId(record->at(song_idAlbum).get_asInt()); - item->GetMusicInfoTag()->SetTrackAndDiskNumber(record->at(song_iTrack).get_asInt()); + item->GetMusicInfoTag()->SetTrackAndDiscNumber(record->at(song_iTrack).get_asInt()); item->GetMusicInfoTag()->SetDuration(record->at(song_iDuration).get_asInt()); item->GetMusicInfoTag()->SetDatabaseId(record->at(song_idSong).get_asInt(), MediaTypeSong); SYSTEMTIME stTime; diff --git a/xbmc/music/Song.cpp b/xbmc/music/Song.cpp index 2886ab6092..670fa3d325 100644 --- a/xbmc/music/Song.cpp +++ b/xbmc/music/Song.cpp @@ -70,7 +70,7 @@ CSong::CSong(CFileItem& item) strComment = tag.GetComment(); rating = tag.GetRating(); iYear = stTime.wYear; - iTrack = tag.GetTrackAndDiskNumber(); + iTrack = tag.GetTrackAndDiscNumber(); iDuration = tag.GetDuration(); bCompilation = tag.GetCompilation(); embeddedArt = tag.GetCoverArtInfo(); diff --git a/xbmc/music/tags/MusicInfoTag.cpp b/xbmc/music/tags/MusicInfoTag.cpp index 550234b0f3..e0d7d5bd1f 100644 --- a/xbmc/music/tags/MusicInfoTag.cpp +++ b/xbmc/music/tags/MusicInfoTag.cpp @@ -158,7 +158,7 @@ int CMusicInfoTag::GetDiscNumber() const return (m_iTrack >> 16); } -int CMusicInfoTag::GetTrackAndDiskNumber() const +int CMusicInfoTag::GetTrackAndDiscNumber() const { return m_iTrack; } @@ -374,14 +374,14 @@ void CMusicInfoTag::SetTrackNumber(int iTrack) m_iTrack = (m_iTrack & 0xffff0000) | (iTrack & 0xffff); } -void CMusicInfoTag::SetPartOfSet(int iPartOfSet) +void CMusicInfoTag::SetDiscNumber(int iDiscNumber) { - m_iTrack = (m_iTrack & 0xffff) | (iPartOfSet << 16); + m_iTrack = (m_iTrack & 0xffff) | (iDiscNumber << 16); } -void CMusicInfoTag::SetTrackAndDiskNumber(int iTrackAndDisc) +void CMusicInfoTag::SetTrackAndDiscNumber(int iTrackAndDisc) { - m_iTrack=iTrackAndDisc; + m_iTrack = iTrackAndDisc; } void CMusicInfoTag::SetDuration(int iSec) diff --git a/xbmc/music/tags/MusicInfoTag.h b/xbmc/music/tags/MusicInfoTag.h index 3d342d9231..c1e13a04c4 100644 --- a/xbmc/music/tags/MusicInfoTag.h +++ b/xbmc/music/tags/MusicInfoTag.h @@ -88,7 +88,7 @@ public: const std::vector<std::string>& GetGenre() const; int GetTrackNumber() const; int GetDiscNumber() const; - int GetTrackAndDiskNumber() const; + int GetTrackAndDiscNumber() const; int GetDuration() const; // may be set even if Loaded() returns false int GetYear() const; int GetDatabaseId() const; @@ -129,8 +129,8 @@ public: void SetDatabaseId(long id, const std::string &type); void SetReleaseDate(SYSTEMTIME& dateTime); void SetTrackNumber(int iTrack); - void SetPartOfSet(int m_iPartOfSet); - void SetTrackAndDiskNumber(int iTrackAndDisc); + void SetDiscNumber(int iDiscNumber); + void SetTrackAndDiscNumber(int iTrackAndDisc); void SetDuration(int iSec); void SetLoaded(bool bOnOff = true); void SetArtist(const CArtist& artist); diff --git a/xbmc/music/tags/TagLoaderTagLib.cpp b/xbmc/music/tags/TagLoaderTagLib.cpp index d63ba55209..937f782283 100644 --- a/xbmc/music/tags/TagLoaderTagLib.cpp +++ b/xbmc/music/tags/TagLoaderTagLib.cpp @@ -278,7 +278,7 @@ bool CTagLoaderTagLib::ParseASF(ASF::Tag *asf, EmbeddedArt *art, CMusicInfoTag& else tag.SetTrackNumber(atoi(it->second.front().toString().toCString(true))); } - else if (it->first == "WM/PartOfSet") tag.SetPartOfSet(atoi(it->second.front().toString().toCString(true))); + else if (it->first == "WM/PartOfSet") tag.SetDiscNumber(atoi(it->second.front().toString().toCString(true))); else if (it->first == "WM/Genre") SetGenre(tag, GetASFStringList(it->second)); else if (it->first == "WM/AlbumArtistSortOrder") {} // Known unsupported, supress warnings else if (it->first == "WM/ArtistSortOrder") {} // Known unsupported, supress warnings @@ -362,7 +362,7 @@ bool CTagLoaderTagLib::ParseID3v2Tag(ID3v2::Tag *id3v2, EmbeddedArt *art, CMusic else if (it->first == "TIT2") tag.SetTitle(it->second.front()->toString().to8Bit(true)); else if (it->first == "TCON") SetGenre(tag, GetID3v2StringList(it->second)); else if (it->first == "TRCK") tag.SetTrackNumber(strtol(it->second.front()->toString().toCString(true), NULL, 10)); - else if (it->first == "TPOS") tag.SetPartOfSet(strtol(it->second.front()->toString().toCString(true), NULL, 10)); + else if (it->first == "TPOS") tag.SetDiscNumber(strtol(it->second.front()->toString().toCString(true), NULL, 10)); else if (it->first == "TYER") tag.SetYear(strtol(it->second.front()->toString().toCString(true), NULL, 10)); else if (it->first == "TCMP") tag.SetCompilation((strtol(it->second.front()->toString().toCString(true), NULL, 10) == 0) ? false : true); else if (it->first == "TENC") {} // EncodedBy @@ -491,7 +491,7 @@ bool CTagLoaderTagLib::ParseAPETag(APE::Tag *ape, EmbeddedArt *art, CMusicInfoTa else if (it->first == "ALBUM") tag.SetAlbum(it->second.toString().to8Bit(true)); else if (it->first == "TITLE") tag.SetTitle(it->second.toString().to8Bit(true)); else if (it->first == "TRACKNUMBER" || it->first == "TRACK") tag.SetTrackNumber(it->second.toString().toInt()); - else if (it->first == "DISCNUMBER" || it->first == "DISC") tag.SetPartOfSet(it->second.toString().toInt()); + else if (it->first == "DISCNUMBER" || it->first == "DISC") tag.SetDiscNumber(it->second.toString().toInt()); else if (it->first == "YEAR") tag.SetYear(it->second.toString().toInt()); else if (it->first == "GENRE") SetGenre(tag, StringListToVectorString(it->second.toStringList())); else if (it->first == "COMMENT") tag.SetComment(it->second.toString().to8Bit(true)); @@ -530,7 +530,7 @@ bool CTagLoaderTagLib::ParseXiphComment(Ogg::XiphComment *xiph, EmbeddedArt *art else if (it->first == "ALBUM") tag.SetAlbum(it->second.front().to8Bit(true)); else if (it->first == "TITLE") tag.SetTitle(it->second.front().to8Bit(true)); else if (it->first == "TRACKNUMBER") tag.SetTrackNumber(it->second.front().toInt()); - else if (it->first == "DISCNUMBER") tag.SetPartOfSet(it->second.front().toInt()); + else if (it->first == "DISCNUMBER") tag.SetDiscNumber(it->second.front().toInt()); else if (it->first == "YEAR") tag.SetYear(it->second.front().toInt()); else if (it->first == "DATE") tag.SetYear(it->second.front().toInt()); else if (it->first == "GENRE") SetGenre(tag, StringListToVectorString(it->second)); @@ -623,7 +623,7 @@ bool CTagLoaderTagLib::ParseMP4Tag(MP4::Tag *mp4, EmbeddedArt *art, CMusicInfoTa else if (it->first == "\251cmt") tag.SetComment(it->second.toStringList().front().to8Bit(true)); else if (it->first == "cpil") tag.SetCompilation(it->second.toBool()); else if (it->first == "trkn") tag.SetTrackNumber(it->second.toIntPair().first); - else if (it->first == "disk") tag.SetPartOfSet(it->second.toIntPair().first); + else if (it->first == "disk") tag.SetDiscNumber(it->second.toIntPair().first); else if (it->first == "\251day") tag.SetYear(it->second.toStringList().front().toInt()); else if (it->first == "----:com.apple.iTunes:replaygain_track_gain") tag.SetReplayGainTrackGain((int)(atof(it->second.toStringList().front().toCString()) * 100 + 0.5)); diff --git a/xbmc/utils/LabelFormatter.cpp b/xbmc/utils/LabelFormatter.cpp index 0169c3d74d..7ad8201d91 100644 --- a/xbmc/utils/LabelFormatter.cpp +++ b/xbmc/utils/LabelFormatter.cpp @@ -400,7 +400,7 @@ void CLabelFormatter::FillMusicMaskContent(const char mask, const std::string &v tag->SetTrackNumber(atol(value.c_str())); break; case 'S': - tag->SetPartOfSet(atol(value.c_str())); + tag->SetDiscNumber(atol(value.c_str())); break; case 'A': tag->SetArtist(value); |