Skip to content

Some small proposed improvements#67

Open
padenot wants to merge 3 commits into
meeb:mainfrom
padenot:fixes
Open

Some small proposed improvements#67
padenot wants to merge 3 commits into
meeb:mainfrom
padenot:fixes

Conversation

@padenot
Copy link
Copy Markdown

@padenot padenot commented Apr 29, 2026

Thanks for the great program. I've implemented two small features (with tests), for my own use, I wonder if they would be of interest for others:

  • ability to stop downloading after a certain point, that can be a regexp over artist - release name, or a purchase date -- I implemented this to make it easier to perform the initial sync in batches, my collection is fairly large. Also adds a dry run mode that was helpful for debugging
  • ability to store some state at the root of the download folder to speed up subsequent use of the program (e.g. when running periodically off a cron)

In addition, fixing a small bug: downloading a release that consists in a single file (e.g. the excellent https://mala-music.bandcamp.com/album/militant-don) didn't work, the program was expecting a zip. This caused the second feature to error out and not write its state file in my case.

padenot added 3 commits April 29, 2026 11:01
Add CLI and service controls for stopping collection processing at a
matching release (matching on "artist - release name") or purchase date,
plus dry-run support for previewing downloads. This allows syncing in
batches more easily.

The cutoff is applied both during pagination and again during sync
selection so the boundary item is handled consistently.
Persist the newest seen collection token and use it on later runs to
stop Bandcamp pagination once previously synced items are reached.

When a checkpoint is present, skip the eager local media index and
lazily verify only candidate new items, while preserving checkpoint
safety by summarizing sync errors before refusing to advance state.

In the best but common scenario of having previously downloaded all
collection items (e.g. running this on a cron, without constantly buying
new releases), it now takes about one second to process my collection of
~1200 items on my macbook. It now also performs a limited number of
network requests and fs operations.
Accept non-zip downloads when Bandcamp returns an audio content type,
even if the collection item is not classified as a track.

This fixes single-release album downloads that are served as one MP3 or
other audio file instead of an archive.

Example: https://mala-music.bandcamp.com/album/militant-don
@meeb
Copy link
Copy Markdown
Owner

meeb commented Apr 29, 2026

Thanks for the PR.

There's already a --skip-item-index from #55 - do you need a separate state cache for some reason in addition to this?

Given the entire point of bandcampsync is to sync your bandcamp purchases I'm not really sure how in demand a "stop downloading at" cut-off option is likely to be, but if I were to merge one it would probably be the purchased date based stop.

With your edge case, this is an item that is listed as an album type that downloads as an uncompressed single track, correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants