Skip to content
Browse files

[musicdb] Modify album/artist getters to use int instead of long

  • Loading branch information...
1 parent b6f4065 commit dcebded41de7fc43aa5d8b79588f6a4ca0a0d99d @night199uk committed
Showing with 14 additions and 14 deletions.
  1. +4 −4 xbmc/music/MusicDatabase.cpp
  2. +4 −4 xbmc/music/MusicDatabase.h
  3. +6 −6 xbmc/music/infoscanner/MusicInfoScanner.cpp
View
8 xbmc/music/MusicDatabase.cpp
@@ -643,7 +643,7 @@ bool CMusicDatabase::AddAlbumGenre(int idGenre, int idAlbum, int iOrder)
return ExecuteQuery(strSQL);
};
-bool CMusicDatabase::GetAlbumsByArtist(int idArtist, bool includeFeatured, std::vector<long> &albums)
+bool CMusicDatabase::GetAlbumsByArtist(int idArtist, bool includeFeatured, std::vector<int> &albums)
{
try
{
@@ -677,7 +677,7 @@ bool CMusicDatabase::GetAlbumsByArtist(int idArtist, bool includeFeatured, std::
return false;
}
-bool CMusicDatabase::GetArtistsByAlbum(int idAlbum, bool includeFeatured, std::vector<long> &artists)
+bool CMusicDatabase::GetArtistsByAlbum(int idAlbum, bool includeFeatured, std::vector<int>& artists)
{
try
{
@@ -711,7 +711,7 @@ bool CMusicDatabase::GetArtistsByAlbum(int idAlbum, bool includeFeatured, std::v
return false;
}
-bool CMusicDatabase::GetSongsByArtist(int idArtist, bool includeFeatured, std::vector<long> &songs)
+bool CMusicDatabase::GetSongsByArtist(int idArtist, bool includeFeatured, std::vector<int> &songs)
{
try
{
@@ -745,7 +745,7 @@ bool CMusicDatabase::GetSongsByArtist(int idArtist, bool includeFeatured, std::v
return false;
};
-bool CMusicDatabase::GetArtistsBySong(int idSong, bool includeFeatured, std::vector<long> &artists)
+bool CMusicDatabase::GetArtistsBySong(int idSong, bool includeFeatured, std::vector<int> &artists)
{
try
{
View
8 xbmc/music/MusicDatabase.h
@@ -128,10 +128,10 @@ class CMusicDatabase : public CDatabase
bool GetAlbumFromSong(int idSong, CAlbum &album);
bool GetAlbumFromSong(const CSong &song, CAlbum &album);
- bool GetAlbumsByArtist(int idArtist, bool includeFeatured, std::vector<long>& albums);
- bool GetArtistsByAlbum(int idAlbum, bool includeFeatured, std::vector<long>& artists);
- bool GetSongsByArtist(int idArtist, bool includeFeatured, std::vector<long>& songs);
- bool GetArtistsBySong(int idSong, bool includeFeatured, std::vector<long>& artists);
+ bool GetAlbumsByArtist(int idArtist, bool includeFeatured, std::vector<int>& albums);
+ bool GetArtistsByAlbum(int idAlbum, bool includeFeatured, std::vector<int>& artists);
+ bool GetSongsByArtist(int idArtist, bool includeFeatured, std::vector<int>& songs);
+ bool GetArtistsBySong(int idSong, bool includeFeatured, std::vector<int>& artists);
bool GetArbitraryQuery(const CStdString& strQuery, const CStdString& strOpenRecordSet, const CStdString& strCloseRecordSet,
const CStdString& strOpenRecord, const CStdString& strCloseRecord, const CStdString& strOpenField, const CStdString& strCloseField, CStdString& strResult);
View
12 xbmc/music/infoscanner/MusicInfoScanner.cpp
@@ -533,8 +533,8 @@ int CMusicInfoScanner::RetrieveMusicInfo(CFileItemList& items, const CStdString&
// finally, add these to the database
m_musicDatabase.BeginTransaction();
int numAdded = 0;
- set<long> albumsToScan;
- set<long> artistsToScan;
+ set<int> albumsToScan;
+ set<int> artistsToScan;
for (VECALBUMS::iterator i = albums.begin(); i != albums.end(); ++i)
{
vector<int> songIDs;
@@ -550,11 +550,11 @@ int CMusicInfoScanner::RetrieveMusicInfo(CFileItemList& items, const CStdString&
albumsToScan.insert(idAlbum);
for (vector<int>::iterator j = songIDs.begin(); j != songIDs.end(); ++j)
{
- vector<long> songArtists;
+ vector<int> songArtists;
m_musicDatabase.GetArtistsBySong(*j, false, songArtists);
artistsToScan.insert(songArtists.begin(), songArtists.end());
}
- std::vector<long> albumArtists;
+ std::vector<int> albumArtists;
m_musicDatabase.GetArtistsByAlbum(idAlbum, false, albumArtists);
artistsToScan.insert(albumArtists.begin(), albumArtists.end());
}
@@ -562,7 +562,7 @@ int CMusicInfoScanner::RetrieveMusicInfo(CFileItemList& items, const CStdString&
// Download info & artwork
bool bCanceled;
- for (set<long>::iterator it = artistsToScan.begin(); it != artistsToScan.end(); ++it)
+ for (set<int>::iterator it = artistsToScan.begin(); it != artistsToScan.end(); ++it)
{
bCanceled = false;
if (find(m_artistsScanned.begin(),m_artistsScanned.end(), *it) == m_artistsScanned.end())
@@ -587,7 +587,7 @@ int CMusicInfoScanner::RetrieveMusicInfo(CFileItemList& items, const CStdString&
if (m_flags & SCAN_ONLINE)
{
- for (set<long>::iterator it = albumsToScan.begin(); it != albumsToScan.end(); ++it)
+ for (set<int>::iterator it = albumsToScan.begin(); it != albumsToScan.end(); ++it)
{
if (m_bStop)
return songsToAdd.size();

0 comments on commit dcebded

Please sign in to comment.
Something went wrong with that request. Please try again.