fix session selection for atmos + hires tracks

This commit is contained in:
uh wot
2023-11-24 15:33:56 +01:00
parent b6f40c31a3
commit 458edd2582

View File

@@ -471,19 +471,19 @@ class ModuleInterface:
format = 'ac3'
session = {
'flac_hires': SessionType.MOBILE_ATMOS,
'360ra': SessionType.MOBILE_ATMOS,
'flac_hires': SessionType.MOBILE_DEFAULT,
'360ra': SessionType.MOBILE_DEFAULT,
'ac4': SessionType.MOBILE_ATMOS,
'ac3': SessionType.TV,
# MOBILE_DEFAULT is used whenever possible to avoid MPEG-DASH, which slows downloading
None: SessionType.MOBILE_DEFAULT,
# TV is used whenever possible to avoid MPEG-DASH, which slows downloading
None: SessionType.TV,
}[format]
if not format and 'SONY_360RA' in media_tags:
# if 360RA is available, we don't use the mobile session here because that will get 360RA
if not format and 'DOLBY_ATMOS' in media_tags:
# if atmos is available, we don't use the TV session here because that will get atmos everytime
# there are no tracks with both 360RA and atmos afaik,
# so this shouldn't be an issue for now
session = SessionType.TV
session = SessionType.MOBILE_DEFAULT
if session.name in self.available_sessions:
self.session.default = session