diff --git a/app/Livewire/DownloadButton.php b/app/Livewire/DownloadButton.php index 95cfbb0..9bd680f 100644 --- a/app/Livewire/DownloadButton.php +++ b/app/Livewire/DownloadButton.php @@ -21,6 +21,15 @@ class DownloadButton extends Component public $background = 'bg-rose-600'; + public $fileExtension = 'HEVC'; + + public function mount() + { + if (str_contains($this->downloadUrl, 'AV1')) { + $this->fileExtension = 'AV1'; + } + } + public function clicked($downloadId) { $download = Downloads::find($downloadId); diff --git a/resources/views/livewire/download-button.blade.php b/resources/views/livewire/download-button.blade.php index ddb725a..08ab8f8 100644 --- a/resources/views/livewire/download-button.blade.php +++ b/resources/views/livewire/download-button.blade.php @@ -12,7 +12,7 @@ @else

Episode {{ $episodeNumber }}

@endif -

HEVC MKV {{ $fileSize ?? '' }}

+

{{ $fileExtension }} MKV {{ $fileSize ?? '' }}

Downloaded {{ $downloadCount }} times

diff --git a/resources/views/livewire/downloads-search.blade.php b/resources/views/livewire/downloads-search.blade.php index bfda33a..929d8b1 100644 --- a/resources/views/livewire/downloads-search.blade.php +++ b/resources/views/livewire/downloads-search.blade.php @@ -235,6 +235,11 @@ '/' . $expire; } + + $fileExtension = "HEVC"; + if (str_contains($download->url, 'AV1')) { + $fileExtension = "AV1"; + } @endphp @@ -249,7 +254,7 @@
-

HEVC MKV

+

{{ $fileExtension }} MKV

diff --git a/resources/views/livewire/partials/download-button.blade.php b/resources/views/livewire/partials/download-button.blade.php index f4b94de..f4f0e8a 100644 --- a/resources/views/livewire/partials/download-button.blade.php +++ b/resources/views/livewire/partials/download-button.blade.php @@ -1,4 +1,10 @@ + @php + $fileExtension = "HEVC"; + if (str_contains($hdl->getDownloadByType('FHD')->url, 'AV1')) { + $fileExtension = "AV1"; + } + @endphp diff --git a/resources/views/modals/partials/download-captcha.blade.php b/resources/views/modals/partials/download-captcha.blade.php index 9a713b6..03196f4 100644 --- a/resources/views/modals/partials/download-captcha.blade.php +++ b/resources/views/modals/partials/download-captcha.blade.php @@ -28,9 +28,15 @@ + @php + $fileExtension = "HEVC"; + if (str_contains($episode->getDownloadByType('FHD')->url, 'AV1')) { + $fileExtension = "AV1"; + } + @endphp

Episode {{ $episode->episode }}

-

HEVC MKV {{ $episode->getDownloadByType('FHD')->getFileSize() ?? '' }}

+

{{ $fileExtension }} MKV {{ $episode->getDownloadByType('FHD')->getFileSize() ?? '' }}

Downloaded {{ $episode->getDownloadByType('FHD')->count }} times