24 lines
1.1 KiB
PHP
24 lines
1.1 KiB
PHP
@if(is_null($hdl->getDownloadByType('UHDi')))
|
|
<a class="inline-flex items-center ml-4 px-4 p-4 mt-4 cursor-not-allowed bg-gray-600 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest hover:bg-gray-700 active:bg-gray-900 focus:outline-none focus:ring-2 focus:ring-rose-500 focus:ring-offset-2 dark:focus:ring-offset-gray-800 transition ease-in-out duration-150" id="downloadEpisode" alt="Kekw">
|
|
<i class="fa-solid fa-download mr-2"></i> Episode {{ $hdl->episode }} (Unavailable)
|
|
</a>
|
|
@else
|
|
|
|
@php
|
|
$download = $hdl->getDownloadByType('UHDi');
|
|
|
|
$now = \Illuminate\Support\Carbon::now();
|
|
$expire = \Illuminate\Support\Facades\Crypt::encryptString($now->addHours(6));
|
|
$file = \Illuminate\Support\Facades\Crypt::encryptString('hentai/'.$download->url);
|
|
|
|
$downloadURL = $dlpdomains[array_rand($dlpdomains)].'/download/'.$file.'/'.$expire;
|
|
@endphp
|
|
|
|
<livewire:download-button
|
|
:download-url="$downloadURL"
|
|
:download-id="$download->id"
|
|
:download-count="$download->count"
|
|
:episode-number="$hdl->episode"
|
|
:fill-numbers="$fillNumbers"
|
|
:file-size="$download->getFileSize()">
|
|
@endif |