mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-04 05:39:57 -05:00
Creating sort button which allows the user to select a sort order via modal.
This commit is contained in:
parent
3b3cea4d70
commit
bab10a0c96
14 changed files with 531 additions and 263 deletions
|
|
@ -370,6 +370,8 @@ ARCHIVE_ORDERS = {
|
|||
'-date': 'a.archive_datetime DESC NULLS LAST, LOWER(fg.primary_path) DESC',
|
||||
'rank': '2 DESC, a.archive_datetime DESC',
|
||||
'-rank': '2 ASC, a.archive_datetime ASC',
|
||||
'size': 'fg.size ASC, LOWER(fg.primary_path) ASC',
|
||||
'-size': 'fg.size DESC NULLS LAST, LOWER(fg.primary_path) DESC',
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -507,7 +507,7 @@ def test_get_channel_videos_pagination(test_client, test_session, simple_channel
|
|||
]
|
||||
last_ids = []
|
||||
for offset, video_count in tests:
|
||||
_, response = assert_video_search(channel_id=simple_channel.id, order_by='id', offset=offset, limit=20)
|
||||
_, response = assert_video_search(channel_id=simple_channel.id, order_by='upload_date', offset=offset, limit=20)
|
||||
assert len(response.json['file_groups']) == video_count, 'Returned videos does not match'
|
||||
current_ids = [i['id'] for i in response.json['file_groups']]
|
||||
assert current_ids != last_ids, f'IDs are unchanged current_ids={current_ids}'
|
||||
|
|
|
|||
|
|
@ -42,8 +42,6 @@ VIDEO_ORDERS = {
|
|||
'-upload_date': 'v.upload_date DESC NULLS LAST, LOWER(fg.primary_path) ASC',
|
||||
'rank': '2 DESC, LOWER(fg.primary_path) DESC',
|
||||
'-rank': '2 ASC, LOWER(fg.primary_path) ASC',
|
||||
'id': 'fg.id ASC',
|
||||
'-id': 'fg.id DESC',
|
||||
'size': 'fg.size ASC, LOWER(fg.primary_path) ASC',
|
||||
'-size': 'fg.size DESC, LOWER(fg.primary_path) DESC',
|
||||
'duration': 'duration ASC, LOWER(fg.primary_path) ASC',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue