Skip to content

A self-hosted media server and file management system

fix: docker check

aminnausina5216a285fe3
diff --git a/app/Services/PreviewGeneratorService.php b/app/Services/PreviewGeneratorService.php
index 01dfe3ae..cf4ee577 100644
--- a/app/Services/PreviewGeneratorService.php
+++ b/app/Services/PreviewGeneratorService.php
@@ -156,10 +156,10 @@ class PreviewGeneratorService {
->ignoreConsoleErrors()->setEnvironmentOptions([
'CHROME_CONFIG_HOME' => storage_path('app/chrome/.config'),
]);
- if ($this->canUseDocker()) {
- $browsershot->useDocker();
- } elseif (file_exists('/run/current-system/sw/bin/chromium')) {
+ if (file_exists('/run/current-system/sw/bin/chromium')) {
$browsershot->setChromePath('/run/current-system/sw/bin/chromium');
+ } elseif ($this->canUseDocker()) {
+ $browsershot->useDocker();
} elseif (file_exists('/usr/bin/chromium') || file_exists('/usr/bin/chromium-browser')) {
$browsershot->setChromePath('/usr/bin/chromium');
} else {
diff --git a/resources/views/og-media-preview.blade.php b/resources/views/og-media-preview.blade.php
index a74fdeb2..d406af20 100644
--- a/resources/views/og-media-preview.blade.php
+++ b/resources/views/og-media-preview.blade.php
@@ -36,7 +36,7 @@ $banner_url = str_replace('http://', 'https://', $banner_url ?? $thumbnail_url);
</div>
<p class="line-clamp-2 drop-shadow-lg">{{ $description ?? ""}}</p>
<div class="mt-auto flex items-center gap-3">
- @foreach (collect($tags ?? ['fantasy','romance'])->take(3) as $tag)
+ @foreach (collect($tags ?? [])->take(3) as $tag)
<span class="bg-white/10 px-3 py-1 rounded-full ">{{ $tag }}</span>
@endforeach