File indexing completed on 2025-01-19 04:23:50

0001 #pragma once
0002 #include "abstractmusicprovider.h"
0003 #include <QObject>
0004 
0005 class NextMusic : public AbstractMusicProvider
0006 {
0007     Q_OBJECT
0008 public:
0009     explicit NextMusic(QObject *parent = nullptr);
0010     QVariantList getAlbumsList() const override final;
0011     QVariantList getArtistsList() const override final;
0012 
0013     FMH::MODEL getTrackItem(const QString &id);
0014     void getTrackPath(const QString &id);
0015 
0016     void getCollection(const std::initializer_list<QString> &parameters = {}) override final;
0017     void getTracks() override final;
0018     void getTrack(const QString &id) override final;
0019     void getArtists() override final;
0020     void getArtist(const QString &id) override final;
0021     void getAlbums() override final;
0022     void getAlbum(const QString &id) override final;
0023     void getPlaylists() override final;
0024     void getPlaylist(const QString &id) override final;
0025     void getFolders() override final;
0026     void getFolder(const QString &id) override final;    
0027 
0028 private:
0029     const static QString API;
0030     static const QString formatUrl(const QString &user, const QString &password, const QString &provider);
0031 
0032     FMH::MODEL_LIST parseCollection(const QByteArray &array);
0033 
0034     QVariantList m_artists;
0035     QVariantList m_albums;
0036     QHash<QString, FMH::MODEL> m_tracks; //(id: trackMap)
0037 };