mirror of
https://github.com/beetbox/beets.git
synced 2025-12-25 18:13:17 +01:00
parent
de213c2b96
commit
e916609eee
2 changed files with 10 additions and 1 deletions
|
|
@ -454,7 +454,7 @@ class ImportTask(object):
|
|||
def save_history(self):
|
||||
"""Save the directory in the history for incremental imports.
|
||||
"""
|
||||
if self.is_album and not self.sentinel:
|
||||
if self.is_album and self.paths and not self.sentinel:
|
||||
history_add(self.paths)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -729,6 +729,15 @@ class GroupAlbumsImportTest(_common.TestCase, ImportHelper):
|
|||
artists = set([album.albumartist for album in self.lib.albums()])
|
||||
self.assertEqual(artists, set(['Artist B', 'Tag Artist']))
|
||||
|
||||
def test_incremental(self):
|
||||
config['import']['incremental'] = True
|
||||
self.import_media[0].album = "Album B"
|
||||
self.import_media[0].save()
|
||||
|
||||
self.importer.run()
|
||||
albums = set([album.album for album in self.lib.albums()])
|
||||
self.assertEqual(albums, set(['Album B', 'Tag Album']))
|
||||
|
||||
class GlobalGroupAlbumsImportTest(GroupAlbumsImportTest):
|
||||
|
||||
def setUp(self):
|
||||
|
|
|
|||
Loading…
Reference in a new issue