Compare commits

..

2 Commits

Author SHA1 Message Date
Keith Edmunds
c04114b07a Fix some type hints 2023-01-19 23:32:20 +00:00
Keith Edmunds
92852f7e27 Fix bug moving unplayed tracks
Fixes #162
2023-01-19 23:29:52 +00:00
2 changed files with 3 additions and 3 deletions

View File

@ -486,9 +486,9 @@ class PlaylistRows(Base):
@classmethod
def get_unplayed_rows(cls, session: Session,
playlist_id: int) -> List[int]:
playlist_id: int) -> List["PlaylistRows]:
"""
For passed playlist, return a list of track rows that
For passed playlist, return a list of playlist rows that
have not been played.
"""

View File

@ -932,7 +932,7 @@ class Window(QMainWindow, Ui_MainWindow):
unplayed_plrs = PlaylistRows.get_unplayed_rows(
session, playlist_id)
if helpers.ask_yes_no("Move tracks",
f"Move {len(unplayed_playlist_rows)} tracks:"
f"Move {len(unplayed_plrs)} tracks:"
" Are you sure?"
):
self.move_playlist_rows(session, unplayed_plrs)