Compare commits
No commits in common. "25add4239d19315b00d89091c558edc3706339a1" and "2f13099bda51bc5295000ab8db1ebd8c179a9dc6" have entirely different histories.
25add4239d
...
2f13099bda
@ -195,9 +195,9 @@ class Window(QMainWindow, Ui_MainWindow):
|
||||
btn.player.play()
|
||||
btn.is_playing = True
|
||||
colour = Config.COLOUR_CART_PLAYING
|
||||
# thread = threading.Thread(target=self.cart_progressbar,
|
||||
# args=(btn,))
|
||||
# thread.start()
|
||||
thread = threading.Thread(target=self.cart_progressbar,
|
||||
args=(btn,))
|
||||
thread.start()
|
||||
else:
|
||||
colour = Config.COLOUR_CART_ERROR
|
||||
btn.setStyleSheet("background-color: " + colour + ";\n")
|
||||
@ -666,10 +666,6 @@ class Window(QMainWindow, Ui_MainWindow):
|
||||
artist = tags['artist']
|
||||
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:
|
||||
@ -1031,7 +1027,7 @@ class Window(QMainWindow, Ui_MainWindow):
|
||||
"""Scroll to show current track"""
|
||||
|
||||
log.debug(f"KAE: musicmuster.show_current()")
|
||||
if self.current_track_playlist_tab != self.visible_playlist_tab():
|
||||
if self.current_track_playlist_tab != self.visible_playlist_tab:
|
||||
self.tabPlaylist.setCurrentWidget(self.current_track_playlist_tab)
|
||||
self.tabPlaylist.currentWidget().scroll_current_to_top()
|
||||
|
||||
@ -1039,7 +1035,7 @@ class Window(QMainWindow, Ui_MainWindow):
|
||||
"""Scroll to show next track"""
|
||||
|
||||
log.debug(f"KAE: musicmuster.show_next()")
|
||||
if self.next_track_playlist_tab != self.visible_playlist_tab():
|
||||
if self.next_track_playlist_tab != self.visible_playlist_tab:
|
||||
self.tabPlaylist.setCurrentWidget(self.next_track_playlist_tab)
|
||||
self.tabPlaylist.currentWidget().scroll_next_to_top()
|
||||
|
||||
@ -1151,12 +1147,8 @@ class Window(QMainWindow, Ui_MainWindow):
|
||||
# Update headers
|
||||
self.update_headers()
|
||||
|
||||
# Populate 'info' tabs with Wikipedia info, but queue it because
|
||||
# it isn't quick
|
||||
track_title = track.title
|
||||
QTimer.singleShot(
|
||||
1, lambda: self.tabInfolist.open_in_wikipedia(track_title)
|
||||
)
|
||||
# Populate 'info' tabs with Wikipedia info
|
||||
self.tabInfolist.open_in_wikipedia(track.title)
|
||||
|
||||
def tick(self) -> None:
|
||||
"""
|
||||
|
||||
@ -1727,23 +1727,8 @@ class PlaylistTab(QTableWidget):
|
||||
top.
|
||||
"""
|
||||
|
||||
padding_required = Config.SCROLL_TOP_MARGIN
|
||||
top_row = row
|
||||
|
||||
if row > Config.SCROLL_TOP_MARGIN:
|
||||
# We can't scroll to a hidden row. Calculate target_row as the
|
||||
# one that is ideal to be at the top. Then count upwards from
|
||||
# passed row until we either reach the target, pass it or reach
|
||||
# row 0.
|
||||
# target_row = max(0, row - Config.SCROLL_TOP_MARGIN + 1)
|
||||
for i in range(row - 1, -1, -1):
|
||||
if padding_required == 0:
|
||||
break
|
||||
if self.isRowHidden(i):
|
||||
continue
|
||||
top_row = i
|
||||
padding_required -= 1
|
||||
|
||||
if row is not None:
|
||||
top_row = max(0, row - Config.SCROLL_TOP_MARGIN + 1)
|
||||
scroll_item = self.item(top_row, 0)
|
||||
self.scrollToItem(scroll_item, QAbstractItemView.PositionAtTop)
|
||||
|
||||
|
||||
@ -87,8 +87,6 @@ def main():
|
||||
|
||||
for new_fname in os.listdir(source_dir):
|
||||
new_path = os.path.join(source_dir, new_fname)
|
||||
if not os.path.isfile(new_path):
|
||||
continue
|
||||
new_tags = get_tags(new_path)
|
||||
new_title = new_tags['title']
|
||||
new_artist = new_tags['artist']
|
||||
|
||||
Loading…
Reference in New Issue
Block a user