mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-06 19:47:00 +03:00
Fix wrong comparison with votes filtering
This commit is contained in:
@@ -181,7 +181,7 @@ async function filterAndSortBranding(videoID: VideoID, returnUserID: boolean, fe
|
|||||||
UUID: r.UUID,
|
UUID: r.UUID,
|
||||||
userID: returnUserID ? r.userID : undefined
|
userID: returnUserID ? r.userID : undefined
|
||||||
}))
|
}))
|
||||||
.filter((a) => fetchAll || a.votes > 0 || a.locked)
|
.filter((a) => fetchAll || a.votes >= 0 || a.locked)
|
||||||
.sort((a, b) => b.votes - a.votes)
|
.sort((a, b) => b.votes - a.votes)
|
||||||
.sort((a, b) => +b.locked - +a.locked) as TitleResult[];
|
.sort((a, b) => +b.locked - +a.locked) as TitleResult[];
|
||||||
|
|
||||||
@@ -197,7 +197,7 @@ async function filterAndSortBranding(videoID: VideoID, returnUserID: boolean, fe
|
|||||||
UUID: r.UUID,
|
UUID: r.UUID,
|
||||||
userID: returnUserID ? r.userID : undefined
|
userID: returnUserID ? r.userID : undefined
|
||||||
}))
|
}))
|
||||||
.filter((a) => fetchAll || a.votes > 0 || a.locked) as ThumbnailResult[];
|
.filter((a) => fetchAll || a.votes >= 0 || a.locked) as ThumbnailResult[];
|
||||||
|
|
||||||
return {
|
return {
|
||||||
titles,
|
titles,
|
||||||
|
|||||||
Reference in New Issue
Block a user