question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

discogs plugin doesnt find anything using auto import on beets latest commit

See original GitHub issue

Problem

I am using beets on the latest commit on the master (link).

the auto importer does not yieldany candidate for any album on discogs. here is a trivial import output in verbose:

root@beets:/media/music/tag# beet -vv import -t 1967\ -\ Blowin\'\ Your\ Mind\ \(2008\ Remaster\)/
user configuration: /beets/config.yaml
data directory: /beets
plugin paths:
/src/beets/beets/mediafile.py:19: UserWarning: beets.mediafile is deprecated; use mediafile instead
  warnings.warn("beets.mediafile is deprecated; use mediafile instead")
inline: adding item field multidisc
inline: adding item field disc_number
inline: adding item field disc_and_track
Sending event: pluginload
library database: /mnt/efesto-data/beets/library.db
library directory: /media/music-library/library
Sending event: library_opened
Sending event: import_begin
ignoring b'@eaDir' due to ignore rule b'@eaDir'
Sending event: import_task_created
Sending event: import_task_start
Looking up: /media/music/tag/1967 - Blowin' Your Mind (2008 Remaster)
Tagging Van Morrison - Blowin' Your Mind (2008 Remaster)
No album ID found.
Search terms: Van Morrison - Blowin' Your Mind (2008 Remaster)
ignoring b'@eaDir' due to ignore rule b'@eaDir'
Album might be VA: False
Evaluating 0 candidates.

/media/music/tag/1967 - Blowin' Your Mind (2008 Remaster) (13 items)
Sending event: import_task_before_choice
Sending event: before_choose_candidate
No matching release found for 13 tracks.

The release is correctly found if i explicitly provide the discogs ID.

Setup

  • OS: beets running on a custom docker container running on Synology NAS DS918+
  • Python version: 3.7.3
  • beets version: beets master at latest commit
  • Turning off plugins made problem go away (yes/no): no

Date of the container is correctly set. Discogs plugin is correctly authorized and working. I am running on the latest commit cause i really need musicbrainz to be disabled. bandcamp plugin works correctly and yields candidates.

My configuration (output of beet config) is:

directory: /media/music-library/library
library: /mnt/efesto-data/beets/library.db


# files/directories matching one of these patterns are ignored during import
ignore:
- .*
- '*~'
- System Volume Information
- lost+found
- '@eaDir'
ignore_hidden: yes
clutter: ["Thumbs.db", ".DS_Store", "*.m3u", "*.pls", "*.db"]


# replace special characters in generated filenames
# replace:
#     '[\\/]': _
#     '^\.': _
#     '[\x00-\x1f]': _
#     '[<>:"\?\*\|]': _
#     '\.$': _
#     '\s+$': ''
asciify_paths: yes
art_filename: cover  # results in "cover.jpg"

# use mutliple threads during import
threaded: yes

# on multi-disk releases, assign track numbers for the whole album. If enabled, make sure tracknames do not collide ("paths" setting).
per_disc_numbering: yes
# use the release-date of the original (first) release of an album?
original_date: no

aunique:
    keys: albumartist album
    disambiguators:  catalognum label year albumtype albumdisambig releasegroupdisambig
    bracket: '[]'

## UI options
ui:
  color: yes


import:
  # write metadata to music files
  write: yes
   
# move imported files from source to the music directory
  move: yes
  copy: yes
  delete: no

  resume: ask
  incremental: yes  #-i
  incremental_skip_later: yes
  from_scratch: yes
  quiet: no #--quiet
  #quiet_fallback: skip

  timid: no
  log: /mnt/efesto-data/beets/beets-log.log
  detail: yes
  group_albums: no # if yes, search for different album in the same directory through metadata
  bell: yes

  # set_fields:
  #   genre: 'to listen'
  #   collection: 'unordered'

musicbrainz:
  enabled: no
  # host: localhost:5000
  # ratelimit: 100
  # searchlimit: 1


