feat(playlist): enhance display and action buttons for entries

Added internationalization tags around 'Playlist' and 'Video' labels to ensure consistent localization. Introduced a conditional check for playlist entries to display a 'View playlist' button instead of the 'Download' and 'More options' buttons, which now only appear for non-playlist entries. This enhances user navigation and better differentiates between playlists and individual videos.
This commit is contained in:
Kumi 2024-09-20 14:16:23 +02:00
parent 2b40b1b786
commit 2328f25a20
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -23,18 +23,25 @@
{/strip}">
{if !isset($entry->title)}
{if $entry->ie_key == YoutubePlaylist}
Playlist
{t}Playlist{/t}
{else}
Video
{t}Video{/t}
{/if}
{else}
{$entry->title}
{/if}
</a>
</h3>
<a target="_blank" class="downloadBtn"
href="{path_for name="download"}?url={$entry->url}">{t}Download{/t}</a>
<a target="_blank" href="{path_for name="info"}?url={$entry->url}">{t}More options{/t}</a>
{if $entry->_type == 'playlist'}
<p class="playlist-entry-description">
<a target="_blank" class="downloadBtn"
href="{path_for name="info"}?url={$entry->webpage_url}">{t}View playlist{/t}</a>
</p>
{else}
<a target="_blank" class="downloadBtn"
href="{path_for name="download"}?url={$entry->url}">{t}Download{/t}</a>
<a target="_blank" href="{path_for name="info"}?url={$entry->url}">{t}More options{/t}</a>
{/if}
</div>
{/foreach}
{/block}