mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-10 05:27:01 +03:00
MacOS auth for Spotify
This commit is contained in:
@@ -1,13 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <atomic> // or std::atomic
|
||||
#include <functional> // for function
|
||||
#include <memory> // for shared_ptr
|
||||
#include <string> // for string
|
||||
#include <atomic>
|
||||
|
||||
namespace bell {
|
||||
class WrappedSemaphore;
|
||||
};
|
||||
namespace cspot {
|
||||
struct Context;
|
||||
|
||||
@@ -35,7 +32,6 @@ class AccessKeyFetcher {
|
||||
|
||||
private:
|
||||
std::shared_ptr<cspot::Context> ctx;
|
||||
std::shared_ptr<bell::WrappedSemaphore> updateSemaphore;
|
||||
|
||||
std::atomic<bool> keyPending = false;
|
||||
std::string accessKey;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <memory>
|
||||
|
||||
#include "LoginBlob.h"
|
||||
@@ -14,6 +15,7 @@ struct Context {
|
||||
AudioFormat audioFormat = AudioFormat::AudioFormat_OGG_VORBIS_160;
|
||||
std::string deviceId;
|
||||
std::string deviceName;
|
||||
std::vector<uint8_t> authData;
|
||||
int volume;
|
||||
|
||||
std::string username;
|
||||
@@ -33,6 +35,7 @@ struct Context {
|
||||
ctx->session = std::make_shared<MercurySession>(ctx->timeProvider);
|
||||
ctx->config.deviceId = blob->getDeviceId();
|
||||
ctx->config.deviceName = blob->getDeviceName();
|
||||
ctx->config.authData = blob->authData;
|
||||
ctx->config.volume = 0;
|
||||
ctx->config.username = blob->getUserName();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user