Skip to content

Releases: snejus/beetcamp

0.11.0 - 2021-11-12 - Added genre, entrypoint

12 Nov 14:18
0.11.0
9eccb09
Compare
Choose a tag to compare

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 JSON

    beetcamp <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 as
    • genre: 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 and description are now
    retrieved immediately. They can be inspected like every other field, through, for
    example, the edit (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

13 Sep 02:21
0.10.1
ea7ebeb
Compare
Choose a tag to compare

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

0.10.0 - 2021-09-10

10 Sep 11:14
0.10.0
be48e05
Compare
Choose a tag to compare

Fixed

  • General

    • Fixed the logic which fetches the additional data fields (comments and lyrics). It
      used to cause unwanted behavior since it wrote the files when write: yes was
      enabled in the beets config. Now, it's activated through the import_task_apply hook
      and adjusts the metadata (beets db) without ever touching the files directly.
    • Unexpected errors are now printed instead of causing beets to quit immediately.
  • track.track_alt: handle A1 - Title and A1 - Artist - Title when alt index is not
    followed by a full stop.

  • track.title:

    • Handle cases like Artist -Title / Artist- Title when there is no space between
      the dash and the title or artist
    • Fixed digital only cleaner which would previously remove the string Only when
      it's found on its own
    • Accept ¯\(ツ) as valid title
    • Clean up ( Remix ) -> (Remix)
  • country: Washington, D.C. and South Korea have not been parsed correctly and
    thus releases have been defaulting to XW. This is now fixed.

Updated

  • catalognum:

    • Treat VA[0-9]+, vinyl [0-9]+, triple [0-9]+, ep 12 as invalid (case
      insensitive)
    • Handle single digits (like ROAD4) as valid (until now we required at least two)
    • Handle catalognums in parentheses, like (ISM001)
    • Handle a period or a dash in the non-digit part, like OBS.CUR 12, O-TON 113
    • Allow a single capital letter after the digits, like IBM001V
    • Allow the catalognum to start with a non-capital letter, like fa010
  • album and track.title: little clean up: replace multiple consecutive spaces with a
    single one and remove all double quotes

  • album:

    • Only remove label from the album name if albumtype is not a compilation
    • Remove (FREE), (FREE DL), VA, (Incl. some artists remixes) and alike
    • Improved the way Various Artists are cleaned up when catalognum is available
  • albumartist:

    • If various is specified as the albumartist, make it Various Artists
    • When the label have set their name as the albumartist in every field, and if the
      actual albumartist could be inferred from the album name, use the inferred name.
    • If all release tracks have the same artist, assume they are the albumartist
  • albumtype: treat 4-track release as a valid candidate for a compilation / VA albumtype

0.9.3 - 2021-08-01 Handle non-bandcamp URLs, use updated release_date and label name

01 Aug 00:43
Compare
Choose a tag to compare

Updated

  • Bandcamp json updates:
  • release_date: datePublished field now tells the correct release date so now we use
    it instead of parsing the plain html.
  • label: some releases embed the recordLabel field into the json data - it now gets
    prioritized over the publisher name when it is available.
  • track.title: clean up *digital only* properly. Previously we did not account for
    asterixes

Fixed

  • A regression from 0.9.2 which caused double initialization of the plugin. If your
    initial tracks metadata has the album name, the results should again be returned
    instantly.
  • Searching by release ID where the ID is not a bandcamp URL should now be ignored by the
    plugin. Thanks @arogl.

0.9.2 - Fixed writing of the metadata

18 Jul 11:07
0.9.2
aed8bba
Compare
Choose a tag to compare

Fixed

  • Thanks @arogl for fixing a FutureWarning apparent thrown in Python 3.7.
  • Thanks @brianredbeard for reporting that the plugin writes file metadata even when this
    is disabled globally. This is now fixed.
  • singleton album/artist: cases when the release name contains only the track name are now
    parsed correctly.

Removed

  • Removed deprecated lyrics configuration option.

Added

  • Added a github action to run ci for master and dev branches. For now it's just a minimal
    configuration and will probably get updated soon.

0.9.1 - 2021-06-04

04 Jun 12:47
0.9.1
04439bb
Compare
Choose a tag to compare

Fixed

  • album.albumstatus: If the release date is today, use Official and not Promotional.
  • album.albumtype:
    • Until now we have only set single track releases to have the single type. This has been fixed regarding the MusicBrainz description: release composed of the same title and multiple remixes is a single.
    • Use ep only if EP is mentioned either in the album name or the disc title.
  • album.catalognum: Make the DISCTITLE uppercase before looking for the catalogue number.
  • album.media: Exclude anything that contains bundle in their names. These usually contain additional releases that we do not need.
  • track.title: Clean - DIGITAL ONLY (and similar) when it's preceded by a dash and not enclosed by parens or square brackets.
  • track.track_alt: Having witnessed a very creative track title E7-E5, limit the track_alt field number to the range 0-6.
  • Committed a JSON testcase which was supposed to be part of 0.9.0.

Added

  • Extend url2json with --tracklist-for-tests to ease adding new testcases.

0.9.0 - 2021-06-01

01 Jun 01:15
0.9.0
d25c01a
Compare
Choose a tag to compare

Fixed

  • If track artist is given in the byArtist field of the track JSON resource, it is used.
    (Fixes #13, thanks @xeroxcat).
  • Parse cases like Catalogue:CAT-000 from the description correctly when the space is missing.

Added

  • The comments field now includes the media description and credits.
  • The description is searched for artist and album names in addition to the catalogue
    number.

Updated

  • All testcases are now pretty JSON files - this should bring more transparency around
    the adjustments that Bandcamp make in the future (once they get updated). The url2json
    tool has -u flag that updates them automatically.

  • Parsing

  • (FREE), (free download)-like strings are now removed from the track names.

  • [Vinyl] is excluded from album names.

0.8.0 - 2021-04-20

20 Apr 08:41
0.8.0
7d70588
Compare
Choose a tag to compare

0.8.0 - 2021-04-20

Fixed

  • Responded to bandcamp html updates:

    • artist_id now lies under publisher resource (previously byArtist) in the
      /track/<name> output when the track is part of an album.
    • url field has disappeared from track objects - using @id instead.
    • country and label fields are now found in the JSON data and thus we make use of it
    • Updated and truncated test html files since we now only need to see the beginning of
      the document.
  • Parsing / logic:

    • Token feat. is now recognised as a valid member of the artist field.
    • free download, [EP|LP], (EP|LP), E.P., LP are now cleaned from the album name.
    • Updated albumtype logic: in some compilation cases track artists would go missing
      and get set to Various Artists - instead it now defaults to the original
      albumartist.
    • Handling a couple of edge cases in the track name / title, and catalognum parsers.

Updated

  • Package:

    • Moved beets from main to dev dependencies.
    • Updated supported python versions range (3.6.x-3.9.x)
    • Added pylint.
    • Removed dependency on packaging - using pkg_resources instead.
  • Internal:

    • Reintroduced @cached_property across most of the fields having found how often certain
      ones get called.

Added

  • Release description is now checked for the catalogue number.
  • Added a test based on parsing the JSON output directly without having to parse the
    entire HTML. Bandcamp have been moving away from HTML luckily, so let's hope the trend
    continues.
  • Added a tiny cmd-line tool url2json which simply outputs either a compacted or a
    human version of the JSON data that is found for the given bandcamp URL.

0.7.1 - 2021-03-15

15 Mar 09:30
0.7.1
b9721da
Compare
Choose a tag to compare

Fixed

  • Fixed singleton regression where track list was getting read incorrectly.

0.7.0 - 2021-03-15

15 Mar 08:00
0.7.0
ace5892
Compare
Choose a tag to compare

Added

  • For those who use beets >= 1.5.0, singleton tracks are now enriched with similar metadata
    to albums (depending on whether they are found of course):

    • album: Artist - Track usually
    • albumartist
    • albumstatus
    • albumtype: single
    • catalognum
    • country
    • label
    • medium, medium_index, medium_total
    • release date: year, month, day
  • Album names get cleaned up. The following, if found, are removed:

    • Artist name (unless it's a singleton track)
    • Label name
    • Catalogue number
    • Strings
      • Various Artists
      • limited edition
      • EP (only if it is preceded by a space)
    • If any of the above are preceded/followed by - or | characters, they are
      removed together with spaces around them (if they are found)
    • If any of the above (except EP) are enclosed in parentheses or square brackets,
      they are also removed.

    Examples:

    Album - Various Artists -> Album
    Various Artists - Album -> Album
    Album EP                -> Album
    [Label] Album EP        -> Album
    Artist - Album EP       -> Album
    Label | Album           -> Album
    Album (limited edition) -> Album
    
  • Added recommended installation method in the readme.

  • Added tox tests for beets < 1.5 and beets > 1.5 for python versions from 3.6 up to
    3.9.

  • Sped up reimporting bandcamp items by checking whether the URL is already available
    before searching.

  • Parsing: If track's name includes bandcamp digital (bonus|only) etc., bandcamp part gets
    removed as well.

Changed

  • Internal simplifications regarding beets version difference handling.

Fixed

  • Parsing: country/location name parser now takes into account punctuation such as in
    St. Louis - it previously ignored full stops.