feat: add private sort criterion

This commit is contained in:
Viren070
2025-11-20 21:24:15 +00:00
parent 32d21193b1
commit f04072b339
2 changed files with 12 additions and 0 deletions
+2
View File
@@ -153,6 +153,8 @@ class StreamSorter {
return multiplier * (stream.size ?? 0);
case 'seeders':
return multiplier * (stream.torrent?.seeders ?? 0);
case 'private':
return multiplier * (stream.torrent?.private ? 1 : 0);
case 'age':
return multiplier * (stream.age ?? 0);
case 'encode': {
+10
View File
@@ -853,6 +853,7 @@ const SORT_CRITERIA = [
'size',
'service',
'seeders',
'private',
'age',
'addon',
'regexPatterns',
@@ -981,6 +982,15 @@ export const SORT_CRITERIA_DETAILS: Record<
ascendingDescription: 'Streams with fewer seeders are preferred',
descendingDescription: 'Streams with more seeders are preferred',
},
private: {
name: 'Private',
description: 'Whether the stream is from a private tracker or not',
defaultDirection: 'desc',
ascendingDescription:
'Streams that are not from private trackers are preferred',
descendingDescription:
'Streams that are from private trackers are preferred',
},
age: {
name: 'Age',
description: 'Sort by the age of the stream',