feat: add autoplay suggestions when queue runs out
Some checks failed
Build for Windows / build-windows (push) Has been cancelled
Some checks failed
Build for Windows / build-windows (push) Has been cancelled
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkReply>
|
||||
#include <QJsonObject>
|
||||
#include <QVector>
|
||||
|
||||
class MainToolBar : public QToolBar
|
||||
{
|
||||
@@ -47,6 +48,8 @@ private slots:
|
||||
void onTrackTransitioned();
|
||||
void onQueueChanged();
|
||||
void onShuffleToggled(bool checked);
|
||||
void onAutoplayToggled(bool checked);
|
||||
void onDynamicSuggestionsLoaded(const QJsonObject &result);
|
||||
|
||||
void fetchAlbumArt(const QString &url);
|
||||
void onAlbumArtReady(QNetworkReply *reply);
|
||||
@@ -65,6 +68,7 @@ private:
|
||||
QLabel *m_position = nullptr;
|
||||
QWidget *m_rightSpacer = nullptr;
|
||||
QAction *m_shuffle = nullptr;
|
||||
QAction *m_autoplay = nullptr;
|
||||
VolumeButton *m_volume = nullptr;
|
||||
QAction *m_queueBtn = nullptr;
|
||||
QAction *m_search = nullptr;
|
||||
@@ -72,6 +76,10 @@ private:
|
||||
QNetworkAccessManager *m_nam = nullptr;
|
||||
QString m_currentArtUrl;
|
||||
QJsonObject m_currentTrack;
|
||||
QVector<QJsonObject> m_recentTracks;
|
||||
bool m_playing = false;
|
||||
bool m_seeking = false;
|
||||
bool m_fetchingAutoplay = false;
|
||||
|
||||
void requestAutoplaySuggestions();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user