the: log a debug only when text is changed

Previously the `the` plugin would log a debug message when the text _didn't_ get changed by the plugin, whereas I think what was intended was the opposite. With this change the logged messages show the actual transformations made by the plugin.
This commit is contained in:
Carl Suster 2019-03-31 18:19:09 +11:00 committed by GitHub
parent 728267d06c
commit 0b4293de6e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -93,8 +93,8 @@ class ThePlugin(BeetsPlugin):
for p in self.patterns:
r = self.unthe(text, p)
if r != text:
self._log.debug(u'\"{0}\" -> \"{1}\"', text, r)
break
self._log.debug(u'\"{0}\" -> \"{1}\"', text, r)
return r
else:
return u''