From 0726123e41b4edc31ab1a71bdeb37d6ebe703972 Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Thu, 27 Jun 2019 22:43:18 -0400 Subject: [PATCH] Move PROBE_FIELD to module scope (#3318) --- beetsplug/absubmit.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/beetsplug/absubmit.py b/beetsplug/absubmit.py index 594d0dc010..baff922e40 100644 --- a/beetsplug/absubmit.py +++ b/beetsplug/absubmit.py @@ -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.""" @@ -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) @@ -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