Limit matching tracks on import to five
This commit is contained in:
parent
04f1fba581
commit
25add4239d
@ -666,11 +666,15 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
artist = tags['artist']
|
artist = tags['artist']
|
||||||
possible_matches = Tracks.search_titles(session, title)
|
possible_matches = Tracks.search_titles(session, title)
|
||||||
if possible_matches:
|
if possible_matches:
|
||||||
txt += 'Similar to new track '
|
if len(possible_matches) > 5:
|
||||||
txt += f'"{title}" by "{artist} ({fname})":\n\n'
|
txt = "More than five tracks look similar to "
|
||||||
for track in possible_matches:
|
txt += f'"{title}" by "{artist} ({fname})":\n\n'
|
||||||
txt += f' "{track.title}" by {track.artist}'
|
else:
|
||||||
txt += f' ({track.path})\n\n'
|
txt += 'Similar to new track '
|
||||||
|
txt += f'"{title}" by "{artist} ({fname})":\n\n'
|
||||||
|
for track in possible_matches:
|
||||||
|
txt += f' "{track.title}" by {track.artist}'
|
||||||
|
txt += f' ({track.path})\n\n'
|
||||||
txt += "\n"
|
txt += "\n"
|
||||||
# Check whether to proceed if there were potential matches
|
# Check whether to proceed if there were potential matches
|
||||||
txt += "Proceed with import?"
|
txt += "Proceed with import?"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user