mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-02 09:49:36 +01:00
update Beets
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user