Closed jfurrow closed 10 months ago
Interesting. What's in that bandcamp_item_id.txt
file? It should contain just 3159597158
. Also can you search your logs from the start for 3159597158
? There should be a line about detecting the release directory at the start of the script. Something like this:
2023-09-21 03:32:15,836 media [INFO] Detected locally downloaded media: 3159597158 = /downloads/artist/album-somewhere
That line is the local media scanner detecting the previously downloaded album so if that line is missing it's not being detected which is why it's being downloaded repeatedly.
Also please check you're running the latest release which is 0.3.1 (pull :latest
again if you're running it in a container).
Thanks for the quick response!
bandcamp_item_id.txt
contains 3159597158
The logs do show that it was locally detected:
2023-09-20 22:26:15,465 media [INFO] Detected locally downloaded media: 3159597158 = /media/store-f/music/sorted/The Fiery Furnaces/Down at the So and So on Somewhere
I'm on version 0.3.1, installed via pip
I just noticed it outputs Already locally downloaded
right before New media item, will download
for this release:
2023-09-20 22:26:16,836 sync [INFO] Already locally downloaded, skipping: "The Fiery Furnaces / Down at the So and So on Somewhere "(id:3159597158)
2023-09-20 22:26:16,836 sync [INFO] New media item, will download: "The Fiery Furnaces / Down at the So and So on Somewhere "(id:2569082990) in "flac"
2023-09-20 22:26:17,608 sync [INFO] Downloading item "The Fiery Furnaces / Down at the So and So on Somewhere" (id:2569082990) from https://popplers5.bandcamp.com/download/album?enc=flac&id=2569082990&sig=[masked]&sitem_id=119874888 to /tmp/tmpkx67asvu
2023-09-20 22:26:18,412 download [INFO] Downloading https://popplers5.bandcamp.com/download/album?enc=flac&id=2569082990&sig=[masked]&sitem_id=119874888: 10%
2023-09-20 22:26:18,635 download [INFO] Downloading https://popplers5.bandcamp.com/download/album?enc=flac&id=2569082990&sig=[masked]&sitem_id=119874888: 20%
2023-09-20 22:26:18,910 download [INFO] Downloading https://popplers5.bandcamp.com/download/album?enc=flac&id=2569082990&sig=[masked]&sitem_id=119874888: 30%
2023-09-20 22:26:19,181 download [INFO] Downloading https://popplers5.bandcamp.com/download/album?enc=flac&id=2569082990&sig=[masked]&sitem_id=119874888: 40%
2023-09-20 22:26:19,539 download [INFO] Downloading https://popplers5.bandcamp.com/download/album?enc=flac&id=2569082990&sig=[masked]&sitem_id=119874888: 50%
2023-09-20 22:26:19,895 download [INFO] Downloading https://popplers5.bandcamp.com/download/album?enc=flac&id=2569082990&sig=[masked]&sitem_id=119874888: 60%
2023-09-20 22:26:20,249 download [INFO] Downloading https://popplers5.bandcamp.com/download/album?enc=flac&id=2569082990&sig=[masked]&sitem_id=119874888: 70%
2023-09-20 22:26:20,597 download [INFO] Downloading https://popplers5.bandcamp.com/download/album?enc=flac&id=2569082990&sig=[masked]&sitem_id=119874888: 80%
2023-09-20 22:26:20,938 download [INFO] Downloading https://popplers5.bandcamp.com/download/album?enc=flac&id=2569082990&sig=[masked]&sitem_id=119874888: 90%
2023-09-20 22:26:21,284 download [INFO] Downloading https://popplers5.bandcamp.com/download/album?enc=flac&id=2569082990&sig=[masked]&sitem_id=119874888: 100%
2023-09-20 22:26:21,286 sync [INFO] Decompressing downloaded zip "/tmp/tmpkx67asvu" to "/tmp/tmp2vygy025"
2023-09-20 22:26:21,396 sync [INFO] Moving extracted file: "/tmp/tmp2vygy025/cover.jpg" to "/media/store-f/music/sorted/The Fiery Furnaces/Down at the So and So on Somewhere/cover.jpg"
2023-09-20 22:26:21,505 sync [INFO] Moving extracted file: "/tmp/tmp2vygy025/The Fiery Furnaces - Down at the So and So on Somewhere - 01 Down at the So and So on Somewhere.flac" to "/media/store-f/music/sorted/The Fiery Furnaces/Down at the So and So on Somewhere/The Fiery Furnaces - Down at the So and So on Somewhere - 01 Down at the So and So on Somewhere.flac"
2023-09-20 22:26:22,196 media [INFO] Writing bandcamp item id:2569082990 to: /media/store-f/music/sorted/The Fiery Furnaces/Down at the So and So on Somewhere/bandcamp_item_id.txt
Ah, this may well be caused by your release having two releases with different IDs?
2023-09-20 22:26:16,836 sync [INFO] Already locally downloaded, skipping: "The Fiery Furnaces / Down at the So and So on Somewhere "(id:3159597158)
2023-09-20 22:26:16,836 sync [INFO] New media item, will download: "The Fiery Furnaces / Down at the So and So on Somewhere "(id:2569082990) in "flac"
This is with item ID 3159597158
and item ID 2569082990
. I expect what's happening here is one release is being downloaded and one ID being written, then on next run the other release is being downloaded and the ID being overwritten on loop.
Can you check if this release does seem to have two releases on your Bandcamp account?
Ohh yep, totally, that's it. I bought the digital release that's still available for sale and later bought the physical 7" release, which is no longer visible publicly:
OK, I'll add a uniqueness check on the "The Fiery Furnaces / Down at the So and So on Somewhere" string as well as the ID to prevent this.
Cool, thanks for looking into it 🙏
This is fixed in the latest 0.3.2 release. Give it a few minutes to build the container then pull :latest
again (or pip update, however you're running it).
Also you'll now see something like this in the logs when the ID mismatch occurs:
2023-09-21 06:54:11,281 media [INFO] Detected album at "/some/directory/Artist/Album" but with an item ID mismatch (bandcamp_item_id.txt file does not contain 123456789), you may want to check this item is correctly downloaded
Yep, working well for me, thank you!
Hi, great script here!
I have 87 Bandcamp purchases and just this one particular release keeps getting redownloaded every time I run the script. The release in question is https://thefieryfurnaces.bandcamp.com/album/down-at-the-so-and-so-on-somewhere
Let me know if I can help debug this. Here's the script output from the last time I ran it:
And I can see the file is definitely there:
Thanks!