Add audio track title to stream selection display
Some checks failed
Build JellyCon / build (py2) (push) Has been cancelled
Build JellyCon / build (py3) (push) Has been cancelled
CodeQL Analysis / analyze (python, 3.9) (push) Has been cancelled
Release Drafter / Update release draft (push) Has been cancelled
Test JellyCon / test (3.9) (push) Has been cancelled
Some checks failed
Build JellyCon / build (py2) (push) Has been cancelled
Build JellyCon / build (py3) (push) Has been cancelled
CodeQL Analysis / analyze (python, 3.9) (push) Has been cancelled
Release Drafter / Update release draft (push) Has been cancelled
Test JellyCon / test (3.9) (push) Has been cancelled
Display track title in audio stream selection dialog when available. Format: "index - language - codec layout - title"
This commit is contained in:
@@ -859,6 +859,7 @@ def audio_subs_pref(url, list_item, media_source, item_id, audio_stream_index, s
|
||||
if 'Audio' in stream['Type']:
|
||||
codec = stream.get('Codec', None)
|
||||
channel_layout = stream.get('ChannelLayout', "")
|
||||
title = stream.get('Title', '')
|
||||
|
||||
if not codec:
|
||||
# Probably tvheadend and has no other info
|
||||
@@ -871,6 +872,10 @@ def audio_subs_pref(url, list_item, media_source, item_id, audio_stream_index, s
|
||||
# Track doesn't include language
|
||||
track = "%s - %s %s" % (index, codec, channel_layout)
|
||||
|
||||
# Add title if available
|
||||
if title:
|
||||
track = "%s - %s" % (track, title)
|
||||
|
||||
audio_streams_list[track] = index
|
||||
audio_streams.append(track)
|
||||
audio_streams_data.append(stream)
|
||||
|
||||
Reference in New Issue
Block a user