Giter VIP home page Giter VIP logo

beets-beatport4's People

Contributors

joj0 avatar samik081 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

joj0 josharagon

beets-beatport4's Issues

NoneType object has no attribute artists

hi, I got a similar error to #4

(...)
  File "/usr/local/lib/python3.10/dist-packages/beetsplug/beatport4.py", line 600, in _get_album_info
    va = len(release.artists) > 3
AttributeError: 'NoneType' object has no attribute 'artists'

my beets setup is set to tag from scratch, and I move the 'artists' tag to 'artist' if that is not present, then I wipe 'artists' because the subsonic api reads artists first then artist if it is empty, which is kinda annoying as sometimes 'artists' is kind of unrelated to 'artist' which is usually the right one.
my preference would be, if some critical info is missing for beatport api to run, do not run it without crashing, but also have the artists-> artist fallback.

Unable to run since last week

I have everything working fine, until last week when all my devices running beats had the same issue at the same time.
Did the API change again?

I reset the password, but I'm still instructed to fix my config, which is all correct.

Can anyone tell me what is going on?

nonetype has no attribute name

probably another version of #7
this one happened as I was reorganising an old library of around 5k files.
the main issue again, is not that it fails, but the crash itself, I would suggest that if anything that we need is missing, rather than crashing the program should skip the file with a warning like "[name of file] not processed by beatport4 because object has no attribute [name of attribute] "

