Use the parsed formats

This commit is contained in:
tcely 2025-01-27 14:31:16 -05:00 committed by GitHub
parent 8a3a7aa333
commit ec16e4c54d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -142,12 +142,12 @@
<tr title="The available media formats">
<td class="hide-on-small-only">Available formats</td>
<td><span class="hide-on-med-and-up">Available formats<br></span>
{% for format in media.formats %}
{% for format in media.iter_formats %}
<div>
ID: <strong>{{ format.format_id }}</strong>
{% if format.vcodec|lower != 'none' %}, {{ format.format_note }} ({{ format.width }}x{{ format.height }}), fps:{{ format.fps|lower }}, video:{{ format.vcodec }} @{{ format.tbr }}k{% endif %}
ID: <strong>{{ format.id }}</strong>
{% if format.vcodec|lower != 'none' %}, {{ format.format_note }} ({{ format.width }}x{{ format.height }}), fps:{{ format.fps|lower }}, video:{{ format.vcodec }} @{{ format.vbr }}k{% endif %}
{% if format.acodec|lower != 'none' %}, audio:{{ format.acodec }} @{{ format.abr }}k / {{ format.asr }}Hz{% if format.language_code %} [{{ format.language_code }}]{% endif %} {{ format.format_note }}{% endif %}
{% if format.format_id == combined_format or format.format_id == audio_format or format.format_id == video_format %}<strong>(matched)</strong>{% endif %}
{% if format.id == combined_format or format.id == audio_format or format.id == video_format %}<strong>(matched)</strong>{% endif %}
</div>
{% empty %}
Media has no indexed available formats