fix thumbnail generation

fix hardcoded paths
a lot of minor fixes
This commit is contained in:
2021-01-21 19:55:42 +00:00
parent aacf387d63
commit 7a62b01027
18 changed files with 62 additions and 121 deletions

View File

@@ -2,12 +2,6 @@
@section('content')
@if(auth()->check())
@if(file_exists(public_path() . 'thumbs/beta/{{$video->file}}' . '.png'))
@else
{{$video->tesThumb()}}
@endif
<?php $related = $related ?? null; ?>
<div class="vertical-align">
<div class="wrapper">
@@ -21,7 +15,7 @@
<iframe src="https://w0bm.com/loop/index.html"></iframe>
@else
<video id="video" loop controls preload="auto" crossorigin="anonymous">
<source src="https://b.w0bm.com/b{{ "/" . $video->file }}">
<source src="/b{{ "/" . $video->file }}">
<!-- rip fapple! <source src="//fapple.w0bm.com/{{str_replace(".webm","",$video->file)}}.mp4"> -->
</video>
@endif
@@ -140,7 +134,6 @@
</aside>
@else
{{$video->tesThumb()}}
<div class="centered">
<div class="modal-content col-md-5">
<div class="modal-header">
@@ -159,20 +152,11 @@
</div>
<div class="media not-logged-in">
<div class="media-left">
@if(count($video->tags))
@foreach($video->tags as $tag)
@if($tag == 'sfw')
<img class="media-object" src="@if(isset($video))/thumbs/beta/{{str_replace(".webm","",$video->file)}}.png"@endif">
@elseif($tag == 'nsfw')
@if(file_exists(public_path() . 'thumbs/blurred/{{$video->file}}' . '_blurred.png'))
<img class="media-object" src="@if(isset($video))/thumbs/blurred/{{str_replace(".webm","",$video->file)}}_blurred.png"@endif">
@else
{{$video->blurryThumb()}}
<img class="media-object" src="@if(isset($video))/thumbs/blurred/{{str_replace(".webm","",$video->file)}}_blurred.png"@endif">
@endif
@endif
@endforeach
@endif
@if($sfw)
<img class="media-object" src="/thumbs/beta/{{str_replace('.webm','',$video->file)}}.png">
@else
<img class="media-object" src="/thumbs/blurred/{{str_replace('.webm','',$video->file)}}_blurred.png">
@endif
</div>
<div class="media-koerper">
<h4 class="media-heading">