1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 10:49:28 +02:00

Use "match" sort when searching videos

This commit is contained in:
Chocobozzz 2025-04-10 10:10:41 +02:00
parent 7d99a6b857
commit 7cec8fd98c
No known key found for this signature in database
GPG key ID: 583A612D890159BE
2 changed files with 6 additions and 1 deletions

View file

@ -309,6 +309,10 @@ export class MyVideosComponent extends RestTable<Video> implements OnInit, OnDes
// Override REST table method // Override REST table method
onSearch (search: string) { onSearch (search: string) {
this.search = search this.search = search
this.sort = {
field: 'match',
order: -1
}
this.onFilter() this.onFilter()
} }

View file

@ -123,7 +123,8 @@ export const SORTABLE_COLUMNS = {
'trending', 'trending',
'hot', 'hot',
'best', 'best',
'localVideoFilesSize' 'localVideoFilesSize',
'match'
], ],
// Don't forget to update peertube-search-index with the same values // Don't forget to update peertube-search-index with the same values