Restore last open playlists in correct order
This commit is contained in:
parent
d6bb3d04d8
commit
e7af25ad6e
@ -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:
|
||||
|
||||
@ -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:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user