mirror of
https://github.com/beetbox/beets.git
synced 2026-02-13 19:03:37 +01:00
Fixed up config checking to make freedesktop plugin pass flake8.
This commit is contained in:
parent
05ae354ffa
commit
8daeb7d79e
1 changed files with 3 additions and 2 deletions
|
|
@ -3,6 +3,8 @@ from beets.ui import Subcommand
|
|||
|
||||
from beets.ui import decargs
|
||||
|
||||
from beets import config
|
||||
|
||||
import os.path
|
||||
import logging
|
||||
|
||||
|
|
@ -48,8 +50,6 @@ class FreedesktopPlugin(BeetsPlugin):
|
|||
self.config.add({
|
||||
'auto': False
|
||||
})
|
||||
global automatic
|
||||
automatic = self.config['auto'].get(bool)
|
||||
|
||||
def commands(self):
|
||||
return [freedesktop_command]
|
||||
|
|
@ -57,6 +57,7 @@ class FreedesktopPlugin(BeetsPlugin):
|
|||
|
||||
@FreedesktopPlugin.listen('album_imported')
|
||||
def imported(lib, album):
|
||||
automatic = config['auto'].get(bool)
|
||||
if not automatic:
|
||||
return
|
||||
process_album(album)
|
||||
|
|
|
|||
Loading…
Reference in a new issue