[fansly] update format selection (#4401)

https://github.com/mikf/gallery-dl/issues/4401#issuecomment-3383021221

sort by
- width
- HTTP (formats 0,1,2,3,4)
- DASH (format 303)
- HLS  (format 302)
This commit is contained in:
Mike Fährmann
2025-10-08 23:17:16 +02:00
parent c723eefcf5
commit 5545a0e8e6
2 changed files with 37 additions and 1 deletions

View File

@@ -77,7 +77,7 @@ class FanslyExtractor(Extractor):
variants.append(media)
formats = [
(type > 256, variant["width"], type, variant)
(variant["width"], (type-500 if type > 256 else type), variant)
for variant in variants
if variant.get("locations") and
(type := variant["type"]) in self.formats