mirror of
https://github.com/beetbox/beets.git
synced 2026-01-30 20:13:37 +01:00
More clean up requests
This commit is contained in:
parent
fd7458edf5
commit
865940746c
2 changed files with 9 additions and 11 deletions
|
|
@ -24,7 +24,7 @@ from collections import defaultdict
|
|||
|
||||
import re
|
||||
|
||||
mb_regex = r"(\d|\w){8}-(\d|\w){4}-(\d|\w){4}-(\d|\w){4}-(\d|\w){12}"
|
||||
MB_REGEX = r"(\d|\w){8}-(\d|\w){4}-(\d|\w){4}-(\d|\w){4}-(\d|\w){12}"
|
||||
|
||||
|
||||
def apply_item_changes(lib, item, move, pretend, write):
|
||||
|
|
@ -86,13 +86,13 @@ class MBSyncPlugin(BeetsPlugin):
|
|||
item_formatted)
|
||||
continue
|
||||
|
||||
valid_trackid = re.match(mb_regex, item.mb_trackid)
|
||||
|
||||
# Do we have a valid MusicBrainz TrackId
|
||||
# Do we have a valid MusicBrainz TrackId?
|
||||
valid_trackid = re.match(MB_REGEX, item.mb_trackid)
|
||||
if not valid_trackid:
|
||||
self._log.info(u'Skipping singleton with invalid mb_trackid:' +
|
||||
' {0}', item_formatted)
|
||||
continue
|
||||
|
||||
# Get the MusicBrainz recording info.
|
||||
track_info = hooks.track_for_mbid(item.mb_trackid)
|
||||
if not track_info:
|
||||
|
|
@ -120,10 +120,8 @@ class MBSyncPlugin(BeetsPlugin):
|
|||
|
||||
items = list(a.items())
|
||||
|
||||
valid_albumid = re.match(mb_regex, a.mb_albumid)
|
||||
|
||||
# Do we have a valid MusicBrainz AlbumId
|
||||
|
||||
# Do we have a valid MusicBrainz AlbumId?
|
||||
valid_albumid = re.match(MB_REGEX, a.mb_albumid)
|
||||
if not valid_albumid:
|
||||
self._log.info(u'Skipping album with invalid mb_albumid: {0}',
|
||||
album_formatted)
|
||||
|
|
|
|||
|
|
@ -45,12 +45,12 @@ New features:
|
|||
|
||||
Changes:
|
||||
|
||||
* :doc:`/plugins/mbsync` no longer queries MusicBrainz when the either the
|
||||
* :doc:`/plugins/mbsync` no longer queries MusicBrainz when either the
|
||||
``mb_albumid`` or ``mb_trackid`` field is invalid
|
||||
Discussion on Google groups here_
|
||||
See also the discussion on Google Groups_
|
||||
Thanks to :user:`arogl`.
|
||||
|
||||
.. _here: https://groups.google.com/forum/#!searchin/beets-users/mbsync|sort:date/beets-users/iwCF6bNdh9A/i1xl4Gx8BQAJ
|
||||
.. _Groups: https://groups.google.com/forum/#!searchin/beets-users/mbsync|sort:date/beets-users/iwCF6bNdh9A/i1xl4Gx8BQAJ
|
||||
|
||||
Fixes:
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue