Compare commits
2 Commits
a0c1dad2f5
...
41379efd1b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
41379efd1b | ||
|
|
6339326947 |
@ -65,6 +65,7 @@ class Config(object):
|
||||
MAIL_SERVER = os.environ.get('MAIL_SERVER') or "woodlands.midnighthax.com"
|
||||
MAIL_USERNAME = os.environ.get('MAIL_USERNAME')
|
||||
MAIL_USE_TLS = os.environ.get('MAIL_USE_TLS') is not None
|
||||
MAX_IMPORT_MATCHES = 5
|
||||
MAX_INFO_TABS = 5
|
||||
MAX_MISSING_FILES_TO_REPORT = 10
|
||||
MILLISECOND_SIGFIGS = 0
|
||||
|
||||
@ -668,17 +668,18 @@ class Window(QMainWindow, Ui_MainWindow):
|
||||
new_tracks.append((fname, tags))
|
||||
title = tags['title']
|
||||
artist = tags['artist']
|
||||
count = 0
|
||||
possible_matches = Tracks.search_titles(session, title)
|
||||
if possible_matches:
|
||||
if len(possible_matches) > 5:
|
||||
txt = "More than five tracks look similar to "
|
||||
txt += f'"{title}" by "{artist} ({fname})":\n\n'
|
||||
else:
|
||||
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 += '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'
|
||||
count += 1
|
||||
if count >= Config.MAX_IMPORT_MATCHES:
|
||||
txt += "\nThere are more similar-looking tracks"
|
||||
break
|
||||
txt += "\n"
|
||||
# Check whether to proceed if there were potential matches
|
||||
txt += "Proceed with import?"
|
||||
|
||||
@ -737,7 +737,7 @@ class PlaylistTab(QTableWidget):
|
||||
next_row = self._find_next_track_row(session, search_from)
|
||||
if next_row:
|
||||
self._set_next(session, next_row)
|
||||
self._scroll_to_top(next_row)
|
||||
self._scroll_to_top(next_row)
|
||||
|
||||
# Update display
|
||||
self.update_display(session)
|
||||
@ -1727,6 +1727,9 @@ class PlaylistTab(QTableWidget):
|
||||
top.
|
||||
"""
|
||||
|
||||
if row is None:
|
||||
return
|
||||
|
||||
padding_required = Config.SCROLL_TOP_MARGIN
|
||||
top_row = row
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user