Traceback (most recent call last):
 File "/usr/local/bin/beet", line 8, in <module>
   sys.exit(main())
 File "/usr/local/lib/python3.10/dist-packages/beets/ui/__init__.py", line 1285, in main
   _raw_main(args)
 File "/usr/local/lib/python3.10/dist-packages/beets/ui/__init__.py", line 1272, in _raw_main
   subcommand.func(lib, suboptions, subargs)
 File "/usr/local/lib/python3.10/dist-packages/beets/ui/commands.py", line 973, in import_func
   import_files(lib, paths, query)
 File "/usr/local/lib/python3.10/dist-packages/beets/ui/commands.py", line 943, in import_files
   session.run()
 File "/usr/local/lib/python3.10/dist-packages/beets/importer.py", line 340, in run
   pl.run_parallel(QUEUE_SIZE)
 File "/usr/local/lib/python3.10/dist-packages/beets/util/pipeline.py", line 446, in run_parallel
   raise exc_info[1].with_traceback(exc_info[2])
 File "/usr/local/lib/python3.10/dist-packages/beets/util/pipeline.py", line 311, in run
   out = self.coro.send(msg)
 File "/usr/local/lib/python3.10/dist-packages/beets/util/pipeline.py", line 193, in coro
   func(*(args + (task,)))
 File "/usr/local/lib/python3.10/dist-packages/beets/importer.py", line 1376, in lookup_candidates
   task.lookup_candidates()
 File "/usr/local/lib/python3.10/dist-packages/beets/importer.py", line 660, in lookup_candidates
   autotag.tag_album(self.items, search_ids=self.search_ids)
 File "/usr/local/lib/python3.10/dist-packages/beets/autotag/match.py", line 461, in tag_album
   for matched_candidate in hooks.album_candidates(items,
 File "/usr/local/lib/python3.10/dist-packages/beets/plugins.py", line 573, in decorated
   for v in generator(*args, **kwargs):
 File "/usr/local/lib/python3.10/dist-packages/beets/autotag/hooks.py", line 629, in album_candidates
   yield from plugins.candidates(items, artist, album, va_likely,
 File "/usr/local/lib/python3.10/dist-packages/beets/plugins.py", line 384, in candidates
   yield from plugin.candidates(items, artist, album, va_likely,
 File "/usr/local/lib/python3.10/dist-packages/beetsplug/beatport4.py", line 643, in candidates
   return self._get_releases(query)
 File "/usr/local/lib/python3.10/dist-packages/beetsplug/beatport4.py", line 699, in _get_releases
   albums = [self._get_album_info(x)
 File "/usr/local/lib/python3.10/dist-packages/beetsplug/beatport4.py", line 699, in <listcomp>
   albums = [self._get_album_info(x)
 File "/usr/local/lib/python3.10/dist-packages/beetsplug/beatport4.py", line 712, in _get_album_info
   tracks = [self._get_track_info(x) for x in release.tracks]
 File "/usr/local/lib/python3.10/dist-packages/beetsplug/beatport4.py", line 712, in <listcomp>
   tracks = [self._get_track_info(x) for x in release.tracks]
 File "/usr/local/lib/python3.10/dist-packages/beetsplug/beatport4.py", line 728, in _get_track_info
   title = track.name
AttributeError: 'NoneType' object has no attribute 'name'

NoneType error while splitting length

Hi, quick and dirty report :-)

Get back to me if you need further details.

HTH!

Correcting tags from:
    Aux 88 - Aux 88
To:
    AUX 88 - Aux 88
URL:
    https://musicbrainz.org/release/b27469e6-5652-4dee-bc1c-79480bbd033c
(Similarity: 48.6%) (missing tracks, label, year) (CD, 2005, US, Submerge Recordings, SUBCD-3011-2)
 * Intro
Missing tracks (12/13 - 92.3%):
 ! We Make Beats                          (# 2) (3:55)
 ! We Are The Future                      (# 3) (5:17)
 ! Rated AUX                              (# 4) (5:10)
 ! K-1 Theme                              (# 5) (5:20)
 ! Tom Tom Beats                          (# 6) (4:36)
 ! Lost In Space Mixdown                  (# 7) (3:54)
 ! Step Into The Light                    (# 8) (4:46)
 ! Don't Bite My Beats                    (# 9) (3:55)
 ! Clones                                 (#10) (5:57)
 ! Detroit Non Stop                       (#11) (3:52)
 ! Aux Mind 2005                          (#12) (4:55)
 ! Electro Planetary Acknowedments Part 1 (#13) (5:52)
Apply, More candidates, Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort, eDit, edit Candidates, plaY? a
Traceback (most recent call last):
  File "/home/jojo/.pyenv/versions/beets/bin/beet", line 33, in <module>
    sys.exit(load_entry_point('beets', 'console_scripts', 'beet')())
  File "/home/jojo/git/beets/beets/ui/__init__.py", line 1304, in main
    _raw_main(args)
  File "/home/jojo/git/beets/beets/ui/__init__.py", line 1291, in _raw_main
    subcommand.func(lib, suboptions, subargs)
  File "/home/jojo/git/beets/beets/ui/commands.py", line 1034, in import_func
    import_files(lib, paths, query)
  File "/home/jojo/git/beets/beets/ui/commands.py", line 974, in import_files
    session.run()
  File "/home/jojo/git/beets/beets/importer.py", line 340, in run
    pl.run_parallel(QUEUE_SIZE)
  File "/home/jojo/git/beets/beets/util/pipeline.py", line 446, in run_parallel
    raise exc_info[1].with_traceback(exc_info[2])
  File "/home/jojo/git/beets/beets/util/pipeline.py", line 311, in run
    out = self.coro.send(msg)
  File "/home/jojo/git/beets/beets/util/pipeline.py", line 193, in coro
    func(*(args + (task,)))
  File "/home/jojo/git/beets/beets/importer.py", line 1408, in lookup_candidates
    task.lookup_candidates()
  File "/home/jojo/git/beets/beets/importer.py", line 661, in lookup_candidates
    autotag.tag_album(self.items, search_ids=self.search_ids)
  File "/home/jojo/git/beets/beets/autotag/match.py", line 461, in tag_album
    for matched_candidate in hooks.album_candidates(items,
  File "/home/jojo/git/beets/beets/plugins.py", line 573, in decorated
    for v in generator(*args, **kwargs):
  File "/home/jojo/git/beets/beets/autotag/hooks.py", line 632, in album_candidates
    yield from plugins.candidates(items, artist, album, va_likely, extra_tags)
  File "/home/jojo/git/beets/beets/plugins.py", line 384, in candidates
    yield from plugin.candidates(items, artist, album, va_likely,
  File "/home/jojo/git/beets-beatport4/beetsplug/beatport4.py", line 525, in candidates
    return self._get_releases(query)
  File "/home/jojo/git/beets-beatport4/beetsplug/beatport4.py", line 581, in _get_releases
    albums = [self._get_album_info(x)
  File "/home/jojo/git/beets-beatport4/beetsplug/beatport4.py", line 581, in <listcomp>
    albums = [self._get_album_info(x)
  File "/home/jojo/git/beets-beatport4/beetsplug/beatport4.py", line 338, in search
    yield self.get_release(release['id'])
  File "/home/jojo/git/beets-beatport4/beetsplug/beatport4.py", line 354, in get_release
    release.tracks = self.get_release_tracks(beatport_id)
  File "/home/jojo/git/beets-beatport4/beetsplug/beatport4.py", line 368, in get_release_tracks
    return [self.get_track(t['id']) for t in response]
  File "/home/jojo/git/beets-beatport4/beetsplug/beatport4.py", line 368, in <listcomp>
    return [self.get_track(t['id']) for t in response]
  File "/home/jojo/git/beets-beatport4/beetsplug/beatport4.py", line 378, in get_track
    return BeatportTrack(response)
  File "/home/jojo/git/beets-beatport4/beetsplug/beatport4.py", line 137, in __init__
    min, sec = data.get('length', '0:0').split(':')
AttributeError: 'NoneType' object has no attribute 'split'
   prod  (beets)    ~/git/beets   all_in  

no match for release with more than 10 tracks ?

hello, am i alone to have unmatched track for release with more than 10 tracks ?


/home/xxxx/rclone/multimedia/music/bylabel/BPitch Control/(2000) Paul Kalkbrenner - Superimpose (13 items)

Tagging:
    Paul Kalkbrenner - Superimpose
URL:
    https://beatport.com/release/superimpose/12245
(Similarity: 87.9%) (tracks, year, unmatched tracks) (Beatport, Digital, 2001, Bpitch, BPC016)
 * Krank
 * Feature Me    -> Feature Me  (index)
 * La Force      -> La Force  (index)
 * Seaquest      -> Seaquest  (index)
 * Accès Rapide  -> Acces Rapide  (index)
 * Wasser        -> Wasser  (index)
 * Mono Play     -> Mono Play (index)
 * Far Away      -> Far away  (index)
 * Radius      -> Radius  (index)
 * Tag 407      -> Tag 407 (index)
Unmatched tracks (3):
 ! Rubin    (#11) (6:07)
 ! Kurz     (#12) (3:41)
 ! Gia 2000 (#13) (5:08)
[A]pply, More candidates, Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort? 

Crash when beatport_token.json is present but has wrong format

Got the following traceback after installing and configuring the plugin with beatport username and password and running beets import:

Traceback (most recent call last):
  File "~/.pyenv/versions/3.8.10/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "~/.pyenv/versions/3.8.10/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "~/.pyenv/versions/3.8.10/lib/python3.8/site-packages/beets/__main__.py", line 24, in <module>
    main(sys.argv[1:])
  File "~/.pyenv/versions/3.8.10/lib/python3.8/site-packages/beets/ui/__init__.py", line 1285, in main
    _raw_main(args)
  File "~/.pyenv/versions/3.8.10/lib/python3.8/site-packages/beets/ui/__init__.py", line 1272, in _raw_main
    subcommand.func(lib, suboptions, subargs)
  File "~/.pyenv/versions/3.8.10/lib/python3.8/site-packages/beets/ui/commands.py", line 973, in import_func
    import_files(lib, paths, query)
  File "~/.pyenv/versions/3.8.10/lib/python3.8/site-packages/beets/ui/commands.py", line 943, in import_files
    session.run()
  File "~/.pyenv/versions/3.8.10/lib/python3.8/site-packages/beets/importer.py", line 337, in run
    plugins.send('import_begin', session=self)
  File "~/.pyenv/versions/3.8.10/lib/python3.8/site-packages/beets/plugins.py", line 488, in send
    result = handler(**arguments)
  File "~/.pyenv/versions/3.8.10/lib/python3.8/site-packages/beets/plugins.py", line 145, in wrapper
    return func(*args, **kwargs)
  File "~/.pyenv/versions/3.8.10/lib/python3.8/site-packages/beetsplug/beatport4.py", line 528, in setup
    beatport_token = BeatportOAuthToken(json.load(f))
  File "~/.pyenv/versions/3.8.10/lib/python3.8/site-packages/beetsplug/beatport4.py", line 47, in __init__
    self.access_token = str(data['access_token'])
KeyError: 'access_token'

I noticed ~/.config/beets/beatport_token.json already exists. I suppose this file was left by the old beatport plugin (?) and is probably not in the format beatport4 expects, hence the crash. The issue was resolved simply by removing the file.

Import artwork issue

Hi Samik,

I am importing some tracks that I originally purchased on beatport, the tracks have embedded art but the metadata is a mess. When I import them, all new metadata is intact but the original artwork has been removed and replaced with apples generic waveform image.

Could you please help?

`beet -vvv import /Users/jc/Music/iTunes/iTunes\ Media/My\ iTunes/Music/DJ\ MUSIC/HOUSE/3485264_Everyday_My_Life_feat__Christa_Original.mp3
user configuration: /Users/jc/.config/beets/config.yaml
data directory: /Users/jc/.config/beets
plugin paths:
fetchart: lastfm: Disabling art source due to missing key
fetchart: To use Spotify as an album art source, you must install the beautifulsoup4 module. See the documentation for further details.
Sending event: pluginload
library database: /Users/jc/Music/NEW_MUSIC_DB/newmusic.blbpip3 uninstall
library directory: /Users/jc/Music/NEW_MUSIC
Sending event: library_opened
Sending event: import_begin
beatport4: Started authorizing to the API using username and password
beatport4: Authorized with username and password as djkc1072 <**********************>
beatport4: Authorization code: ueOcbiq
beatport4: Exchanged authorization code for the access token: {"access_token": "
", "expires_in": 36000, "token_type": "Bearer", "scope": "app:docs user:dj", "refresh_token": "************************lh8s"}
Sending event: import_task_created
Sending event: import_task_start
Looking up: /Users/jc/Music/iTunes/iTunes Media/My iTunes/Music/DJ MUSIC/HOUSE/3485264_Everyday_My_Life_feat__Christa_Original.mp3
Tagging Sam Skilz - Everyday My Life (feat. Christa)
No album ID found.
Search terms: Sam Skilz - Everyday My Life (feat. Christa)
Album might be VA: False
Searching for MusicBrainz releases with: {'release': 'everyday my life (feat. christa)', 'artist': 'sam skilz', 'tracks': '1'}
Requesting MusicBrainz release c4e5734e-6649-4886-8ca0-d067ee790290
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_album_extract
Sending event: albuminfo_received
Candidate: Dajaé - Everyday My Life (c4e5734e-6649-4886-8ca0-d067ee790290)
Computing track assignment...
...done.
Success. Distance: 0.53
Requesting MusicBrainz release cf92cd08-66c7-4e0e-af6a-9ae978d5ab97
Sending event: mb_track_extract
Sending event: mb_album_extract
Sending event: albuminfo_received
Candidate: Third Party - Everyday of My Life (cf92cd08-66c7-4e0e-af6a-9ae978d5ab97)
Computing track assignment...
...done.
Success. Distance: 0.43
Requesting MusicBrainz release ad73582d-aa3e-4cdd-98db-c18e1a83b376
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_album_extract
Sending event: albuminfo_received
Candidate: Sam Tsui - Christmas Everyday (ad73582d-aa3e-4cdd-98db-c18e1a83b376)
Computing track assignment...
...done.
Success. Distance: 0.72
Requesting MusicBrainz release 7f342d22-2ddc-4b97-ad72-1cb959b5dfac
Sending event: mb_track_extract
Sending event: mb_album_extract
Sending event: albuminfo_received
Candidate: Concept Collective feat. Quazi, Blonde Larry & Fali - Everyday Life (7f342d22-2ddc-4b97-ad72-1cb959b5dfac)
Computing track assignment...
...done.
Success. Distance: 0.58
Requesting MusicBrainz release 4e316162-6e5f-4766-b220-26f59cb06451
Sending event: mb_track_extract
Sending event: mb_album_extract
Sending event: albuminfo_received
Candidate: Coldplay - Everyday Life (4e316162-6e5f-4766-b220-26f59cb06451)
Computing track assignment...
...done.
Success. Distance: 0.61
Sending event: albuminfo_received
Candidate: Sam Skilz - Everyday My Life (feat. Christa) (908650)
Computing track assignment...
...done.
Success. Distance: 0.07
Sending event: albuminfo_received
Candidate: Max C, Notes2Selves - Sharing My Life (1595187)
Computing track assignment...
...done.
Success. Distance: 0.58
Sending event: albuminfo_received
Candidate: Sam Skilz - Journey (feat. Emory Toler) (3534895)
Computing track assignment...
...done.
Success. Distance: 0.44
Sending event: albuminfo_received
Candidate: Sam Skilz - Stay Together (feat. Grace Ashaye) (2106639)
Computing track assignment...
...done.
Success. Distance: 0.44
Sending event: albuminfo_received
Candidate: Sam Skilz, Miss MAD - After Life (2715695)
Computing track assignment...
...done.
Success. Distance: 0.43
Evaluating 10 candidates.

/Users/jc/Music/iTunes/iTunes Media/My iTunes/Music/DJ MUSIC/HOUSE/3485264_Everyday_My_Life_feat__Christa_Original.mp3 (1 items)
Sending event: import_task_before_choice
Sending event: before_choose_candidate
Tagging:
Sam Skilz - Everyday My Life (feat. Christa)
URL:
https://beatport.com/release/everyday-my-life-feat-christa/908650
(Similarity: 92.7%) (missing tracks) (Beatport, Digital, 2012, GaGa Records, GR143)
Missing tracks (1/2 - 50.0%):
! Everyday My Life feat. Christa (Dub Original Mix) (# 2) (6:32)
[A]pply, More candidates, Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort? a
Sending event: import_task_choice
Sending event: import_task_apply
0 of 1 items replaced
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
fetchart: trying source coverart for album Sam Skilz - Everyday My Life (feat. Christa)
fetchart: getting URL: https://coverartarchive.org/release/908650
fetchart: Cover Art Archive: error loading response:

<title>400 Bad Request</title>

Bad Request

invalid MBID specified

fetchart: trying source coverart for album Sam Skilz - Everyday My Life (feat. Christa)
fetchart: trying source google for album Sam Skilz - Everyday My Life (feat. Christa)
fetchart: getting URL: https://www.googleapis.com/customsearch/v1?key=**********************************************Eu-mUI&cx=001442825323518660753%3Ahrh5ch1gjzm&q=Sam+Skilz%2CEveryday+My+Life+%28feat.+Christa%29&searchType=image
fetchart: google fetchart error: accessNotConfigured
fetchart: trying source amazon for album Sam Skilz - Everyday My Life (feat. Christa)
fetchart: trying source albumart for album Sam Skilz - Everyday My Life (feat. Christa)
Sending event: item_copied
Sending event: database_change
Sending event: database_change
Sending event: write
Sending event: after_write
Sending event: database_change
Sending event: import_task_files
beatport4: Failed to embed image: 'ImportTask' object has no attribute 'item'
Sending event: album_imported
Sending event: import
Sending event: cli_exit`

100 Tracks release not recognized

Hi, it seems a large release isn't recognized as such:

Various Artists - Tech-house Sessions
  ≠ tracks, year
  Beatport | Digital | 2012 | Bavaria Recordings | 10031448
  https://beatport.com/release/tech-house-sessions/858337
  * Artist: 
  ≠ Album: Tech-House Sessions -> Tech-house Sessions
     ≠ (#81) Antidote (Morgan Tomas Remix) (9:39) -> (#5) Institution (Ingo Boss Remix) (8:22)
Missing tracks (9/10 - 90.0%):
 ! I Wanna Funk (Chube.ka Darkside Remix) (#1) (6:54)
 ! Phunky Tonner (Remix) (#2) (8:00)
 ! Comme Ci Comme Ca (Alex Dolby Remix) (#3) (7:41)
 ! Tulpenbluete (Andre Kronert Remix) (#4) (8:54)
 ! Duetto (Damolh33 Remix) (#6) (6:11)
 ! Janet (#7) (5:26)
 ! Wormhole (Original) (#8) (8:22)
 ! Pferd (#9) (7:55)
 ! Brothers And Sisters (Ron Ractive Edit) (#10) (7:12)
➜ [A]pply, More candidates, Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort, plaY, eDit, edit Candidates? 

The release "Tech-house session" has 100 tracks on it, but the importer thinks it is only 10 tracks. The track Antidote (Morgan Tomas...) definitely is on that release when I look at the release link in the browser.

Key or BPM missing in Beatport API response

Hi again,
I've got another one. Sorry for the bad title. I don't know what's happening here. Even though I selected a candidate from Discogs, the beatport4 plug throws an error while trying to apply something around bpm. Just wild guessing it's got something to do with bpm being available from beatport api but now from discogs??

Get back to me if you'd like to have further details or debug prints in the code or something. Just reporting quick & dirty for now! Appologeeeez!

/remote/data/music-archive/0-andi/Dezember 2011 Beatport/Beatport Music/2662879_Air_Raz Remix.mp3 (1 items)
Tagging:
    Advanced Human - Air EP
URL:
    https://www.discogs.com/release/3079773-Advanced-Human-Air-EP
(Similarity: 78.8%) (missing tracks, tracks) (Discogs, Vinyl, 2011, Australia, Gynoid Audio, GYNOID.05)
 * Air - Raíz Remix -> Air (Raíz Remix) (title)
Missing tracks (3/4 - 75.0%):
 ! Air                       (# 1)
 ! Air (Ground Loop Remix)   (# 2)
 ! Air (Markus Suckut Remix) (# 3)
[A]pply, More candidates, Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort, eDit, edit Candidates, plaY? m
Finding tags for album "Advanced Human - Air EP".
Candidates:
1. Advanced Human - Air EP (78.8%) (missing tracks, tracks) (Discogs, Vinyl, 2011, Australia, Gynoid Audio, GYNOID.05)
2. Advanced Human - Air EP (74.1%) (missing tracks, tracks) (Discogs, File, 2011, Australia, Gynoid Audio, GYNOID.05)
3. Advanced Human - Drone Machine EP (47.9%) (album, year, missing tracks, ...) (Beatport, Digital, 2013, Starkstrom Schallplatten, SST016)
4. Advanced Human - Creational Forces (47.6%) (album, tracks, missing tracks, ...) (12" Vinyl, 2013, AU, Gynoid Limited, GYNLTD 005)
5. Advanced Human - Gamera Ep (46.0%) (missing tracks, album, tracks, ...) (Beatport, Digital, 2016, Counter Pulse, CP014)
6. Advanced Human - Grinding EP (43.6%) (missing tracks, album, tracks, ...) (Digital Media, 2014, NL, Dynamic Reflection, DREF020)
7. Advanced Human - Kyoto EP (41.8%) (album, missing tracks, year, ...) (Beatport, Digital, 2018, Counter Pulse, CP062D)
8. Advanced Human - Bullet Train EP (40.5%) (album, missing tracks, tracks, ...) (Beatport, Digital, 2019, Hypnotic Room, HROOM284)
9. Advanced Human - Prometheus Ep (38.6%) (album, missing tracks, year, ...) (Beatport, Digital, 2013, Android Muziq, ANDROIDREC008)
10. Unbalance - Distress EP (31.6%) (missing tracks, artist, album, ...) (Digital Media, 2011, AU, Gynoid Audio, GYNOIDD042)
11. Mark Morris & Logotech - Kaparezz EP (30.5%) (missing tracks, artist, album, ...) (Digital Media, 2013, XW, Gynoid Audio, GYNOIDD099)
12. Rraph - E404 EP (28.8%) (album, artist, missing tracks, ...) (Digital Media, 2016, XW, Gynoid Audio, gynoidd149)
13. Various - Avatar  (27.4%) (missing tracks, album, tracks, ...) (Discogs, Vinyl, 2014, Germany, Affin LTD, Affin 017 LTD)
# selection (default 1), Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort, eDit, edit Candidates, plaY? 2
Tagging:
    Advanced Human - Air EP
URL:
    https://www.discogs.com/release/9808314-Advanced-Human-Air-EP
(Similarity: 74.1%) (missing tracks, tracks) (Discogs, File, 2011, Australia, Gynoid Audio, GYNOID.05)
 * Air - Raíz Remix -> Air (Raíz Remix) (title)
Missing tracks (4/5 - 80.0%):
 ! Air (Original Mix)             (# 1) (7:07)
 ! Air (Ground Loop's Echo Remix) (# 2) (5:51)
 ! Air (Markus Suckut Remix)      (# 3) (6:24)
 ! Air (Jin Hiyama Remix)         (# 5) (7:11)
Apply, More candidates, Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort, eDit, edit Candidates, plaY? a
Traceback (most recent call last):
  File "/home/jojo/.pyenv/versions/beets/bin/beet", line 33, in <module>
    sys.exit(load_entry_point('beets', 'console_scripts', 'beet')())
  File "/home/jojo/git/beets/beets/ui/__init__.py", line 1304, in main
    _raw_main(args)
  File "/home/jojo/git/beets/beets/ui/__init__.py", line 1291, in _raw_main
    subcommand.func(lib, suboptions, subargs)
  File "/home/jojo/git/beets/beets/ui/commands.py", line 1034, in import_func
    import_files(lib, paths, query)
  File "/home/jojo/git/beets/beets/ui/commands.py", line 974, in import_files
    session.run()
  File "/home/jojo/git/beets/beets/importer.py", line 340, in run
    pl.run_parallel(QUEUE_SIZE)
  File "/home/jojo/git/beets/beets/util/pipeline.py", line 446, in run_parallel
    raise exc_info[1].with_traceback(exc_info[2])
  File "/home/jojo/git/beets/beets/util/pipeline.py", line 311, in run
    out = self.coro.send(msg)
  File "/home/jojo/git/beets/beets/util/pipeline.py", line 193, in coro
    func(*(args + (task,)))
  File "/home/jojo/git/beets/beets/importer.py", line 1408, in lookup_candidates
    task.lookup_candidates()
  File "/home/jojo/git/beets/beets/importer.py", line 661, in lookup_candidates
    autotag.tag_album(self.items, search_ids=self.search_ids)
  File "/home/jojo/git/beets/beets/autotag/match.py", line 461, in tag_album
    for matched_candidate in hooks.album_candidates(items,
  File "/home/jojo/git/beets/beets/plugins.py", line 573, in decorated
    for v in generator(*args, **kwargs):
  File "/home/jojo/git/beets/beets/autotag/hooks.py", line 632, in album_candidates
    yield from plugins.candidates(items, artist, album, va_likely, extra_tags)
  File "/home/jojo/git/beets/beets/plugins.py", line 384, in candidates
    yield from plugin.candidates(items, artist, album, va_likely,
  File "/home/jojo/git/beets-beatport4/beetsplug/beatport4.py", line 524, in candidates
    return self._get_releases(query)
  File "/home/jojo/git/beets-beatport4/beetsplug/beatport4.py", line 580, in _get_releases
    albums = [self._get_album_info(x)
  File "/home/jojo/git/beets-beatport4/beetsplug/beatport4.py", line 580, in <listcomp>
    albums = [self._get_album_info(x)
  File "/home/jojo/git/beets-beatport4/beetsplug/beatport4.py", line 338, in search
    yield self.get_release(release['id'])
  File "/home/jojo/git/beets-beatport4/beetsplug/beatport4.py", line 354, in get_release
    release.tracks = self.get_release_tracks(beatport_id)
  File "/home/jojo/git/beets-beatport4/beetsplug/beatport4.py", line 367, in get_release_tracks
    return [BeatportTrack(t) for t in response]
  File "/home/jojo/git/beets-beatport4/beetsplug/beatport4.py", line 367, in <listcomp>
    return [BeatportTrack(t) for t in response]
  File "/home/jojo/git/beets-beatport4/beetsplug/beatport4.py", line 144, in __init__
    self.bpm = int(data['bpm'])
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'

Error when importing with specific release ID

When passing an ID via the -S option of the beets importer (in that case I'm meaning a Discogs release ID) beatport4 doesn't seem to like it:

$ beet -P fromfilename import -S 75310 "/remote/data/music-archive/DrumnbassJungleDrumfunk/0-Single-Tracks/60 Minute Man/60 minute man - the only one.mp3"
Traceback (most recent call last):
  File "/home/jojo/.pyenv/versions/beets/bin/beet", line 33, in <module>
    sys.exit(load_entry_point('beets', 'console_scripts', 'beet')())
  File "/home/jojo/git/beets/beets/ui/__init__.py", line 1304, in main
    _raw_main(args)
  File "/home/jojo/git/beets/beets/ui/__init__.py", line 1291, in _raw_main
    subcommand.func(lib, suboptions, subargs)
  File "/home/jojo/git/beets/beets/ui/commands.py", line 1034, in import_func
    import_files(lib, paths, query)
  File "/home/jojo/git/beets/beets/ui/commands.py", line 974, in import_files
    session.run()
  File "/home/jojo/git/beets/beets/importer.py", line 340, in run
    pl.run_parallel(QUEUE_SIZE)
  File "/home/jojo/git/beets/beets/util/pipeline.py", line 446, in run_parallel
    raise exc_info[1].with_traceback(exc_info[2])
  File "/home/jojo/git/beets/beets/util/pipeline.py", line 311, in run
    out = self.coro.send(msg)
  File "/home/jojo/git/beets/beets/util/pipeline.py", line 193, in coro
    func(*(args + (task,)))
  File "/home/jojo/git/beets/beets/importer.py", line 1408, in lookup_candidates
    task.lookup_candidates()
  File "/home/jojo/git/beets/beets/importer.py", line 661, in lookup_candidates
    autotag.tag_album(self.items, search_ids=self.search_ids)
  File "/home/jojo/git/beets/beets/autotag/match.py", line 422, in tag_album
    for id_candidate in hooks.albums_for_id(search_id):
  File "/home/jojo/git/beets/beets/autotag/hooks.py", line 584, in albums_for_id
    for a in plugins.album_for_id(album_id):
  File "/home/jojo/git/beets/beets/plugins.py", line 399, in album_for_id
    album = plugin.album_for_id(album_id)
  File "/home/jojo/git/beets-beatport4/beetsplug/beatport4.py", line 550, in album_for_id
    release = self.client.get_release(match.group(2))
  File "/home/jojo/git/beets-beatport4/beetsplug/beatport4.py", line 351, in get_release
    response = self._get(f'/catalog/releases/{beatport_id}/')
  File "/home/jojo/git/beets-beatport4/beetsplug/beatport4.py", line 409, in _get
    raise BeatportAPIError(
beetsplug.beatport4.BeatportAPIError: Error 404 for '/v4/catalog/releases/75310/

Disabling beatport4 for that import works around the problem:

$ beet -P beatport4,fromfilename import -S 75310 "/remote/data/music-archive/DrumnbassJungleDrumfunk/0-Single-Tracks/60 Minute Man/60 minute man - the only one.mp3"

/remote/data/music-archive/DrumnbassJungleDrumfunk/0-Single-Tracks/60 Minute Man/60 minute man - the only one.mp3 (1 items)
Correcting tags from:
    (unknown album)
To:
    60 Minute Man & DJ Touch - Give It Up E.P
URL:
    https://www.discogs.com/release/75310-60-Minute-Man-DJ-Touch-Give-It-Up-EP
...
...
...

Not an issue: Help getting access token on webapp?

Hi Samik!

This is not an issue, more a help-wise discussion :)

As you know Beatport team is not granting access to their APIs... is there a way to reproduce your workflow using the public client_id that their frontend uses to get an access token on a serverless app or through postman?

I tried but cannot get the "Location" header with the code that I'm supposed to get on the response. Would you help me with the https://api.beatport.com/v4/auth/o/authorize/ and the https://api.beatport.com/v4/auth/o/token/ requests please?

Candidates don't have tracknumbers

Hi,
thanks for maintaining a solution while the official beatport plugin is gone! I just came across some older Techno tracks that I'd like to import and they are nowhere to be found on Discogs or MusicBrainz. Just Beatport ;-) So: Thanks a ton!

I realised that tracknumbers are always missing in the candidates. I didn't investigate what to the problem could be, just reporting for now:

(Similarity: 42.5%) (missing tracks, media, source, tracks) (Beatport, Digital, 2009, Plus 8 Records, PLUS8100B)
 * Theychx (Tobias. Fuse Remix) (#12) (10:53) -> Intro (From Our Minds To Yours) (Tiefschwarz Remix) (#None) (10:40) (title, source, length)
Missing tracks (9/10 - 90.0%):
 ! 5 (Alex Under Remix)             (#None) (6:57)
 ! Ethnik (Paco Osuna Remix)        (#None) (9:45)
 ! Goo (Paco Osuna Remix)           (#None) (8:28)
 ! Hardphunk (Mike Shannon Reshake) (#None) (8:27)
 ! Kriket (Danilo Vigorito Remix)   (#None) (5:58)
 ! Statikphunk (Ambivalent Remix)   (#None) (6:04)
 ! Substance Abuse (Barem Remix)    (#None) (8:17)
 ! Vortex (Function Remix)          (#None) (7:18)
 ! Vortex (Hobo's Vile Remix)       (#None) (5:49)
[A]pply, More candidates, Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort, plaY, eDit, edit Candidates? 

Hope that helps and thanks again!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.