mirror of
https://github.com/beetbox/beets.git
synced 2026-02-01 04:55:38 +01:00
lastgenre new defaults, remove config sanity check
This commit is contained in:
parent
4e8948d7ca
commit
bb3f9c53c2
1 changed files with 2 additions and 14 deletions
|
|
@ -98,28 +98,16 @@ class LastGenrePlugin(plugins.BeetsPlugin):
|
|||
"fallback": None,
|
||||
"canonical": False,
|
||||
"source": "album",
|
||||
"force": True,
|
||||
"keep_existing": True,
|
||||
"force": False,
|
||||
"keep_existing": False,
|
||||
"auto": True,
|
||||
"separator": ", ",
|
||||
"prefer_specific": False,
|
||||
"title_case": True,
|
||||
}
|
||||
)
|
||||
self.config_validation()
|
||||
self.setup()
|
||||
|
||||
def config_validation(self) -> None:
|
||||
"""Quits plugin when invalid configurations are detected."""
|
||||
keep_existing = self.config["keep_existing"].get()
|
||||
force = self.config["force"].get()
|
||||
|
||||
if keep_existing and not force:
|
||||
raise ui.UserError(
|
||||
"Invalid lastgenre plugin configuration (enable force with "
|
||||
"keep_existing!)"
|
||||
)
|
||||
|
||||
def setup(self):
|
||||
"""Setup plugin from config options"""
|
||||
if self.config["auto"]:
|
||||
|
|
|
|||
Loading…
Reference in a new issue