Change ids to qint64

This commit is contained in:
Jonas Kvinge
2019-06-19 20:40:11 +02:00
parent 7c0ab4212b
commit 8ce8e320c3
9 changed files with 102 additions and 105 deletions

View File

@@ -78,30 +78,30 @@ class TidalRequest : public TidalBaseRequest {
void ArtistsReplyReceived(QNetworkReply *reply, const int limit_requested, const int offset_requested);
void AlbumsReplyReceived(QNetworkReply *reply, const int limit_requested, const int offset_requested);
void AlbumsReceived(QNetworkReply *reply, const int artist_id_requested, const int limit_requested, const int offset_requested, const bool auto_login);
void AlbumsReceived(QNetworkReply *reply, const qint64 artist_id_requested, const int limit_requested, const int offset_requested, const bool auto_login);
void SongsReplyReceived(QNetworkReply *reply, const int limit_requested, const int offset_requested);
void SongsReceived(QNetworkReply *reply, const int artist_id, const int album_id, const int limit_requested, const int offset_requested, const bool auto_login = false, const QString &album_artist = QString());
void SongsReceived(QNetworkReply *reply, const qint64 artist_id, const qint64 album_id, const int limit_requested, const int offset_requested, const bool auto_login = false, const QString &album_artist = QString());
void ArtistAlbumsReplyReceived(QNetworkReply *reply, const int artist_id, const int offset_requested);
void AlbumSongsReplyReceived(QNetworkReply *reply, const int artist_id, const int album_id, const int offset_requested, const QString &album_artist);
void AlbumCoverReceived(QNetworkReply *reply, const int album_id, const QUrl &url);
void ArtistAlbumsReplyReceived(QNetworkReply *reply, const qint64 artist_id, const int offset_requested);
void AlbumSongsReplyReceived(QNetworkReply *reply, const qint64 artist_id, const qint64 album_id, const int offset_requested, const QString &album_artist);
void AlbumCoverReceived(QNetworkReply *reply, const qint64 album_id, const QUrl &url);
private:
typedef QPair<QString, QString> Param;
typedef QList<Param> ParamList;
struct Request {
int artist_id = 0;
int album_id = 0;
int song_id = 0;
qint64 artist_id = 0;
qint64 album_id = 0;
qint64 song_id = 0;
int offset = 0;
int limit = 0;
QString album_artist;
};
struct AlbumCoverRequest {
int artist_id = 0;
int album_id = 0;
qint64 artist_id = 0;
qint64 album_id = 0;
QUrl url;
};
@@ -127,16 +127,16 @@ class TidalRequest : public TidalBaseRequest {
void FlushSongsRequests();
void ArtistsFinishCheck(const int limit = 0, const int offset = 0, const int artists_received = 0);
void AlbumsFinishCheck(const int artist_id, const int limit = 0, const int offset = 0, const int albums_total = 0, const int albums_received = 0);
void SongsFinishCheck(const int artist_id, const int album_id, const int limit, const int offset, const int songs_total, const int songs_received, const QString &album_artist);
void AlbumsFinishCheck(const qint64 artist_id, const int limit = 0, const int offset = 0, const int albums_total = 0, const int albums_received = 0);
void SongsFinishCheck(const qint64 artist_id, const qint64 album_id, const int limit, const int offset, const int songs_total, const int songs_received, const QString &album_artist);
void AddArtistAlbumsRequest(const int artist_id, const int offset = 0);
void AddArtistAlbumsRequest(const qint64 artist_id, const int offset = 0);
void FlushArtistAlbumsRequests();
void AddAlbumSongsRequest(const int artist_id, const int album_id, const QString &album_artist, const int offset = 0);
void AddAlbumSongsRequest(const qint64 artist_id, const qint64 album_id, const QString &album_artist, const int offset = 0);
void FlushAlbumSongsRequests();
int ParseSong(Song &song, const QJsonObject &json_obj, const int artist_id_requested = 0, const int album_id_requested = 0, const QString &album_artist = QString());
int ParseSong(Song &song, const QJsonObject &json_obj, const qint64 artist_id_requested = 0, const qint64 album_id_requested = 0, const QString &album_artist = QString());
void GetAlbumCovers();
void AddAlbumCoverRequest(Song &song);