match:
    strong_rec_thresh: 0.07      # match 90% or better for auto import
    medium_rec_thresh: 0.25
    rec_gap_thresh: 0.25
    max_rec:
        missing_tracks: medium
        unmatched_tracks: medium
    preferred:
        media: []
        original_year: no
    ignored: []
    ignore_video_tracks: yes
    ignore_data_tracks: yes
    ignored_media: ['Data CD', 'DVD', 'DVD-Video', 'Blu-ray', 'HD-DVD', 'VCD', 'SVCD', 'UMD', 'VHS']



    # default: Album/%lower{%asciify{$albumartist}}/[$original_year] %lower{%asciify{$albumartist}} - %lower{%asciify{$album}} %lower{$atypes} %lower{%aunique{}}/%if{$multidisc,$disc}$track %lower{%asciify{$artist}} - %lower{%asciify{$title}}
    # default: 'Albums/%the{$albumartist}/$album (%if{$original_year,$original_year}) 
    #   %aunique{albumartist album year, albumdisambig}%if{$albumdisambig,($albumdisambig $year) }%if{$is_flac,($format $bitdepth-$my_samplerate),($format $av_bitrate)}/
    #   %if{$multidisc,$disc-}$track - $title'

## PLUGINS
plugins: [
   albumtypes, # https://beets.readthedocs.io/en/stable/plugins/albumtypes.html
   # bandcamp, # https://github.com/snejus/beetcamp
   bpd, # https://beets.readthedocs.io/en/stable/plugins/bpd.html
   convert, # https://beets.readthedocs.io/en/stable/plugins/convert.html
   discogs,  # https://beets.readthedocs.io/en/stable/plugins/discogs.html
   duplicates, #https://beets.readthedocs.io/en/stable/plugins/duplicates.html
   edit,  # https://beets.readthedocs.io/en/stable/plugins/edit.html
   export, # https://beets.readthedocs.io/en/stable/plugins/export.html
   fetchart,  # https://beets.readthedocs.io/en/stable/plugins/fetchart.html
   fromfilename,  # https://beets.readthedocs.io/en/stable/plugins/fromfilename.html
   hook, # https://beets.readthedocs.io/en/stable/plugins/hook.html
   info, # https://beets.readthedocs.io/en/stable/plugins/info.html
   inline,  # https://beets.readthedocs.io/en/stable/plugins/inline.html
   mbsync,  # https://beets.readthedocs.io/en/stable/plugins/mbsync.html
   # mpdupdate, # https://beets.readthedocs.io/en/stable/plugins/mpdupdate.html
   missing , # https://beets.readthedocs.io/en/stable/plugins/missing.html
   rewrite, # https://beets.readthedocs.io/en/stable/plugins/rewrite.html
   # scrub,  # https://beets.readthedocs.io/en/stable/plugins/scrub.html
   types, # https://beets.readthedocs.io/en/stable/plugins/types.html
   web, # https://beets.readthedocs.io/en/stable/plugins/web.html
   usertag, # https://github.com/igordertigor/beets-usertag
   # spotify, # https://beets.readthedocs.io/en/stable/plugins/spotify.html
   copyartifacts,
   fromfilename
   # bpsync,  # https://beets.readthedocs.io/en/stable/plugins/bpsync.html
 ]


paths:
    singleton: Non-Album/%lower{%asciify{$albumartist}}/%lower{%asciify{$artist}} - %lower{%asciify{$title}}
    comp: Compilations/%lower{%asciify{$album}} %lower{$atypes} [%lower{%asciify{$catalognum}}] %lower{[%aunique{}]}/%if{disctotal>1, $disc}$track %lower{%asciify{artist}} - %lower{%asciify{$title}}
    default: Album/%lower{%asciify{$albumartist}}/[$original_year] %lower{%asciify{$albumartist}} - %lower{%asciify{$album}} %lower{$atypes} [%lower{%asciify{$catalognum}}] %lower{%aunique{}}/%if{$multidisc, disc $disc_number/}$disc_and_track %lower{%asciify{$artist}} - %lower{%asciify{$title}}
    # default: Album/%lower{%asciify{$albumartist}}/[$original_year] %lower{%asciify{$albumartist}} - %lower{%asciify{$album}} %lower{$atypes} [%lower{%asciify{$catalognum}}] %lower{%aunique{}}/$disc_and_track %lower{%asciify{$artist}} - %lower{%asciify{$title}}
    # ext:jpeg: $albumpath/images/
    # ext:jpg: $albumpath/
    # ext:gif: $albumpath/images/
    # ext:png: $albumpath/images/
    # ext:URL: $albumpath/others/
    # ext:url: $albumpath/others/

