From c7f471ee8c758a7d2adf8c03eb922431f50cb2ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Peder=20Brandtz=C3=A6g?= Date: Thu, 26 Oct 2023 07:12:35 +0200 Subject: [PATCH] Use album_title field as title. Not sure if Bandcamp changed their API or what, but my downloads do not have a "title" field in them, causing the tool to loop endlessly through all purchases and not download anything; this change fixes said problem for me, but I saw that the response also includes keys such as "item_title", which might be a more robust choice. --- bandcampsync/bandcamp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bandcampsync/bandcamp.py b/bandcampsync/bandcamp.py index 86c5e53..7c06c84 100644 --- a/bandcampsync/bandcamp.py +++ b/bandcampsync/bandcamp.py @@ -211,7 +211,7 @@ def load_purchases(self): log.error(f'Failed to locate band name in item metadata, skipping item...') continue try: - title = item_data['title'] + title = item_data['album_title'] except KeyError: log.error(f'Failed to locate title in item metadata (possibly a subscription?) for "{band_name}", skipping item...') continue