update Beets

This commit is contained in:
AdeHub
2024-08-24 16:44:41 +12:00
parent a63098a919
commit 046d4d82b4
116 changed files with 17353 additions and 9964 deletions

View File

@@ -13,14 +13,14 @@
# included in all copies or substantial portions of the Software.
from beets.plugins import BeetsPlugin
from beets.dbcore import types
from confuse import ConfigValueError
from beets import library
from beets.dbcore import types
from beets.plugins import BeetsPlugin
class TypesPlugin(BeetsPlugin):
@property
def item_types(self):
return self._types()
@@ -35,16 +35,16 @@ class TypesPlugin(BeetsPlugin):
mytypes = {}
for key, value in self.config.items():
if value.get() == 'int':
if value.get() == "int":
mytypes[key] = types.INTEGER
elif value.get() == 'float':
elif value.get() == "float":
mytypes[key] = types.FLOAT
elif value.get() == 'bool':
elif value.get() == "bool":
mytypes[key] = types.BOOLEAN
elif value.get() == 'date':
elif value.get() == "date":
mytypes[key] = library.DateType()
else:
raise ConfigValueError(
"unknown type '{}' for the '{}' field"
.format(value, key))
"unknown type '{}' for the '{}' field".format(value, key)
)
return mytypes