Core: re-apply YouTube config (API key) on reload
reloadConfig/updateConfig updated the network proxy but never re-pushed the YouTube settings, so editing youtubeApiKey and reloading had no effect — the YouTube client kept its startup key. Add MusicManager::applyYouTubeConfig() (API key, cookies, concurrency, URL shortening; empty key clears it -> yt-dlp fallback) and call it from both reloadConfig and updateConfig. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
7e3081ecd1
commit
5796ccbc74
3 files changed
+36
No files matched your search
@@ -58,6 +58,11 @@ namespace Echoion::Core
|
||||
// instead of only living in the config copy.
|
||||
void applyNetworkConfig(const Api::NetworkConfig& network);
|
||||
|
||||
// Re-apply YouTube settings (API key, cookies, concurrency, URL
|
||||
// shortening) to the YouTube client after a config reload. Passing
|
||||
// an empty/absent API key clears it, restoring the yt-dlp fallback.
|
||||
void applyYouTubeConfig(const Api::YouTubeConfig& youtube);
|
||||
|
||||
[[nodiscard]] Api::Result<std::string>
|
||||
play(const std::string& query, uint64_t clientId);
|
||||
[[nodiscard]] Api::Result<void> pause();
|
||||
|
||||
Reference in new issue
Block a user