Ovyerus / bandsnatch

A CLI batch downloader for your Bandcamp collection.
MIT License
60 stars 2 forks source link

Bandsnatch fails on releases it can see but can't actually download #13

Closed amandasystems closed 1 week ago

amandasystems commented 1 month ago

I'm getting spurious errors like this one:

trying c3711951006, Secluded Creek - Amanita (false)                            ░░░░░░░░░░ (56.69 KiB/7.09 MiB) 
ASHAMED f/Lauren Mayberry - HEALTH              
thread '<unnamed>' panicked at /home/amanda/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bandsnatch-0.3.2/src/api/mod.rs:274:66:
called `Option::unwrap()` on a `None` value
Ovyerus commented 1 month ago

Well that's strange. Is this happening multiple times, and around the same album(s)?

amandasystems commented 1 month ago

Yes, for some of them consistently and for some spuriously. I’ll look around and try to get you a full trace.

amandasystems commented 1 week ago

This is what I get when turning on debug logging:

Trying p104712518, Five Alive - Doomtree (true)
[2024-09-06T11:04:17Z DEBUG reqwest::connect] starting new connection: https://popplers5.bandcamp.com/
[2024-09-06T11:04:17Z DEBUG reqwest::async_impl::client] redirecting 'https://popplers5.bandcamp.com/download/track?enc=mp3-320&id=2774431893&sig=[REDACTED]&sitem_id=104712518' to 'https://bandcamp.com/download?payment_id=[REDACTED]&sig=[REDACTED]'
thread '<unnamed>' panicked at /home/amanda/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bandsnatch-0.3.2/src/api/mod.rs:274:66:

Interesting enough this album doesn't show up in my "My purchases list", but it is a purchase I have made. I think the link has somehow expired? The only way they will allow me to download it is via email link.

I think a warning with "could not download...", plus possibly the link it tried to use is enough.

amandasystems commented 1 week ago

Aha! Yes, this happens if you make a purchase with an email that isn't linked to your account. So for example if you've purchased music as myoldemail@example.com, switch to mynewemail@example.com and remove the previous one from your account, the music may not show up in your list and will cause this error. It baffles me why bandsnatch can even see the music listed, but apparently it could.

amandasystems commented 1 week ago

For the record the spurious errors have not appeared again, so they must be rare.

Ovyerus commented 1 week ago

Wow, that's a weird edge case! Bizarre that Bandcamp doesn't show it in your collection but apparently keeps it around in the data Bandsnatch picks up. I'll add a better warning for when a download fails as you suggested.

amandasystems commented 1 week ago

I keep running into 'em it seems. Thanks!

Ovyerus commented 1 week ago

Added that warning in v0.3.3.