Init
This commit is contained in:
@@ -0,0 +1,98 @@
|
||||
@auth
|
||||
<p class="font-bold text-gray-800 dark:text-gray-200">
|
||||
<i class="fa-solid fa-lock-open pr-[4px] text-green-400"></i> 1080p
|
||||
</p>
|
||||
<div class="flex flex-wrap justify-around">
|
||||
@php
|
||||
$dlList = App\Models\Episode::where('hentai_id', $episode->hentai_id)
|
||||
->orderBy('episode', 'asc')
|
||||
->get();
|
||||
$fillNumbers = $dlList->count() >= 10;
|
||||
@endphp
|
||||
|
||||
@foreach ($dlList as $hdl)
|
||||
@include('modals.partials.download-button')
|
||||
@endforeach
|
||||
|
||||
@include('livewire.partials.torrent-button', ['hentai' => $episode->hentai])
|
||||
</div>
|
||||
|
||||
@include('modals.partials.download-backup')
|
||||
|
||||
@if ($episode->interpolated)
|
||||
<p class="font-bold text-gray-800 dark:text-gray-200">
|
||||
<i class="fa-solid fa-lock-open pr-[4px] text-green-400"></i> 1080p 48fps
|
||||
</p>
|
||||
|
||||
<div class="flex flex-wrap justify-around">
|
||||
@foreach ($dlList as $hdl)
|
||||
@include('modals.partials.download-button-interpolated')
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
<br>
|
||||
@if (!Auth::user()->is_patreon)
|
||||
@if (config('hstream.free_downloads'))
|
||||
<p class="font-bold text-gray-800 dark:text-gray-200">
|
||||
<i class="fa-solid fa-lock-open pr-[4px] text-yellow-600"></i> 4k
|
||||
</p>
|
||||
@livewire('downloads-free', ['episode' => $episode])
|
||||
@else
|
||||
<p class="font-bold text-gray-800 dark:text-gray-200">
|
||||
<i class="fa-solid fa-lock pr-[4px] text-red-600"></i> 4k
|
||||
</p>
|
||||
<p class="text-gray-800 dark:text-gray-200">
|
||||
4k Downloads are restricted to patreon subscribers. If you are subscribed to patreon and you have a patreon role
|
||||
on our Discord server, you have to logout and login again.
|
||||
</p>
|
||||
@endif
|
||||
@else
|
||||
<p class="font-bold text-gray-800 dark:text-gray-200">
|
||||
<i class="fa-solid fa-lock-open pr-[4px] text-green-400"></i> 4k
|
||||
</p>
|
||||
|
||||
@php $dlpdomains = config('hstream.download_domain_4k'); @endphp
|
||||
|
||||
<div class="flex flex-wrap justify-around">
|
||||
@foreach ($dlList as $hdl)
|
||||
@include('modals.partials.download-button-patreon')
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<br>
|
||||
@if ($episode->interpolated_uhd)
|
||||
@if (!Auth::user()->is_patreon)
|
||||
@if (config('hstream.free_downloads'))
|
||||
<p class="font-bold text-gray-800 dark:text-gray-200">
|
||||
<i class="fa-solid fa-lock-open pr-[4px] text-yellow-600"></i> 4k 48fps
|
||||
</p>
|
||||
@livewire('downloads-free', ['episode' => $episode, 'interpolated' => true])
|
||||
@else
|
||||
<p class="font-bold text-gray-800 dark:text-gray-200">
|
||||
<i class="fa-solid fa-lock pr-[4px] text-red-600"></i> 4k 48fps
|
||||
</p>
|
||||
<p class="text-gray-800 dark:text-gray-200">
|
||||
4k 48fps Downloads are restricted to patreon subscribers. If you are subscribed to patreon and you have a patreon role
|
||||
on our Discord server, you have to logout and login again.
|
||||
</p>
|
||||
@endif
|
||||
@else
|
||||
<p class="font-bold text-gray-800 dark:text-gray-200">
|
||||
<i class="fa-solid fa-lock-open pr-[4px] text-green-400"></i> 4k 48fps
|
||||
</p>
|
||||
|
||||
@php $dlpdomains = config('hstream.download_domain_4k'); @endphp
|
||||
|
||||
<div class="flex flex-wrap justify-around">
|
||||
@foreach ($dlList as $hdl)
|
||||
@include('modals.partials.download-button-patreon-interpolated')
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@include('modals.partials.download-subtitles')
|
||||
@endauth
|
28
resources/views/modals/partials/download-backup.blade.php
Normal file
28
resources/views/modals/partials/download-backup.blade.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<div class="flex flex-col">
|
||||
<a data-te-collapse-init data-te-ripple-init data-te-ripple-color="light" href="#collapseBackupDownloads" role="button" aria-expanded="false" aria-controls="collapseBackupDownloads" class="text-sm text-center cursor-pointer pt-2 text-rose-600">Backup server</a>
|
||||
<div class="!visible hidden" id="collapseBackupDownloads" data-te-collapse-item>
|
||||
<div class="block rounded-lg bg-neutral-200 p-6 dark:bg-neutral-900 dark:text-neutral-50">
|
||||
<p class="text-sm text-red-600">Only use these if you live in Asia (e.g. Singapore/Philippines/...) and experience slow downloads (~10-100kbps) with the normal download links!</p>
|
||||
|
||||
<div class="flex flex-wrap justify-around">
|
||||
@foreach ($dlList as $hdl)
|
||||
@php
|
||||
$download = $hdl->getDownloadByType('FHD');
|
||||
$downloadURL = $dlDomainsBackup[array_rand($dlDomainsBackup)].'/'.$download->url;
|
||||
$background = 'bg-green-600';
|
||||
@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()"
|
||||
:background="$background">
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -0,0 +1,18 @@
|
||||
@if(is_null($hdl->getDownloadByType('FHDi')))
|
||||
<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('FHDi');
|
||||
$downloadURL = $dldomains[array_rand($dldomains)].'/'.$download->url;
|
||||
@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
|
@@ -0,0 +1,24 @@
|
||||
@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
|
@@ -0,0 +1,24 @@
|
||||
@if(is_null($hdl->getDownloadByType('UHD')))
|
||||
<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('UHD');
|
||||
|
||||
$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
|
12
resources/views/modals/partials/download-button.blade.php
Normal file
12
resources/views/modals/partials/download-button.blade.php
Normal file
@@ -0,0 +1,12 @@
|
||||
@php
|
||||
$download = $hdl->getDownloadByType('FHD');
|
||||
$downloadURL = $dldomains[array_rand($dldomains)].'/'.$download->url;
|
||||
@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()">
|
94
resources/views/modals/partials/download-captcha.blade.php
Normal file
94
resources/views/modals/partials/download-captcha.blade.php
Normal file
@@ -0,0 +1,94 @@
|
||||
<div id="captcharequired">
|
||||
<p class="text-gray-800 dark:text-gray-200 font-bold">
|
||||
<i class="fa-solid fa-lock-open pr-[4px] text-yellow-400"></i> 1080p
|
||||
</p>
|
||||
<p class="text-gray-800 dark:text-gray-200">
|
||||
Please solve the following captcha:
|
||||
</p>
|
||||
<p id="message" class="text-red-600">
|
||||
</p>
|
||||
<div class="flex pt-2">
|
||||
<div id="captchaImg">
|
||||
{!! captcha_img() !!}
|
||||
</div>
|
||||
<button type="button" class="inline-flex items-center ml-2 px-2 py-2 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-500 rounded-md font-semibold text-xs text-gray-700 dark:text-gray-300 uppercase tracking-widest shadow-sm hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 dark:focus:ring-offset-gray-800 disabled:opacity-25 transition ease-in-out duration-150" id="reloadcaptcha" >
|
||||
<i class="fa-solid fa-rotate-right"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div class="flex pt-2 mt-1">
|
||||
<x-text-input id="captcha_text" class="block " type="text" name="captcha_text"/>
|
||||
<button type="button" class="inline-flex items-center ml-2 px-2 -pt-1 bg-rose-600 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest hover:bg-rose-700 active:bg-rose-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="submitcaptcha" >
|
||||
Submit
|
||||
</button>
|
||||
</div>
|
||||
<br>
|
||||
<p class="text-gray-800 dark:text-gray-200 text-sm">
|
||||
You can log in with Discord to avoid the captcha.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="captchsolved" style="display: none;">
|
||||
<p class="text-gray-800 dark:text-gray-200 font-bold">
|
||||
<i class="fa-solid fa-lock-open pr-[4px] text-green-400"></i> 1080p
|
||||
</p>
|
||||
<div id="dlbutton">
|
||||
<a href="" id="downloadEpisode">
|
||||
<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-[190px] h-[65px]">
|
||||
<div class="relative w-12 h-[65px] bg-white bg-opacity-20 text-white flex justify-center items-center transition-all">
|
||||
<svg 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>
|
||||
</svg>
|
||||
</div>
|
||||
<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" id="downloadCount">Downloaded {{ $episode->getDownloadByType('FHD')->count }} times</p>
|
||||
</div>
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var downloadCounter = 0;
|
||||
function reloadCaptcha() {
|
||||
window.axios.get('/reload-captcha').then(function (response) {
|
||||
if (response.status == 200) {
|
||||
document.querySelector("#captchaImg").innerHTML = response.data.captcha;
|
||||
}
|
||||
}).catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
function submitCaptcha() {
|
||||
document.querySelector("#message").innerHTML = '';
|
||||
window.axios.post('/get-download', {
|
||||
captcha: document.getElementById('captcha_text').value,
|
||||
episode_id: document.getElementById('e_id').value
|
||||
}).then(function (response) {
|
||||
document.querySelector("#captcharequired").style.display = "none";
|
||||
document.querySelector("#captchsolved").style.display = "block";
|
||||
document.querySelector("#downloadEpisode").href = '{{ $dldomains[array_rand($dldomains)] }}/'+ response.data.download_url;
|
||||
document.querySelector("#downloadCount").innerText = 'Downloaded ' + response.data.download_count + ' times';
|
||||
downloadCounter = response.data.download_count;
|
||||
}).catch(function (error) {
|
||||
if (error.response.data.message == 'validation.captcha') {
|
||||
document.querySelector("#message").innerHTML = 'Captcha Incorrect!';
|
||||
reloadCaptcha();
|
||||
} else {
|
||||
document.querySelector("#message").innerHTML = error.response.data.message;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function increaseDownloadCounter() {
|
||||
downloadCounter += 1;
|
||||
document.querySelector("#downloadCount").innerText = 'Downloaded ' + downloadCounter + ' times';
|
||||
}
|
||||
|
||||
document.querySelector("#downloadEpisode").addEventListener("click", increaseDownloadCounter);
|
||||
|
||||
document.querySelector("#reloadcaptcha").addEventListener("click", reloadCaptcha);
|
||||
document.querySelector("#submitcaptcha").addEventListener("click", submitCaptcha);
|
||||
</script>
|
32
resources/views/modals/partials/download-guest.blade.php
Normal file
32
resources/views/modals/partials/download-guest.blade.php
Normal file
@@ -0,0 +1,32 @@
|
||||
@guest
|
||||
@include('modals.partials.download-captcha')
|
||||
|
||||
@if ($episode->interpolated)
|
||||
<br>
|
||||
<p class="text-gray-800 dark:text-gray-200 font-bold">
|
||||
<i class="fa-solid fa-lock pr-[4px] text-red-600"></i> FHD 48fps
|
||||
</p>
|
||||
|
||||
<p class="text-gray-800 dark:text-gray-200">
|
||||
48fps Downloads are restricted to logged in users.
|
||||
</p>
|
||||
@endif
|
||||
<br>
|
||||
<p class="text-gray-800 dark:text-gray-200 font-bold">
|
||||
<i class="fa-solid fa-lock pr-[4px] text-red-600"></i> 4k
|
||||
</p>
|
||||
<p class="text-gray-800 dark:text-gray-200">
|
||||
4k Downloads are restricted to patreon subscribers.
|
||||
</p>
|
||||
@if ($episode->interpolated_uhd)
|
||||
<br>
|
||||
<p class="text-gray-800 dark:text-gray-200 font-bold">
|
||||
<i class="fa-solid fa-lock pr-[4px] text-red-600"></i> 4k 48fps
|
||||
</p>
|
||||
<p class="text-gray-800 dark:text-gray-200">
|
||||
4k 48fps Downloads are restricted to patreon subscribers.
|
||||
</p>
|
||||
@endif
|
||||
|
||||
@include('modals.partials.download-subtitles')
|
||||
@endguest
|
34
resources/views/modals/partials/download-subtitles.blade.php
Normal file
34
resources/views/modals/partials/download-subtitles.blade.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<br>
|
||||
<p class="font-bold text-gray-800 dark:text-gray-200">
|
||||
<i class="fa-solid fa-lock-open pr-[4px] text-green-400"></i> Subtitles
|
||||
</p>
|
||||
<div class="flex flex-wrap justify-around">
|
||||
@php
|
||||
$subtitles = collect([['English' => 'eng']])
|
||||
->merge($episode->subtitles->map(fn($sub) => [
|
||||
$sub->subtitle->name => 'autotrans/' . $sub->subtitle->slug,
|
||||
]))
|
||||
->toArray();
|
||||
$streamDomains = config('hstream.stream_domain');
|
||||
@endphp
|
||||
|
||||
@foreach($subtitles as $subtitle)
|
||||
@foreach ($subtitle as $language => $value)
|
||||
<a href="{{ $streamDomains[array_rand($streamDomains)] }}/{{ $episode->url }}/{{ $value }}.ass" download="{{ $episode->slug }}-{{ $language }}.ass">
|
||||
<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-[180px]">
|
||||
<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>
|
||||
</svg>
|
||||
<div id="progress" class="absolute w-full h-0 bg-white bg-opacity-20 top-0 duration-200"></div>
|
||||
</div>
|
||||
<div class="w-32 text-center">
|
||||
<p class="px-5 text-sm row-span-2">{{ $language }}</p>
|
||||
@if ($language != 'English')
|
||||
<p class="px-5 text-xs">Auto Translated</p>
|
||||
@endif
|
||||
</div>
|
||||
</button>
|
||||
</a>
|
||||
@endforeach
|
||||
@endforeach
|
||||
</div>
|
Reference in New Issue
Block a user