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

Plugin Not Working with New Beets Install #15

Open
gristleism opened this issue Dec 2, 2020 · 5 comments
Open

Plugin Not Working with New Beets Install #15

gristleism opened this issue Dec 2, 2020 · 5 comments

Comments

@gristleism
Copy link

Hello, and thank you so much for this plugin! Unfortunately, I'm attempting to use it with a new install of Beets and not currently having any luck, I'm afraid.

My current configuration works otherwise, but when trying to add the album EP2 by AceMoMA which is only on Bandcamp and not on Discogs or MusicBrainz, the follow occurs after running beet import /Users/*****/*****/Music/Bandcamp/library/AceMoMA/2020\ -\ EP2

Finding tags for album "AceMoMA - EP2".
Candidates:
1. Matthew Dear - EP2 (43.8%) (tracks, artist, source, ...) (Discogs, Vinyl, 2003, US, Spectral Sound, SPC-07)
2. Dego And Kaidi Tatham - EP2 (43.0%) (tracks, artist, source, ...) (Discogs, Vinyl, 2015, UK, Eglo Records, EGLO42)
3. AceMoMa - AceMoMa (41.3%) (tracks, album, year) (Digital Media, 2019, XW, Jenkem Recordings, JR-02)
4. Young Liar - EP2 (39.9%) (tracks, artist, year) (Digital Media, 2012, XW, The Calico Print)
5. Young Liar - EP2 (39.9%) (tracks, artist, year) (CD, 2012, GB, The Calico Print, TCP008)
6. FKA Twigs - EP2 (39.8%) (tracks, artist, source, ...) (Discogs, Vinyl, 2013, UK, Young Turks, YT098)
7. Headlights - EP2 (38.2%) (tracks, artist)
8. Fujiya & Miyagi - EP2 (36.3%) (tracks, artist, year) (CD, 2016, Impossible Objects Of Desire)
9. AceMoMa - A New Dawn [HOA007] (35.5%) (missing tracks, tracks, album) (Digital Media, 2020, US)
10. we. the pigs - EP2 (33.2%) (tracks, artist, year) (Digital Media, 2017, XW, Discos de Kirlian, DK48)
11. Various Artists - Sounds Blasts! EP2 (28.5%) (tracks, album, source, ...) (Discogs, Vinyl, 1989, UK, Sounds (9), BLASTS! 2)
12. Terre Thaemlitz - Deproduction EP2 (20.7%) (tracks, artist, album, ...) (Discogs, Vinyl, 2018, Japan, Comatonse Recordings, C.027.EP2)
# selection (default 1), Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort, eDit, edit Candidates? 

So, I try to use I to add the Id as the URL of the album on Bandcamp:

Enter release ID: https://acemomabk.bandcamp.com/album/ep2
No matching release found for 4 tracks.
For help, see: http://beets.readthedocs.org/en/latest/faq.html#nomatch

Results from beet --version

beets version 1.4.9
Python version 2.7.16
plugins: bandcamp, discogs, duplicates, edit, embedart, fetchart, fromfilename, lastgenre, mbsync, missing

Here is my current configuration, and everything else seems to be working without issue:

# Root directory of your music
directory: /Users/*****/*****/Music/Library
# Location where your beets database is saved
library: /Users/*****/*****/Music/Library/musiclibrary.db

# Configure the importing process
import:
    move: yes
    log: /Users/*****/*****/Music/Library/beet.log

paths:
    default: %if{$label,$label,Not on Label}/$albumartist - $album%aunique{} [$year]/$track $title
    singleton: Singles/$artist/$title [$year]
    comp: $label/$album%aunique{} [$year]/$track $title

threaded: yes

