mirror of
https://github.com/beetbox/beets.git
synced 2025-12-29 20:12:33 +01:00
Speed up import
This commit is contained in:
parent
4d0d1ebc7a
commit
cdef5fd473
1 changed files with 6 additions and 2 deletions
|
|
@ -210,9 +210,13 @@ class IPFSPlugin(BeetsPlugin):
|
|||
nlib = library.Library(path)
|
||||
for album in nlib.albums():
|
||||
if not self.already_added(album, jlib):
|
||||
new_album = []
|
||||
for item in album.items():
|
||||
jlib.add(item)
|
||||
jlib.add(album)
|
||||
item.id = None
|
||||
new_album.append(item)
|
||||
added_album = jlib.add_album(new_album)
|
||||
added_album.ipfs = album.ipfs
|
||||
added_album.store()
|
||||
|
||||
def already_added(self, check, jlib):
|
||||
for jalbum in jlib.albums():
|
||||
|
|
|
|||
Loading…
Reference in a new issue