Some small proposed improvements#67
Open
padenot wants to merge 3 commits into
Open
Conversation
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
Owner
|
Thanks for the PR. There's already a 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? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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 debuggingIn 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.