Remove tidal and qobuz

Fixes #369
This commit is contained in:
Jonas Kvinge
2020-02-25 01:08:03 +01:00
parent 7312e3f452
commit 2e0f7b367f
66 changed files with 43 additions and 9578 deletions

View File

@@ -67,15 +67,6 @@
#include "internet/internetservices.h"
#include "internet/internetsearch.h"
#ifdef HAVE_TIDAL
# include "tidal/tidalservice.h"
# include "covermanager/tidalcoverprovider.h"
#endif
#ifdef HAVE_QOBUZ
# include "qobuz/qobuzservice.h"
#endif
#ifdef HAVE_SUBSONIC
# include "subsonic/subsonicservice.h"
#endif
@@ -121,9 +112,6 @@ class ApplicationImpl {
cover_providers->AddProvider(new DiscogsCoverProvider(app, app));
cover_providers->AddProvider(new MusicbrainzCoverProvider(app, app));
cover_providers->AddProvider(new DeezerCoverProvider(app, app));
#ifdef HAVE_TIDAL
cover_providers->AddProvider(new TidalCoverProvider(app, app));
#endif
return cover_providers;
}),
album_cover_loader_([=]() {
@@ -141,23 +129,11 @@ class ApplicationImpl {
}),
internet_services_([=]() {
InternetServices *internet_services = new InternetServices(app);
#ifdef HAVE_TIDAL
internet_services->AddService(new TidalService(app, internet_services));
#endif
#ifdef HAVE_QOBUZ
internet_services->AddService(new QobuzService(app, internet_services));
#endif
#ifdef HAVE_SUBSONIC
internet_services->AddService(new SubsonicService(app, internet_services));
#endif
return internet_services;
}),
#ifdef HAVE_TIDAL
tidal_search_([=]() { return new InternetSearch(app, Song::Source_Tidal, app); }),
#endif
#ifdef HAVE_QOBUZ
qobuz_search_([=]() { return new InternetSearch(app, Song::Source_Qobuz, app); }),
#endif
scrobbler_([=]() { return new AudioScrobbler(app, app); }),
#ifdef HAVE_MOODBAR
@@ -185,12 +161,6 @@ class ApplicationImpl {
Lazy<CurrentAlbumCoverLoader> current_albumcover_loader_;
Lazy<LyricsProviders> lyrics_providers_;
Lazy<InternetServices> internet_services_;
#ifdef HAVE_TIDAL
Lazy<InternetSearch> tidal_search_;
#endif
#ifdef HAVE_QOBUZ
Lazy<InternetSearch> qobuz_search_;
#endif
Lazy<AudioScrobbler> scrobbler_;
#ifdef HAVE_MOODBAR
Lazy<MoodbarLoader> moodbar_loader_;
@@ -319,12 +289,6 @@ LyricsProviders *Application::lyrics_providers() const { return p_->lyrics_provi
PlaylistBackend *Application::playlist_backend() const { return p_->playlist_backend_.get(); }
PlaylistManager *Application::playlist_manager() const { return p_->playlist_manager_.get(); }
InternetServices *Application::internet_services() const { return p_->internet_services_.get(); }
#ifdef HAVE_TIDAL
InternetSearch *Application::tidal_search() const { return p_->tidal_search_.get(); }
#endif
#ifdef HAVE_QOBUZ
InternetSearch *Application::qobuz_search() const { return p_->qobuz_search_.get(); }
#endif
AudioScrobbler *Application::scrobbler() const { return p_->scrobbler_.get(); }
#ifdef HAVE_MOODBAR
MoodbarController *Application::moodbar_controller() const { return p_->moodbar_controller_.get(); }

View File

@@ -97,12 +97,6 @@ class Application : public QObject {
AudioScrobbler *scrobbler() const;
InternetServices *internet_services() const;
#ifdef HAVE_TIDAL
InternetSearch *tidal_search() const;
#endif
#ifdef HAVE_QOBUZ
InternetSearch *qobuz_search() const;
#endif
#ifdef HAVE_MOODBAR
MoodbarController *moodbar_controller() const;
@@ -114,7 +108,7 @@ class Application : public QObject {
QThread *MoveToNewThread(QObject *object);
void MoveToThread(QObject *object, QThread *thread);
private slots:
private slots:
void ExitReceived();
public slots:
@@ -122,7 +116,7 @@ private slots:
void ReloadSettings();
void OpenSettingsDialogAtPage(SettingsDialog::Page page);
signals:
signals:
void ErrorAdded(const QString &message);
void SettingsChanged();
void SettingsDialogRequested(SettingsDialog::Page page);

View File

@@ -54,7 +54,7 @@
#include "scopedtransaction.h"
const char *Database::kDatabaseFilename = "strawberry.db";
const int Database::kSchemaVersion = 9;
const int Database::kSchemaVersion = 10;
const char *Database::kMagicAllSongsTables = "%allsongstables";
int Database::sNextConnectionId = 1;

View File

@@ -105,7 +105,6 @@ static const QMap<QString, IconProperties> iconmapper_ = {
{ "moodbar", { {"preferences-desktop-icons"}, 0, 0 } },
{ "nvidia", { {}, 0, 0 } },
{ "pulseaudio", { {}, 0, 0 } },
{ "qobuz", { {}, 0, 0 } },
{ "realtek", { {}, 0, 0 } },
{ "scrobble-disabled", { {}, 0, 0 } },
{ "scrobble", { {}, 0, 0 } },
@@ -116,7 +115,6 @@ static const QMap<QString, IconProperties> iconmapper_ = {
{ "star", { {}, 0, 0 } },
{ "strawberry", { {}, 0, 0 } },
{ "subsonic", { {}, 0, 0 } },
{ "tidal", { {}, 0, 0 } },
{ "tools-wizard", { {}, 0, 0 } },
{ "view-choose", { {}, 0, 0 } },
{ "view-fullscreen", { {}, 0, 0 } },

View File

@@ -144,13 +144,6 @@
#include "settings/behavioursettingspage.h"
#include "settings/backendsettingspage.h"
#include "settings/playlistsettingspage.h"
#ifdef HAVE_TIDAL
# include "tidal/tidalservice.h"
# include "settings/tidalsettingspage.h"
#endif
#ifdef HAVE_QOBUZ
# include "settings/qobuzsettingspage.h"
#endif
#ifdef HAVE_SUBSONIC
# include "settings/subsonicsettingspage.h"
#endif
@@ -230,12 +223,6 @@ MainWindow::MainWindow(Application *app, SystemTrayIcon *tray_icon, OSD *osd, co
dialog->SetDestinationModel(app->collection()->model()->directory_model());
return dialog;
}),
#ifdef HAVE_TIDAL
tidal_view_(new InternetTabsView(app_, app->internet_services()->ServiceBySource(Song::Source_Tidal), app_->tidal_search(), TidalSettingsPage::kSettingsGroup, SettingsDialog::Page_Tidal, this)),
#endif
#ifdef HAVE_QOBUZ
qobuz_view_(new InternetTabsView(app_, app->internet_services()->ServiceBySource(Song::Source_Qobuz), app_->qobuz_search(), QobuzSettingsPage::kSettingsGroup, SettingsDialog::Page_Qobuz, this)),
#endif
#ifdef HAVE_SUBSONIC
subsonic_view_(new InternetSongsView(app_, app->internet_services()->ServiceBySource(Song::Source_Subsonic), SubsonicSettingsPage::kSettingsGroup, SettingsDialog::Page_Subsonic, this)),
#endif
@@ -288,12 +275,6 @@ MainWindow::MainWindow(Application *app, SystemTrayIcon *tray_icon, OSD *osd, co
#ifndef Q_OS_WIN
ui_->tabs->AddTab(device_view_, "devices", IconLoader::Load("device"), tr("Devices"));
#endif
#ifdef HAVE_TIDAL
ui_->tabs->AddTab(tidal_view_, "tidal", IconLoader::Load("tidal"), tr("Tidal"));
#endif
#ifdef HAVE_QOBUZ
ui_->tabs->AddTab(qobuz_view_, "qobuz", IconLoader::Load("qobuz"), tr("Qobuz"));
#endif
#ifdef HAVE_SUBSONIC
ui_->tabs->AddTab(subsonic_view_, "subsonic", IconLoader::Load("subsonic"), tr("Subsonic"));
#endif
@@ -578,22 +559,6 @@ MainWindow::MainWindow(Application *app, SystemTrayIcon *tray_icon, OSD *osd, co
collection_view_->filter()->AddMenuAction(separator);
collection_view_->filter()->AddMenuAction(collection_config_action);
#ifdef HAVE_TIDAL
connect(tidal_view_->artists_collection_view(), SIGNAL(AddToPlaylistSignal(QMimeData*)), SLOT(AddToPlaylist(QMimeData*)));
connect(tidal_view_->albums_collection_view(), SIGNAL(AddToPlaylistSignal(QMimeData*)), SLOT(AddToPlaylist(QMimeData*)));
connect(tidal_view_->songs_collection_view(), SIGNAL(AddToPlaylistSignal(QMimeData*)), SLOT(AddToPlaylist(QMimeData*)));
connect(tidal_view_->search_view(), SIGNAL(AddToPlaylist(QMimeData*)), SLOT(AddToPlaylist(QMimeData*)));
if (TidalService *tidalservice = qobject_cast<TidalService*> (app_->internet_services()->ServiceBySource(Song::Source_Tidal)))
connect(this, SIGNAL(AuthorisationUrlReceived(const QUrl&)), tidalservice, SLOT(AuthorisationUrlReceived(const QUrl&)));
#endif
#ifdef HAVE_QOBUZ
connect(qobuz_view_->artists_collection_view(), SIGNAL(AddToPlaylistSignal(QMimeData*)), SLOT(AddToPlaylist(QMimeData*)));
connect(qobuz_view_->albums_collection_view(), SIGNAL(AddToPlaylistSignal(QMimeData*)), SLOT(AddToPlaylist(QMimeData*)));
connect(qobuz_view_->songs_collection_view(), SIGNAL(AddToPlaylistSignal(QMimeData*)), SLOT(AddToPlaylist(QMimeData*)));
connect(qobuz_view_->search_view(), SIGNAL(AddToPlaylist(QMimeData*)), SLOT(AddToPlaylist(QMimeData*)));
#endif
#ifdef HAVE_SUBSONIC
connect(subsonic_view_->view(), SIGNAL(AddToPlaylistSignal(QMimeData*)), SLOT(AddToPlaylist(QMimeData*)));
#endif
@@ -916,26 +881,6 @@ void MainWindow::ReloadSettings() {
}
}
#ifdef HAVE_TIDAL
settings.beginGroup(TidalSettingsPage::kSettingsGroup);
bool enable_tidal = settings.value("enabled", false).toBool();
settings.endGroup();
if (enable_tidal)
ui_->tabs->EnableTab(tidal_view_);
else
ui_->tabs->DisableTab(tidal_view_);
#endif
#ifdef HAVE_QOBUZ
settings.beginGroup(QobuzSettingsPage::kSettingsGroup);
bool enable_qobuz = settings.value("enabled", false).toBool();
settings.endGroup();
if (enable_qobuz)
ui_->tabs->EnableTab(qobuz_view_);
else
ui_->tabs->DisableTab(qobuz_view_);
#endif
#ifdef HAVE_SUBSONIC
settings.beginGroup(SubsonicSettingsPage::kSettingsGroup);
bool enable_subsonic = settings.value("enabled", false).toBool();
@@ -966,12 +911,6 @@ void MainWindow::ReloadAllSettings() {
album_cover_choice_controller_->ReloadSettings();
if (cover_manager_.get()) cover_manager_->ReloadSettings();
context_view_->ReloadSettings();
#ifdef HAVE_TIDAL
tidal_view_->ReloadSettings();
#endif
#ifdef HAVE_QOBUZ
qobuz_view_->ReloadSettings();
#endif
#ifdef HAVE_SUBSONIC
subsonic_view_->ReloadSettings();
#endif
@@ -2043,14 +1982,6 @@ void MainWindow::CommandlineOptionsReceived(const CommandlineOptions &options) {
if (!options.urls().empty()) {
#ifdef HAVE_TIDAL
for (const QUrl url : options.urls()) {
if (url.scheme() == "tidal" && url.host() == "login") {
emit AuthorisationUrlReceived(url);
return;
}
}
#endif
MimeData *data = new MimeData;
data->setUrls(options.urls());
// Behaviour depends on command line options, so set it here

View File

@@ -315,8 +315,6 @@ class MainWindow : public QMainWindow, public PlatformInterface {
std::unique_ptr<TrackSelectionDialog> track_selection_dialog_;
PlaylistItemList autocomplete_tag_items_;
InternetTabsView *tidal_view_;
InternetTabsView *qobuz_view_;
InternetSongsView *subsonic_view_;
QAction *collection_show_all_;