feat: seeking support and Last.fm scrobbling
Seeking: - Rust player: seek_requested/seek_target_secs atomics on PlayerStatus - Decoder loop checks for seek each iteration, calls format.seek() and resets decoder - New qobuz_backend_seek C FFI + QobuzBackend::seek(quint64) - Progress slider onProgressReleased now seeks to the dragged position Last.fm: - LastFmScrobbler: now-playing + scrobble (50% or 240s threshold, min 30s) - API signature follows Last.fm spec (sorted params, md5) - Settings dialog: API key/secret, username/password, Connect button with status - AppSettings: lastfm/enabled, api_key, api_secret, session_key - Scrobbler wired to trackChanged, positionChanged, trackFinished in MainWindow Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -31,6 +31,19 @@ public:
|
||||
bool rememberLogin() const { return m_settings.value("auth/remember", true).toBool(); }
|
||||
void setRememberLogin(bool r) { m_settings.setValue("auth/remember", r); }
|
||||
|
||||
// --- Last.fm ---
|
||||
bool lastFmEnabled() const { return m_settings.value("lastfm/enabled", false).toBool(); }
|
||||
void setLastFmEnabled(bool v) { m_settings.setValue("lastfm/enabled", v); }
|
||||
|
||||
QString lastFmApiKey() const { return m_settings.value("lastfm/api_key").toString(); }
|
||||
void setLastFmApiKey(const QString &v) { m_settings.setValue("lastfm/api_key", v); }
|
||||
|
||||
QString lastFmApiSecret() const { return m_settings.value("lastfm/api_secret").toString(); }
|
||||
void setLastFmApiSecret(const QString &v) { m_settings.setValue("lastfm/api_secret", v); }
|
||||
|
||||
QString lastFmSessionKey() const { return m_settings.value("lastfm/session_key").toString(); }
|
||||
void setLastFmSessionKey(const QString &v){ m_settings.setValue("lastfm/session_key", v); }
|
||||
|
||||
private:
|
||||
AppSettings() : m_settings("qobuz-qt", "qobuz-qt") {}
|
||||
QSettings m_settings;
|
||||
|
||||
Reference in New Issue
Block a user