badfiles: If not configured, use default checkers

This commit is contained in:
François-Xavier Thomas 2015-08-15 14:38:38 +02:00
parent 27075ea037
commit e8cb1241f5

View file

@ -20,7 +20,7 @@ from __future__ import (division, absolute_import, print_function,
from beets.plugins import BeetsPlugin
from beets.ui import Subcommand
from beets.util import displayable_path
from beets.util import displayable_path, confit
from beets import ui
from subprocess import check_output, CalledProcessError, list2cmdline, STDOUT
import shlex
@ -64,7 +64,10 @@ class BadFiles(BeetsPlugin):
def get_checker(self, ext):
ext = ext.lower()
command = self.config['commands'].get().get(ext)
try:
command = self.config['commands'].get(dict).get(ext)
except confit.NotFoundError:
command = None
if command:
return self.check_custom(command)
elif ext == "mp3":