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