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

@@ -28,9 +28,15 @@
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 14l-7 7m0 0l-7-7m7 7V3"></path>
</svg>
</div>
@php
$fileExtension = "HEVC";
if (str_contains($episode->getDownloadByType('FHD')->url, 'AV1')) {
$fileExtension = "AV1";
}
@endphp
<div class="flex flex-col text-center w-full">
<p class="text-xl">Episode {{ $episode->episode }}</p>
<p class="text-xs">HEVC MKV {{ $episode->getDownloadByType('FHD')->getFileSize() ?? '' }}</p>
<p class="text-xs">{{ $fileExtension }} MKV {{ $episode->getDownloadByType('FHD')->getFileSize() ?? '' }}</p>
<p class="text-xs" id="downloadCount">Downloaded {{ $episode->getDownloadByType('FHD')->count }} times</p>
</div>
</button>