Display the correct file extension on download button

This commit is contained in:
2026-03-06 22:06:20 +01:00
parent 564f816fb9
commit 5b4d3d435e
5 changed files with 30 additions and 4 deletions

View File

@@ -1,4 +1,10 @@
<a href="{{ $dldomains[array_rand($dldomains)] }}/{{ $hdl->getDownloadByType('FHD')->url }}">
@php
$fileExtension = "HEVC";
if (str_contains($hdl->getDownloadByType('FHD')->url, 'AV1')) {
$fileExtension = "AV1";
}
@endphp
<button class="group rounded-md shadow bg-rose-600 text-white cursor-pointer flex justify-between items-center overflow-hidden transition-all hover:glow m-1 w-[150px]">
<div class="relative w-12 h-12 bg-white bg-opacity-20 text-white flex justify-center items-center transition-all"><svg id="arrow" class="w-4 h-4 transition-all group-hover:-translate-y-1" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 14l-7 7m0 0l-7-7m7 7V3"></path>
@@ -7,7 +13,7 @@
</div>
<div class="w-32 text-center">
<p class="px-5 text-sm row-span-2">Episode {{ $hdl->episode }}</p>
<p class="px-5 text-xs">HEVC MKV</p>
<p class="px-5 text-xs">{{ $fileExtension }} MKV</p>
</div>
</button>
</a>