parent
ecd5c65695
commit
c7253e2211
@ -204,12 +204,14 @@ class ReplaceFilesDialog(QDialog):
|
||||
if candidates_by_title:
|
||||
# Check artist tag
|
||||
for cbt in candidates_by_title:
|
||||
if not os.path.exists(cbt.path):
|
||||
return None
|
||||
try:
|
||||
cbt_artist = get_tags(cbt.path)["artist"]
|
||||
if cbt_artist.lower() == new_path_artist.lower():
|
||||
match_track = cbt
|
||||
break
|
||||
except FileNotFoundError:
|
||||
except KeyError:
|
||||
return None
|
||||
|
||||
return match_track
|
||||
|
||||
@ -1338,10 +1338,14 @@ class Window(QMainWindow, Ui_MainWindow):
|
||||
session.commit()
|
||||
except IntegrityError:
|
||||
# https://jira.mariadb.org/browse/MDEV-29345 workaround
|
||||
log.debug(
|
||||
"Working around https://jira.mariadb.org/browse/MDEV-29345"
|
||||
)
|
||||
session.rollback()
|
||||
track.path = "DUMMY"
|
||||
session.commit()
|
||||
track.path = rf.track_path
|
||||
session.commit()
|
||||
else:
|
||||
session.commit()
|
||||
else:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user