Releases: snejus/beetcamp
Drop python 3.6 support, add -o --open INDEX flag to CLI and small fixes for album, artist and release_date fields
0.16.0 - 2022-08-19
Fixed
- (#34) Handle URLs like
https://bandcamp.materiacollective.com
, thanks @Serene-Arc
Removed
- Dropped support for
python 3.6
.
Added
- CLI search: index search results and add flag
-o, --open=INDEX
to open the given result in the browser
Updated
-
album
:- remove brackets if the entire album name is wrapped in them
- remove (Single)
- do not remove label from the front if it is not followed by a space
- fix some false positives found in the comments when the album name is followed by EP or LP
-
artist
:- keep the original artist separator in releases with a single track
- replace
//
separator with,
in all cases
-
release_date
: in rare cases when it is not found, use the last modified date
0.15.1 Fix adding albums by their IDs in beets import
Deprecations
- Python 3.6 support will end with the next non-patch version update.
Fixed
-
During import, albums can now again be obtained by their IDs. This functionality has
been broken sincev0.14.0
. -
album
: when album name contains Album (Label something), the Label is kept in place -
albumartist
: remove catalogue number from the album artist when it's enclosed in
brackets -
catalognum
: handle an edge case where several words from the description get assumed
for the catalog number when cat and numbers are both found in the same line. -
genre
: exclude label name, unless it maps to a valid MusicBrainz genre -
title
: handle an edge case where one of the track names contains a utf-8 equivalent of a dash
0.15.0 - Command-line Bandcamp search, artists and titles parsing improvements
Added
- search:
-
you can now search from the command line:
beetcamp [ [-alt] QUERY | RELEASE-URL ]
-
Search is activated with an argument that does not start with https://. It queries bandcamp with the provided QUERY and returns a JSON list with all search results from the first page, sorted by relevancy.
-
Flags -a, -l and -t can be used to search for album, label/artist or track specifically.
-
Run
beetcamp -h
to see more details. Example: searching for anything called black sands:$ beetcamp 'black sands' | jq '.[:2]' [ { "type": "album", "name": "Black Sands", "artist": "Bonobo", "date": "2010 March 29", "tracks": "12", "url": "https://bonobomusic.bandcamp.com/album/black-sands", "label": "bonobomusic", "similarity": 1 }, { "type": "album", "name": "Black Sands", "artist": "Appalachian Terror Unit", "date": "2011 August 01", "tracks": "4", "url": "https://appalachianterrorunit.bandcamp.com/album/black-sands", "label": "appalachianterrorunit", "similarity": 1 } ]
-
Updated
-
search:
- if
label
field is available, the plugin now takes it into account when it ranks search results. albumartist
field is not used to rank compilations anymore since some labels use label name, some use the list of artists, and others a variation of Various Artists - we cannot reliably tell.label
is used instead.
- if
-
album
: track titles are read to see whether they contain the album name. There are cases where titles have the following format: Title [Album Name EP] -
catalognum
:- search track titles
- do not match if preceded by ] character
- allow catalogue numbers like o-ton 113
- allow a pair, if separated by a slash
/
- removed a pattern responsible for a fair bit of false positives
-
albumtype
:- to determine whether a release is a compilation, check comments for string compilation
- check if all track titles are remixes; if so - include remix albumtype into
albumtypes
-
albumtypes
:- remix: check for string rmx in album name
- compilation: even if a release is an ep, check whether it's also a compilation and include it
Fixed
-
search: fixed searching of singletons, where the plugin now actually performs search instead of immediately returning the currently selected singleton when option E was selected during the import process
-
album art fetching functionality has been broken for a while - it should now work fine
-
album
: simplified album name clean-up logic and thus fixed a couple of edge cases -
albumartist
: remove , more from the end -
catalognum
: in rare cases, if the track list was given in the comments, one of the track titles would get assumed for the catalognum and subsequently cleaned up. From now on this will only apply if all track names include the match (usually delimited by brackets at the end) -
title
:- track parsing has been refactored, therefore many of previously removed bits from the title are now kept in place, such as bits in parentheses, double quotes (unless they wrap the entire title) or non-alphanumeric characters at the end
- allow titles to start with an opening parentheses 🤯
- when the title is found as (Some Remix) Title, it becomes Title (Some Remix)
-
artist
:- featuring artists given in square brackets are now parsed correctly
- de-duplication now ignores the case
- when only one of the track artists in the release is missing, try splitting the name with - (no spaces) to account for bad formatting
-
track_alt
: track alts with numbers above 6 (like A7) and letters A and B on their own are now extracted successfully
0.14.0 All media formats returned and a new 'albumtypes' field
Added
-
media
:-
previously, we picked the very first Vinyl, CD etc. media available and the rest did not exist from the plugin's point of view. This is now updated: every media which maps to tracks in the same release will get returned, similar to Discogs and MusicBrainz autotaggers.
Therefore,
bandcamp.preferred_media
configuration option does not have any effect anymore and it can be safely removed from your configuration. Instead, use the globalpreferred.media
option and adjust distance weights correspondingly. -
If Vinyl format track list is found in its description, then
track_alt
,medium
,medium_index
andmedium_total
are adjusted accordingly.
-
-
new field
albumtypes
which contains secondary release types, such as remix, live, soundtrack etc. Applies tobeets >= 1.5
Updated
-
internal: Tests clean up: pytest fixture-spaghetti has been replaced with JSON files that contain the expected output data.
-
albumtype
: some accuracy improvements- For Vinyl media, all
disctitle
s are checked for EP or LP presence - EP, LP and album words in release and media descriptions are counted and decide the album type
- If compilation or best of or anniversary is present in the album name, then the release is a compilation
- A single album with an original track and several remixes now has album albumtype, not single
- For Vinyl media, all
-
albumartist
: every release with more than 3 artists will now have Various Artists (orva_name
) albumartist
Fixed
album
:- Remove EP or LP from the beginning more reliably
- Only remove VA if album name starts or ends with it
0.13.2 - Handle albums without ascii alphanums
Fixed
- Fixed importing of officially purchased Bandcamp tracks which have Visit {label_url} in their
COMMENT
field (at least for FLAC files) when the album name does not contain a single ASCII alphanumeric character. We here use the album name to guess the release url, and in this case the plugin has previously been failing to take into account this edge case and failed the import process immediately.
0.13.1 Fixed searching for python 3.6-3.8
Fixed
- search: changes introduced in [0.13.0] broke searching functionality for
python 3.6-3.8
due to changes in the built-indifflib
library. This has been fixed and tests for the searching logic are now added. Thanks to @emanuele-virgillito for reporting the issue.
Fixed #26
0.13.0 More accurate search, featuring in the artist field, python 3.10 support
0.13.0 More accurate search, featuring in the artist field, python 3.10 support
If you are reading this, it probably means that you're in a position to support people having to experience the currently ongoing nonsense in Ukraine. See Stand With Ukraine for more information. If you haven't done so, Bandcamp is also an option: many labels and artists are raising funds through various releases. Being into electronic music, I can recommend a couple of compilations:
- https://whypeopledance.bandcamp.com/album/whypeoplewar-fundraiser-for-ukraine-vol-2
- https://togetherwithukraine.bandcamp.com/album/together-with-ukraine
- https://northernelectronics.bandcamp.com/album/a-dove-has-spread-her-wings-relief-for-ukraine
I'm sure you can find equivalent movements in whatever style you're into.
Added
-
search: considerable improvements in search results accuracy
- Release name and artist is parsed for each found release
- They are compared to what's being queried and sorted by best matches
- Therefore, from now on we will check the first search results page only which should yield up to 18 results.
search_max
parameter is now 2 by default, - in most cases you should get by fine with it being set to 1. This will make the search nearly instant and reduce the loads that Bandcamp need to deal with.
-
Python 3.10 is now supported.
Updated
-
album
-
search priority: step by step until the first one which is found:
- Whatever follows Title: in the release description
- Something in single or double quotes in the release title
- If EP or LP is in the release title, whatever precedes it having removed
catalognum
and artists - Whatever is left in the release title having removed
catalognum
and artists - Whatever precedes EP or LP string in the release description
catalognum
- The entire initial release title
-
remove (digital album) and (album) from the album name
Some Album (album) -> Some Album
-
-
label
: strip quotes if sourced from the description -
artist
/albumartist
: remove remixers from artists fieldstitle: Choone (Some Remix) -> title: Choone (Some Remix) artist: Artist, Some -> artist: Artist
-
artist
/title
: featuring artists are moved fromtitle
to theartist
fieldartist: Artist -> Artist ft. Some title: Title ft. Some -> Title
-
singleton
: do not populatealbumstatus
,index
,medium_index
,medium
,medium_total
fields
Fixed
-
artist
/track_alt
:- artists like B2 and A4 are not anymore assumed to be
track_alt
whentrack_alt
is not present in any other track in that release.
# name: B2 - Some Title title: Some Title -> Some Title track_alt: B2 -> artist: -> B2
- and other way around,
track_alt
like A or B are correctly parsed iftrack_alt
was found for the rest of the tracks
- artists like B2 and A4 are not anymore assumed to be
-
catalognum
: catalogue numbers starting with VA are not anymore ignored, unless VA is followed by numbers. VA02 is still ignored while VAHELLO001 is now parsed correctly. -
Fixed Github workflow which tests the package across various python and
beets
versions: they should now fail reliably. Dependencies are from now on cached, so they run fairly quickly. -
Clarified that
preferred_media
should include Digital Media (not Digital) in the README.
I've tested my library comparing this release with the previous (0.12.0) and you can find the pdf report here, if interested.
0.12.0 - 2022-02-10
Added
album
: following MusicBrainz title format specification, strings EP and LP are from now on kept in place in album names.catalognum
: To find the catalog number, we have previously been looking at the release title and pointers such as Catalogue Number: within the release description.
In addition to the above, we now apply a generic search pattern across the rest of the text, including media title, media description and the rest of the release description.
For those interested, at a high level the pattern used in the search looks like below
(
[A-Z .]+\d{3} # HANDS D300
| [A-z ][ ]0\d{2,3} # Persephonic Sirens 012
| [A-Z-]{2,}\d+ # RIV4
| [A-Z]+[A-Z.$-]+\d{2,} # USE202, HEY-101, LI$025
| [A-Z.]{2,}[ ]\d{1,3} # OBS.CUR 9
| \w+[A-z]0\d+ # 1ØPILLS018, fa036
| [a-z]+(cd|lp)\d+ # ostgutlp45
| [A-z]+\d+-\d+ # P90-003
)
( # optionally followed by
[ ]?[A-Z] # IBM001V
| [.][0-9]+ # ISMVA002.1
| -?[A-Z]+ # PLUS8024CD
)?
-
albumtype
: similar to thecatalognum
, the descriptions are searched for EP and LP strings presence to find out thealbumtype
. -
track
: Support for tracks that do not use dash (-
) but some other character to separate pieces of information in track names. For example, consider the following tracklist:
A1 | WHITESHADOWHURTS x TOXICSPIKEBACK | Arcadia
A2 | WHITESHADOWHURTS | Corrupted Entity
A3 | WHITESHADOWHURTS | Colosseo
B1 | TOXICSPIKEBACK | Eclipse
B2 | TOXICSPIKEBACK | Eclipse [DJ LINT's Tribe Mix]
B3 | WHITESHADOWHURTS | Corrupted Entity [OAT.M's Oldschool Mix]
beetcamp
now finds that |
is being used as the delimiter and parses values for track_alt
, artist
and title
accordingly.
Updated
- singleton:
album
andalbumartist
fields are not anymore populated. catalognum
: artists like PROCESS 404 are not assumed to be catalogue numbers anymore.track_alt
: allow non-capital letters, like a1 to be parsed and convert them to capitals.albumartist
: use Various Artists (or equivalent) when a release includes more than four different artists. Until now we've only done so for compilations.genre
: genres are now sorted alphabetically
Fixed
- Support for
beets<1.5
has been broken since0.11.0
, - it should now work fine. However, fields such ascomments
andlyrics
are not available, and album-like metadata likecatalognum
is not available for singletons. Thanks @zane-schaffer for reporting this issue (Closes #22). singleton
:catalognum
, if found, is now reliably removed from the title.track.title
:-
delimiter is handled more appropriately when it is found in the song title.albumartist
: for the Various Artists releases, the plugin will now use the globally configuredva_name
field instead of hard-coding Various Artists.artist
: Recent bandcamp updates of the JSON data removed artists names from most of compilations, therefore we are again having a peek at the raw HTML data to fetch the data from there.
0.11.0 - 2021-11-12 - Added genre, entrypoint
0.11.0 2021-11-12
Added
-
An entrypoint for
beetcamp
: if the package is in your$PATH
, bandcamp
metadata can be obtained directly as a JSONbeetcamp <bandcamp-url> # {"album": "some album", ..., "tracks": [{"title": ...}, ... ]}
This has mostly been useful in scripts: for example, in my case it bridges the metadata
gap between mpd and a last.fm scrobbler in those cases when music has not yet made it
into the beets library. -
Two more MusicBrainz fields now get populated:
style
: the tag/genre that bandcamp categorize the release asgenre
: comma-delimited list of release keywords that match any musicbrainz
genres.
This comes with some configuration options, see the defaults below:
bandcamp: ... genre: capitalise: no maximum: 0 # no limit always_include: [] mode: progressive # classical, progressive or psychedelic
See the readme for information about the different options.
-
New configuration option
comments_separator
to separate release, media
descriptions and credits. Default:\n---\n
. Comments formatting has been
changing with every release without a good reason - this should stop. Ultimately it is
one's personal choice how they want the formatting to look like.
Updated
-
excluded_extra_fields
configuration option has been extended to support every track
field and most of album fields. See the readme for more information. -
The hook for additional data has been removed since
lyrics
anddescription
are now
retrieved immediately. They can be inspected like every other field, through, for
example, theedit (C)andidates
action during the import. -
track_alt
: allow B2 Title where B2 is followed by a space -
catalognum
: include Catalog: as a valid header when parsing the description -
track.title
digital-only cleanup, remove:- DIGITAL and Bonus from the front of the title
- digital-only and (digital) from the end
Fixed
lyrics
: instead of parsing the HTML, lyrics are now reliably retrieved from the JSON
data and added to each track where applicable.- Nowadays it is possible that the
datePublished
field is not given in the release JSON
data - this is now handled gracefully.
0.10.1 - 2021-09-13
Fixed
-
Fixed #18 by handling cases when a track duration is not given.
-
Fixed #19 where artist names like SUNN O))) would get incorrectly mistreated by the album name cleanup logic due to multiple consecutive parentheses. The fix involved adding some rules around it: they are now deduped only if
- they are preceded with a space
- or they enclose remix / edit info and are the last characters in the album name
-
Fixed #20 where dynamically obtained label names used in further REs caused
re.error
since they were not appropriately escaped (for example,label: /m\ records
).
Thanks @arogl for reporting each of the above!
-
album
: Keep label in the album name if it's immediately followed by an apostrophe. An example scenario:label: Mike
album: Mike's Creations