Postpone file moves until tracks have been loaded

This commit is contained in:
Gabriel Ferreira
2020-06-11 23:39:13 -03:00
parent 0b5c815ad5
commit fac2b37d8c

View File

@@ -361,7 +361,7 @@ class Tagger(QtWidgets.QApplication):
"""Move `file` to recording `recordingid` on album `albumid`.""" """Move `file` to recording `recordingid` on album `albumid`."""
self.window.setUpdatesEnabled(False) self.window.setUpdatesEnabled(False)
album = self.load_album(albumid) album = self.load_album(albumid)
file.move(album.unmatched_files) album.run_when_loaded(partial(file.move, album.unmatched_files))
album.run_when_loaded(partial(album.match_files, [file], album.run_when_loaded(partial(album.match_files, [file],
recordingid=recordingid)) recordingid=recordingid))
self.window.setUpdatesEnabled(True) self.window.setUpdatesEnabled(True)