mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 08:39:17 +01:00
Move PROBE_FIELD to module scope (#3318)
This commit is contained in:
parent
cca6c49784
commit
0726123e41
1 changed files with 4 additions and 4 deletions
|
|
@ -32,6 +32,9 @@ from beets import plugins
|
|||
from beets import util
|
||||
from beets import ui
|
||||
|
||||
# We use this field to check whether AcousticBrainz info is present.
|
||||
PROBE_FIELD = 'mood_acoustic'
|
||||
|
||||
|
||||
class ABSubmitError(Exception):
|
||||
"""Raised when failing to analyse file with extractor."""
|
||||
|
|
@ -61,9 +64,6 @@ class AcousticBrainzSubmitPlugin(plugins.BeetsPlugin):
|
|||
'pretend': False
|
||||
})
|
||||
|
||||
# Define a field which shows that acousticbrainz info is present
|
||||
self.PROBE_FIELD = 'mood_acoustic'
|
||||
|
||||
self.extractor = self.config['extractor'].as_str()
|
||||
if self.extractor:
|
||||
self.extractor = util.normpath(self.extractor)
|
||||
|
|
@ -135,7 +135,7 @@ only files which would be processed'
|
|||
|
||||
# If file has no mbid skip it.
|
||||
if not self.opts.force_refetch and not self.config['force']:
|
||||
mood_str = item.get(self.PROBE_FIELD, u'')
|
||||
mood_str = item.get(PROBE_FIELD, u'')
|
||||
if mood_str:
|
||||
return None
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue