mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Fixed DB locking
This commit is contained in:
parent
fd9987ec35
commit
99cb8f4c64
@ -388,7 +388,7 @@ def get_track_id(trackdict,create_new=True,update_album=False,dbconn=None):
|
||||
if set(artist_ids) == set(match_artist_ids):
|
||||
#print("ID for",trackdict['title'],"was",row[0])
|
||||
if 'album' in trackdict:
|
||||
add_track_to_album(row.id,get_album_id(trackdict['album']),replace=update_album,dbconn=dbconn)
|
||||
add_track_to_album(row.id,get_album_id(trackdict['album'],dbconn=dbconn),replace=update_album,dbconn=dbconn)
|
||||
return row.id
|
||||
|
||||
if not create_new: return None
|
||||
@ -408,7 +408,7 @@ def get_track_id(trackdict,create_new=True,update_album=False,dbconn=None):
|
||||
#print("Created",trackdict['title'],track_id)
|
||||
|
||||
if 'album' in trackdict:
|
||||
add_track_to_album(track_id,get_album_id(trackdict['album']),dbconn=dbconn)
|
||||
add_track_to_album(track_id,get_album_id(trackdict['album'],dbconn=dbconn),dbconn=dbconn)
|
||||
return track_id
|
||||
|
||||
@cached_wrapper
|
||||
|
Loading…
Reference in New Issue
Block a user