mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-05-17 06:09:29 +00:00
fix(title): detect Atmos across all audio tracks for filename template
The {atmos?} placeholder checked only the first MediaInfo audio track, so a mux with a non-Atmos dub listed first dropped the Atmos tag from the filename even when another track carried JOC. Scan all audio tracks instead.
This commit is contained in:
@@ -145,12 +145,16 @@ class Title:
|
|||||||
|
|
||||||
features = primary_audio_track.format_additionalfeatures or ""
|
features = primary_audio_track.format_additionalfeatures or ""
|
||||||
|
|
||||||
|
has_atmos = any(
|
||||||
|
"JOC" in (t.format_additionalfeatures or "") or t.joc for t in media_info.audio_tracks
|
||||||
|
)
|
||||||
|
|
||||||
context.update(
|
context.update(
|
||||||
{
|
{
|
||||||
"audio": AUDIO_CODEC_MAP.get(codec, codec),
|
"audio": AUDIO_CODEC_MAP.get(codec, codec),
|
||||||
"audio_channels": f"{channels:.1f}",
|
"audio_channels": f"{channels:.1f}",
|
||||||
"audio_full": f"{AUDIO_CODEC_MAP.get(codec, codec)}{channels:.1f}",
|
"audio_full": f"{AUDIO_CODEC_MAP.get(codec, codec)}{channels:.1f}",
|
||||||
"atmos": "Atmos" if ("JOC" in features or primary_audio_track.joc) else "",
|
"atmos": "Atmos" if has_atmos else "",
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user