File indexing completed on 2024-06-02 04:50:51
0001 #ifndef GENIUSSERVICE_H 0002 #define GENIUSSERVICE_H 0003 0004 #include "../pulpo.h" 0005 #include <QObject> 0006 0007 class genius : public Pulpo 0008 { 0009 Q_OBJECT 0010 0011 private: 0012 const QString KEY = "Bearer UARllo5N6CLQYVlqFwolyauSlYiyU_07YTg7HGHkWRbimN4GWPJehPP5fzu9lXeO"; 0013 const QString API = "https://api.genius.com"; 0014 0015 QString getID(const QString &url); 0016 bool getAlbumInfo(const QByteArray &array); 0017 bool extractLyrics(const QByteArray &array); 0018 0019 public: 0020 explicit genius(const FMH::MODEL &song); 0021 virtual bool setUpService(const PULPO::ONTOLOGY &ontology, const PULPO::INFO &info); 0022 0023 protected: 0024 virtual bool parseArtist(); 0025 virtual bool parseAlbum() 0026 { 0027 return false; 0028 } 0029 virtual bool parseTrack(); 0030 }; 0031 0032 #endif // GENIUSSERVICE_H