Use URL Handler for Tidal
This commit is contained in:
@@ -110,7 +110,6 @@ class InternetModel : public QStandardItemModel {
|
||||
|
||||
template <typename T>
|
||||
static T *Service() {
|
||||
//return static_cast<T*>(ServiceByName(T::kServiceName));
|
||||
return static_cast<T*>(ServiceBySource(T::kSource));
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,6 @@
|
||||
#include "internetmodel.h"
|
||||
#include "internetservice.h"
|
||||
|
||||
InternetService::InternetService(Song::Source source, const QString &name, Application *app, InternetModel *model, QObject *parent)
|
||||
: QObject(parent), app_(app), model_(model), source_(source), name_(name) {
|
||||
InternetService::InternetService(Song::Source source, const QString &name, const QString &url_scheme, Application *app, InternetModel *model, QObject *parent)
|
||||
: QObject(parent), app_(app), model_(model), source_(source), name_(name), url_scheme_(url_scheme) {
|
||||
}
|
||||
|
||||
@@ -42,10 +42,11 @@ class InternetService : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
InternetService(Song::Source source, const QString &name, Application *app, InternetModel *model, QObject *parent = nullptr);
|
||||
InternetService(Song::Source source, const QString &name, const QString &url_scheme, Application *app, InternetModel *model, QObject *parent = nullptr);
|
||||
virtual ~InternetService() {}
|
||||
Song::Source source() const { return source_; }
|
||||
QString name() const { return name_; }
|
||||
QString url_scheme() const { return url_scheme_; }
|
||||
InternetModel *model() const { return model_; }
|
||||
virtual bool has_initial_load_settings() const { return false; }
|
||||
virtual void InitialLoadSettings() {}
|
||||
@@ -61,6 +62,7 @@ class InternetService : public QObject {
|
||||
InternetModel *model_;
|
||||
Song::Source source_;
|
||||
QString name_;
|
||||
QString url_scheme_;
|
||||
|
||||
};
|
||||
Q_DECLARE_METATYPE(InternetService*);
|
||||
|
||||
Reference in New Issue
Block a user