diff --git a/app/ds.py b/app/ds.py index a626c4a..e7a1451 100644 --- a/app/ds.py +++ b/app/ds.py @@ -529,7 +529,7 @@ def _playlists_where( Playlists.id.label("playlist_id"), Playlists.name, Playlists.open, - ).where(query) + ).where(query).order_by(Playlists.tab) results: list[PlaylistDTO] = [] @@ -681,7 +681,7 @@ def playlist_mark_status(playlist_id: int, open: bool) -> None: .values(open=open) ) - session.commit() + session.commit() # @log_call @@ -796,7 +796,7 @@ def playlist_rename(playlist_id: int, new_name: str) -> None: .values(name=new_name) ) - session.commit() + session.commit() def playlist_row_count(playlist_id: int) -> int: diff --git a/app/playlistrow.py b/app/playlistrow.py index 8b24c6f..e0f23dd 100644 --- a/app/playlistrow.py +++ b/app/playlistrow.py @@ -214,8 +214,10 @@ class PlaylistRow: @row_number.setter def row_number(self, value: int) -> None: - # This does not update the database which must take place - # elsewhere + # This does not update the database. The only times the row + # number changes are 1) in ds._playlist_check_playlist and + # ds.playlist_move_rows, and in both those places ds saves + # the change to the database. self.dto.row_number = value def check_for_end_of_track(self) -> None: