From 1e207395b34f5833492765b642938438f8e9c3c2 Mon Sep 17 00:00:00 2001 From: Thomas Scholtes Date: Mon, 25 Aug 2014 18:53:05 +0200 Subject: [PATCH 1/2] Formatted mapping uses field type to determine default --- beets/dbcore/db.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/beets/dbcore/db.py b/beets/dbcore/db.py index 756448720..050ddbd81 100644 --- a/beets/dbcore/db.py +++ b/beets/dbcore/db.py @@ -55,7 +55,9 @@ class FormattedMapping(collections.Mapping): def __len__(self): return len(self.model_keys) - def get(self, key, default=u''): + def get(self, key, default=None): + if default is None: + default = self.model._type(key).format(None) return super(FormattedMapping, self).get(key, default) def _get_formatted(self, model, key): From 71645ea7cda9911dbda1b87e8dc925cd0adc482c Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Mon, 25 Aug 2014 09:55:37 -0700 Subject: [PATCH 2/2] Changelog for #158 --- docs/changelog.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index 8fbb5e46d..9805db98c 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -26,6 +26,8 @@ Fixes: converted files. * Formatting templates with item data no longer confusingly shows album-level data when the two are inconsistent. +* Resuming imports and beginning incremental imports should now be much faster + when there is a lot of previously-imported music to skip. .. _discogs_client: https://github.com/discogs/discogs_client