Add Spotify support

This commit is contained in:
Jonas Kvinge
2022-06-04 15:51:35 +02:00
parent f33b30fe79
commit 5f540a4c08
44 changed files with 4486 additions and 346 deletions

View File

@@ -37,6 +37,9 @@
#include "enginebase.h"
#include "settings/backendsettingspage.h"
#include "settings/networkproxysettingspage.h"
#ifdef HAVE_SPOTIFY
# include "settings/spotifysettingspage.h"
#endif
EngineBase::EngineBase(QObject *parent)
: QObject(parent),
@@ -239,6 +242,15 @@ void EngineBase::ReloadSettings() {
s.endGroup();
#ifdef HAVE_SPOTIFY
s.beginGroup(SpotifySettingsPage::kSettingsGroup);
spotify_username_ = s.value("username").toString();
QByteArray password = s.value("password").toByteArray();
if (password.isEmpty()) spotify_password_.clear();
else spotify_password_ = QString::fromUtf8(QByteArray::fromBase64(password));
s.endGroup();
#endif
}
void EngineBase::EmitAboutToFinish() {