fix(tracks): rank video picks by quality across regional tags and in hybrid

One video language request that matches several regional tags now gives one video, the best of them; hybrid bases and the DV source use the same pick, and hybrid --worst no longer needs -q. Thanks to reel.deal for the report and the first patch.
This commit is contained in:
imSp4rky
2026-11-15 15:54:21 -07:00
parent 511db0c768
commit 270662e9b2
11 changed files with 363 additions and 143 deletions
+2 -1
View File
@@ -11,7 +11,7 @@ from typing import Any
import pytest
from langcodes import Language
from unshackle.commands.dl import dl, hybrid_plan, pick_video
from unshackle.commands.dl import dl, hybrid_plan
from unshackle.core import binaries
from unshackle.core.config import config
from unshackle.core.drm.verify import decrypter_for
@@ -19,6 +19,7 @@ from unshackle.core.manifests import DASH, HLS
from unshackle.core.titles.movie import Movie
from unshackle.core.tracks import Audio, Chapter, Chapters, Track, Tracks, Video
from unshackle.core.tracks import tracks as tracks_module
from unshackle.core.tracks.tracks import pick_video
VIDEO_IDS = itertools.count()