From 9104955737935bb7ee0945b522f619c15ad084f0 Mon Sep 17 00:00:00 2001 From: Joey Date: Thu, 20 Nov 2025 18:04:03 +0100 Subject: [PATCH] Update lastfm client bundle 2.0 (#1885) * Complete lastfm-bundle 2.0: add session support and move config to packages * Fix environment variable name: LASTFM_SESSION -> LASTFM_SESSION_KEY - Update session_key configuration to use LASTFM_SESSION_KEY for consistency - Addresses feedback from PR #1885 * Fix copy-from-recipe path in manifest.json - Change from '%CONFIG_DIR%/packages/' to '%CONFIG_DIR%/' - Prevents files from being copied to config/packages/packages/ - Thanks @diimpp for catching this issue --- .../2.0/config/{ => packages}/calliostro_lastfm.yaml | 8 ++++++-- calliostro/last-fm-client-bundle/2.0/manifest.json | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) rename calliostro/last-fm-client-bundle/2.0/config/{ => packages}/calliostro_lastfm.yaml (51%) diff --git a/calliostro/last-fm-client-bundle/2.0/config/calliostro_lastfm.yaml b/calliostro/last-fm-client-bundle/2.0/config/packages/calliostro_lastfm.yaml similarity index 51% rename from calliostro/last-fm-client-bundle/2.0/config/calliostro_lastfm.yaml rename to calliostro/last-fm-client-bundle/2.0/config/packages/calliostro_lastfm.yaml index 42f82b89..2a0f5b92 100644 --- a/calliostro/last-fm-client-bundle/2.0/config/calliostro_lastfm.yaml +++ b/calliostro/last-fm-client-bundle/2.0/config/packages/calliostro_lastfm.yaml @@ -1,10 +1,14 @@ calliostro_lastfm: - # Required: API Key (get from https://www.last.fm/api/account/create) + # Required: API Key for all practical operations (get from https://www.last.fm/api/account/create) api_key: '%env(LASTFM_API_KEY)%' - # Required for write operations: API Secret + # Required for authenticated operations: API Secret api_secret: '%env(LASTFM_SECRET)%' + # Optional: Session key for scrobbling and user operations + # Get this via Last.fm OAuth flow or use a pre-generated session key + # session_key: '%env(LASTFM_SESSION_KEY)%' + # Optional: HTTP User-Agent header for API requests # user_agent: 'MyApp/1.0 +https://myapp.com' diff --git a/calliostro/last-fm-client-bundle/2.0/manifest.json b/calliostro/last-fm-client-bundle/2.0/manifest.json index 8ff8d3e4..305d922b 100644 --- a/calliostro/last-fm-client-bundle/2.0/manifest.json +++ b/calliostro/last-fm-client-bundle/2.0/manifest.json @@ -7,6 +7,7 @@ }, "env": { "LASTFM_API_KEY": "", - "LASTFM_SECRET": "" + "LASTFM_SECRET": "", + "#LASTFM_SESSION": "" } }