Skip to content

Commit

Permalink
TTK-27401: Only show dynamic track if it exists (#688)
Browse files Browse the repository at this point in the history
* TTK-27401: Only show dynamic track if it exists

* TTK-27401: Add dynamic tag to show tracks
  • Loading branch information
albacodina authored Dec 11, 2024
1 parent 55a857f commit 5a45cad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/packages/encoder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ pumukit_encoder:
wizard: true
master: false
nocheckduration: false
tags: html5 podcast
tags: html5 podcast dynamic
target: PUCHPODCAST
format: m3u8
codec: h264
Expand Down
8 changes: 6 additions & 2 deletions src/Pumukit/WebTVBundle/Resources/views/Misc/tracks.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
</li>
{% else %}
{% set tracks = object.getFilteredTracksWithTags(['display'], [], [], []) %}
{% for track in tracks | filter(track => not track.isHide()) %}
{% set dynamic_quality_tracks = tracks | filter(track => track.tags().containsTag('dynamic')) %}
{% set filtered_tracks = (dynamic_quality_tracks | length > 0) ? dynamic_quality_tracks : tracks %}

{% for track in filtered_tracks | filter(track => not track.isHide()) %}
{% if magic_url is defined %}
{% set url_track = url('pumukit_webtv_multimediaobject_magicindex', {secret: object.secret, 'track_id': track.id}) %}
{% else %}
Expand All @@ -39,7 +42,8 @@
{% endif %}
{% endapply %}

<span class="language"> ({{ track.language()|language_name|capitalize }})</span> </a>
<span class="language"> ({{ track.language()|language_name|capitalize }})</span>
</a>
</li>
{% endfor %}
{% endif %}

0 comments on commit 5a45cad

Please sign in to comment.