mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 16:42:42 +01:00
lastimport: Declare play_count type
Now you can get the fanciness of the numeric field without configuring the `types` plugin.
This commit is contained in:
parent
38c31a47c1
commit
665b4ac50a
1 changed files with 4 additions and 0 deletions
|
|
@ -18,6 +18,7 @@ from beets import ui
|
||||||
from beets import dbcore
|
from beets import dbcore
|
||||||
from beets import config
|
from beets import config
|
||||||
from beets import plugins
|
from beets import plugins
|
||||||
|
from beets.dbcore import types
|
||||||
|
|
||||||
log = logging.getLogger('beets')
|
log = logging.getLogger('beets')
|
||||||
API_URL = 'http://ws.audioscrobbler.com/2.0/'
|
API_URL = 'http://ws.audioscrobbler.com/2.0/'
|
||||||
|
|
@ -34,6 +35,9 @@ class LastImportPlugin(plugins.BeetsPlugin):
|
||||||
'per_page': 500,
|
'per_page': 500,
|
||||||
'retry_limit': 3,
|
'retry_limit': 3,
|
||||||
})
|
})
|
||||||
|
self.item_types = {
|
||||||
|
'play_count': types.INTEGER,
|
||||||
|
}
|
||||||
|
|
||||||
def commands(self):
|
def commands(self):
|
||||||
cmd = ui.Subcommand('lastimport', help='import last.fm play-count')
|
cmd = ui.Subcommand('lastimport', help='import last.fm play-count')
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue