Skip to content

Commit

Permalink
Move PROBE_FIELD to module scope (#3318)
Browse files Browse the repository at this point in the history
  • Loading branch information
sampsyo committed Jun 28, 2019
1 parent cca6c49 commit 0726123
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions beetsplug/absubmit.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
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."""
Expand Down Expand Up @@ -61,9 +64,6 @@ def __init__(self):
'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)
Expand Down Expand Up @@ -135,7 +135,7 @@ def _get_analysis(self, item):

# 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

Expand Down

0 comments on commit 0726123

Please sign in to comment.