mirror of
https://github.com/beetbox/beets.git
synced 2025-12-30 12:32:33 +01:00
mpdstats: set types for flexible fields
This commit is contained in:
parent
d4f72f62eb
commit
5dec867ab3
1 changed files with 9 additions and 0 deletions
|
|
@ -25,6 +25,7 @@ from beets import config
|
|||
from beets import plugins
|
||||
from beets import library
|
||||
from beets.util import displayable_path
|
||||
from beets.dbcore import types
|
||||
|
||||
log = logging.getLogger('beets')
|
||||
|
||||
|
|
@ -308,6 +309,14 @@ class MPDStats(object):
|
|||
|
||||
|
||||
class MPDStatsPlugin(plugins.BeetsPlugin):
|
||||
|
||||
item_types = {
|
||||
'play_count': types.INTEGER,
|
||||
'skip_count': types.INTEGER,
|
||||
'last_played': library.Date(),
|
||||
'rating': types.FLOAT,
|
||||
}
|
||||
|
||||
def __init__(self):
|
||||
super(MPDStatsPlugin, self).__init__()
|
||||
self.config.add({
|
||||
|
|
|
|||
Loading…
Reference in a new issue