copyartifacts:
    # extensions: .jpg 
    print_ignored: yes
    
edit:
  itemfields: track title artist album disc disctitle disctotal tracktotal
  albumfields: album albumartist

item_fields:
    # initial: albumartist[0].upper() + u'.'
    # myDisc: ('' if disctotal == 1 else str(disc) + '. ')
    multidisc: 1 if disctotal > 1 else 0
    disc_number: |
      if disctotal > 1 and disctotal < 10:
        return '{:01d}'.format(disc)
      elif disctotal > 9:
        return '{:02d}'.format(disc)
    disc_and_track: |
      if disctotal > 1 and disctotal < 10:
        return '{:01d}.{:02d}'.format(disc, track)
      elif disctotal > 9:
        return '{:02d}.{:02d}'.format(disc, track)
      else:
        return '{:02d}'.format(track)

albumtypes:
    types:
        - ep: 'EP'
        - single: 'Single'
        - soundtrack: 'OST'
        - live: 'Live'
        - compilation: 'Compilation'
        - remix: 'Remix'
    ignore_va: compilation
    bracket: '[]'

discogs:
   user_token: ooHXaLXOGeUMHJjWRRcPyysAtSElUskaehzHcmVq
   index_tracks: yes
   # source_weight: 0.0

bandcamp:
  source_weight: 2.5
  preferred_media: Vinyl,CD,Cassette
  include_digital_only_tracks: true
  search_max: 5
  art: yes
  comments_separator: "\n---\n"
  exclude_extra_fields: []
  genre:
    capitalize: yes
    maximum: 0
    always_include: []
    mode: progressive # classical, progressive or psychedelic

spotify:
    source_weight: 0.7
    mode: open
    show_failures: on
    tiebreak: first

duplicates:
    checksum: no  # expensive

fetchart:
    auto: yes
    cautious: true
    cover_names: cover
    quality: 100
    store_source: yes
    sources:
        - filesystem
        - coverart: release
        - coverart: releasegroup
        - itunes
        - '*'
types:
    rating: int

web:
    host: 192.168.1.20




    # regex: [
    #     {
    #         field: "albumartist", # Field in the item object to regex.
    #         search: "Something", # String to look for.
    #         replace: "Replaced" # Replacement value.
    #     },
    #     {
    #         field: "title",
    #         search: "Something Else",
    #         replace: "AlsoReplaced"
    #     }
    # ]

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
emanuele-virgillitocommented, Jun 15, 2022

I can close the issue, indeed part of the answer was that of @snejus. After thousands of tagged albums i used as test the worst one. The outcome was actually a mix of subtle problems with that and my docker configuration. Thank you!

1reaction
rezaisradcommented, Apr 7, 2022

I’ve made a few changes to the API call for search as I found the current form was missing metadata for a lot of my requests: https://github.com/rezaisrad/beets/blob/41f17beb237cc9bc1fd91431db95abdb070c0b50/beetsplug/discogs.py#L287-L386

Still a work in progress but my discogs searches have improved so far

Read more comments on GitHub >

github_iconTop Results From Across the Web

crash when using Discogs plugin · Issue #2965 · beetbox/beets
Problem. Running an incremental import on a folder of files that may either be new or have duplicates in the library. When the...
Read more >
How to use discogs plugin? - Help - beets
Do I need a special flag? command: beet import '/Music/unsorted/Against Me!/' Here is my config (I currently have lastgenre excluded from plugins.)
Read more >
Discogs Plugin — beets 1.3.17 documentation
The discogs plugin extends the autotagger's search capabilities to include matches from the Discogs database. Installation¶. To use the discogs plugin, first ...
Read more >
beets Documentation - Read the Docs
Welcome to the documentation for beets, the media library management system for obsessive music geeks. If you're new to beets, begin with ......
Read more >
Continuation of the Python Discogs API Client - Forum
Yes, the “new” client is 100% compatible with the original one and can be run as a drop-in replacement. usage of the module...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found