DoViGUI/qmoviedb.h
Adam Bissen 28ab770b3e Add handbrake encode progress to UI.
Add encode stop button.
Movie now searches when selected. First result in UI.
2024-01-13 10:56:24 +00:00

31 lines
608 B
C++

#ifndef QMOVIEDB_H
#define QMOVIEDB_H
#include <QObject>
#include <QNetworkAccessManager>
#include <QJsonObject>
class QMovieDB : public QObject
{
Q_OBJECT
public:
explicit QMovieDB(QString apiKey, QObject *parent = nullptr);
QNetworkAccessManager *netMan;
void searchMovieTitle(const QString title);
Q_INVOKABLE void searchMovieTitleFile(const QString file);
private:
QString movieDbApiKey;
private slots:
void receiveReply(QNetworkReply *reply);
void parseResults(QJsonObject json);
signals:
void searchResultReturned(QString fullTitle);
};
#endif // QMOVIEDB_H