Mirrors sort #4046 (#4050)

* Mirrors sort #4046

* Change logic to be just sorted on bitrate
This commit is contained in:
HADEON 2025-12-30 15:20:45 +01:00 committed by GitHub
parent 9f4f29bd29
commit eb5e88f317
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -450,8 +450,8 @@ class MirrorListHandler:
# Local mirrors lack this data and can be modified manually before-hand
# Or reflector potentially ran already
if self._fetched_remote and speed_sort:
# original return
return sorted(region_list, key=lambda mirror: (mirror.score, mirror.speed))
# Sort by speed descending (higher is better in bitrate form core.db download)
return sorted(region_list, key=lambda mirror: -mirror.speed)
# just return as-is without sorting?
return region_list