# Install these requirements if you want to use all the plugins. If you only want to use some, the required dependencies stand behind the plugins as well.
# pip install --user beets[fetchart,lastgenre] requests requests_oauthlib discogs-client pylast beets-bandcamp
plugins: 
    # Assist autotagger
    - fromfilename

    # Add Discogs as a metadata source
    - discogs # pip install --user discogs-client

    # Add Bandcamp as a metadata source
    - bandcamp # pip install --user beets-bandcamp

    # Activate `beet mbsync` command to allow updating tags
    - mbsync 

    # Active `beet missing` command to allow seeing missing albums and tracks
    - missing
    
    # Activate `beet duplicates` command 
    - duplicates 

    # Edit metadata of songs or albums with a text editor like vim or micro
    - edit 

    # Downloads genres from last.fm
    - lastgenre # pip install --user pylast

    # Downloads Covers
    - fetchart # pip install --user requests

    # Adds the cover art to the metadata of the audio files
    - embedart 

# Set User Token for Discogs API
discogs:
    user_token: *********************

bandcamp: 
    lyrics: false
    art: false

# Configure the edit plugin. Defines which fields are available for editing.
# To choose your favorite editor change the $EDITOR environment variable
edit:
    itemfields:
      - album
      - albumartist
      - artist
      - track 
      - title
      - year
    albumfields:
      - albumartist
      - album
      - year
      - albumtype

lastgenre:
  auto: yes
  source: album

fetchart:
    auto: yes
    
# Activates the embed art plugin and adds the cover to the audio files metadata
embedart:
    auto: yes

Thank you very much for your time, and please let me know if there's anything I can do to try and help with debugging or any other information I could provide to be helpful.

@gristleism gristleism changed the title Plugin Not Working with New Install Plugin Not Working with New Beets Install Dec 2, 2020
@snejus
Copy link

snejus commented Dec 6, 2020

I'm facing the same problem, looking for an album that is only available on bandcamp and using beet -vv import <folder>, I found the following:

...
bandcamp: Searching album, page 1
bandcamp: Unexpected html while scraping album 'https://01010100.bandcamp.com/album/01010100-various-artists-001': 'NoneType' object has no attribute 'text'
bandcamp: Unexpected html while scraping album 'https://musicisloverecords.bandcamp.com/album/mil002-lovebox-001-various-artists-ep': 'NoneType' object has no attribute 'text'
bandcamp: Unexpected html while scraping album 'https://industrialtechnounited.bandcamp.com/album/itu-various-artists-010': 'NoneType' object has no attribute 'text'
bandcamp: Unexpected html while scraping album 'https://industrialtechnounited.bandcamp.com/album/itu-various-artists-011': 'NoneType' object has no attribute 'text'
bandcamp: Unexpected html while scraping album 'https://paulbirken.bandcamp.com/album/tw0011-various-artists-circling-the-wagons': 'NoneType' object has no attribute 'text'
...

The first url is the correct match, but it didn't end up being parsed :(

@snejus
Copy link

snejus commented Dec 6, 2020

Seeing that the current maintainer isn't very active and since bandcamp is the main place I get music from I got it fixed. I'm not expecting that a PR in this repo would see a response too soon, therefore feel free to use my fork at https://github.com/snejus/beets-bandcamp. Just clone the most recent master branch and install it manually.

Once there's a response from the maintainer, I'll open PR. Until then, let me know (either here or through an issue on my fork) if it breaks for you - that should get sorted in a couple of days max.

@jonathanmschmidt
Copy link

@snejus thanks for doing this. I cannot make issues on your fork, but I am experience this currently

-py3.7.egg/beetsplug/bandcamp.py", line 350, in get_track_info
    artist_from_title, meta["title"] = self._split_artist_title(meta["title"])
AttributeError: 'BandcampPlugin' object has no attribute '_split_artist_title'

@snejus
Copy link

snejus commented Dec 8, 2020

Sorry! At that point yesterday it was getting patched in multiple places but I mostly tested it with albums. Just pushed a fix for it, thanks for letting me know.

I'll move the work away from master once it gets to a more stable point - currently the way the data is parsed is very volatile and will break with basically any update bandcamp make to their html templates. It doesn't help that there weren't any tests to support it all. I'm working on this, so you may see some updates in the next days.

The issues have now been enabled by the way.

@jonschmidt
Copy link

All good! Thanks for the effort. Just made an issue in your repo that i am hitting now.

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

No branches or pull requests

4 participants