Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add beets==2 and drop beets<1.5 support, improve catalognum, albumtypes parsing #73

Merged
merged 83 commits into from
Nov 4, 2024

Conversation

snejus
Copy link
Owner

@snejus snejus commented Nov 3, 2024

  • Drop support for beets<1.5.

Fixed

  • album:

    • Keep remix artist in place within 'remix' parentheses, such as Album (Artist
      Remix)
      .
    • When a release has the same name as the album artist, do not clean/adjust it.
    • Keep album artist in album when it is immediately followed by a dot.
    • Do not remove EP or LP from the beginning of the album name.
    • Remove V.A from the beginning of the album name, in the same way we remove
      VA.
    • Do not split album with a year range into albumartist and album.
  • cleanup:

    • Remove (... preview), free dl, Name Your Price:, just out!,
      - Album, (Selected by ...) from album and track names.
    • Remove unicode HTML whitespace from incoming data.
  • albumtype:

    • Identify LP / album type from vinyl media descriptions.
    • Remove some funky description parsing logic responsible for multiple ep false
      positives.
    • Resolve either ep or lp to add to albumtypes, and never both.
    • Check for single album type (expecting a single track only) before anything else.
  • artist: handle remix releases with a single title and its remixes. Instead of trying
    to determine the artist from the titles, detect such release and use the given album
    artist.

  • catalognum:

    • Fix false positives:
      • Exclude very short matches like OP-1, SK-1 and BBC6.
      • Exclude label name, and label name without spaces.
      • Exclude matches followed by a comma. This excludes many artists from release
        descriptions that happen to have names that look like catalogue numbers.
      • Exclude matches followed by a single quote. This used to wrongly match vinyl disc
        titles like LABEL 12 here: LABEL 12'' Black Vinyl.
      • Prevent album artists becoming catalogue numbers.
      • Remove pattern responsible for many false positives that contain a space, like
        DOOM 3, ONLY 1 and NIGHT 3 etc.
      • Do not any more assume that artist [DRAKEN49] is a catalogue number.
      • Instead of using a pattern like [A-Z]+-[0-9]+ (more than one capital letter —
        dash — more than one number)
        , explicitly specify how many letters and numbers are
        expected for the most common variations, like TAR30, RM12012, HEY-101
        etc.
  • media: ignore subscription type Bandcamp media format which returns a duplicate
    digital media.

  • title:

    • Remove track number from the beginning of the title more reliably.
    • Remove label name from anywhere if it inside brackets or from the end of the title if
      preceded by a dash or a colon.
  • track:

    • artist / title / track_alt: Handle edge cases where track_alt is followed by a
      single dash. Some instances were previously ignored.
    • artist / title / track_alt: fix several artists and titles which had pieces
      incorrectly identified as track_alt.
    • artist / title: In releases where every track has the same title, check whether
      this title may actually be the artist name. If so, move it to the artist field.
    • artist / title: use characters [|-–—] explicitly for splitting artists and
      titles.
    • artist / title: recover some of the original titles which contain - and got
      split into artist and title.
    • Return an empty tracklist for releases that have no tracks.
  • Auto-Tagger: Wider search analogous to cli search query as a fallback for bad or missing
    meta data.
  • Add artist list fields support for beets==2.0.0.

Updated

  • album:

    • When album name is wrapped in brackets, [ALBUM], keep the brackets in place.
    • Uncover some release names in the description preceded by Title :.
  • albumartist:

    • Remove notes about remixes, like (incl. ABC remix) and similar.
  • albumtype:

    • Improve accuracy of identifying EP and LP release types from the description.
    • Include remix albumtype to the release when remixed track count is one less than
      the track count.
    • Check album names that may end with E.P. instead of EP.
  • catalognum:

    • Add support for new formats: UVB76-023, SOP 061-1233, a+w lp029,
      SK11X015.

    • Parse label-like catalogue numbers for singletons too.

    • When searching for a catalogue number which is prefixed by the label name

      1. Take two variations of the label name
        1. Original one
        2. Without Records, Recordings, Productions, Music endings
      2. Form prefixes from each variation
        1. The original variation
        2. With punctuation and spaces removed
        3. Its acronym when it has multiple words
      3. Lastly, if the original label has multiple words, use the first word as another
        possible prefix.

      For example, for a label named Diffuse Reality Records, the plugin is able to
      recognize the following catalogue numbers (case insensitively)

      • Diffuse Reality Records001
      • DiffuseRealityRecords001
      • DRR001
      • Diffuse Reality001
      • DiffuseReality001
      • DR001
      • Diffuse001
    • Parse catalogue number from the description when the header is followed by a hash
      symbol, like CAT#: ABC-123.

    • Properly catch catalogue number suffix RP.

    • Relax the rule that looks for a catalogue number within brackets in the release title.

  • track:

    • For tracks named like [Remixer] - Artist - Title move the remixer to the end:
      Artist - Title [Remixer].
  • exclude_extra_fields: A typo that prevented exclude configurations from being applied
    correctly

@snejus snejus self-assigned this Nov 3, 2024
@coveralls
Copy link
Collaborator

coveralls commented Nov 3, 2024

Pull Request Test Coverage Report for Build 11659190021

Details

  • 388 of 405 (95.8%) changed or added relevant lines in 9 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.2%) to 90.576%

Changes Missing Coverage Covered Lines Changed/Added Lines %
beetsplug/bandcamp/album_name.py 21 22 95.45%
beetsplug/bandcamp/http.py 0 1 0.0%
beetsplug/bandcamp/track.py 12 13 92.31%
beetsplug/bandcamp/names.py 127 130 97.69%
beetsplug/bandcamp/helpers.py 44 48 91.67%
beetsplug/bandcamp/tracks.py 38 45 84.44%
Totals Coverage Status
Change from base Build 11582667610: 0.2%
Covered Lines: 1136
Relevant Lines: 1248

💛 - Coveralls

@snejus snejus merged commit b356bf6 into main Nov 4, 2024
36 checks passed
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