update all songs in one transaction
@@ -51,6 +51,7 @@ class SubsonicPlaylistPlugin(BeetsPlugin):
self.config['password'].redact = True
def update_tags(self, playlist_dict, lib):
+ with lib.transaction():
for query, playlist_tag in playlist_dict.items():
query = AndQuery([SubstringQuery("artist", query[0]),
SubstringQuery("album", query[1]),
@@ -62,7 +63,6 @@ class SubsonicPlaylistPlugin(BeetsPlugin):
continue
for item in items:
item.subsonic_playlist = playlist_tag
- with lib.transaction():
item.try_sync(write=True, move=False)
def get_playlist(self, playlist_id):
