From 665b4ac50a13f056a7309d75b9e82b56d618e19a Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Sun, 26 Oct 2014 15:06:48 -0700 Subject: [PATCH] lastimport: Declare play_count type Now you can get the fanciness of the numeric field without configuring the `types` plugin. --- beetsplug/lastimport.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/beetsplug/lastimport.py b/beetsplug/lastimport.py index 9a493c49b..240aa90ca 100644 --- a/beetsplug/lastimport.py +++ b/beetsplug/lastimport.py @@ -18,6 +18,7 @@ from beets import ui from beets import dbcore from beets import config from beets import plugins +from beets.dbcore import types log = logging.getLogger('beets') API_URL = 'http://ws.audioscrobbler.com/2.0/' @@ -34,6 +35,9 @@ class LastImportPlugin(plugins.BeetsPlugin): 'per_page': 500, 'retry_limit': 3, }) + self.item_types = { + 'play_count': types.INTEGER, + } def commands(self): cmd = ui.Subcommand('lastimport', help='import last.fm play-count')