Skip to content

Commit

Permalink
fix search history migration
Browse files Browse the repository at this point in the history
  • Loading branch information
lekma committed Sep 27, 2024
1 parent 37e1151 commit b6cabc7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/invidious/persistence.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@ def __init__(self, *args, **kwargs):
if old:
for k, v in old.items():
for q in v.values():
if ((qsort := q["sort_by"]) == "upload_date"):
qsort = "date"
elif (qsort == "view_count"):
qsort = "views"
self.record(
{
"q": q["query"],
"type": q["type"],
"sort": q["sort_by"],
"sort": qsort,
"page": 1
}
)
Expand Down

0 comments on commit b6cabc7

Please sign in to comment.