Skip to content

A self-hosted media server and file management system

chore: pint

aminnausina022b904091c
diff --git a/app/Services/PreviewGeneratorService.php b/app/Services/PreviewGeneratorService.php
index b1d0c18b..4c6943c4 100644
--- a/app/Services/PreviewGeneratorService.php
+++ b/app/Services/PreviewGeneratorService.php
@@ -20,8 +20,7 @@ class PreviewGeneratorService {
public function __construct(
protected PathResolverService $pathResolver,
protected FileJobService $fileJobService,
- ) {
- }
+ ) {}
public function handle(Request $request): Response {
$defaultData = $this->defaultData($request);
@@ -104,7 +103,7 @@ class PreviewGeneratorService {
'thumbnail_url' => $thumbnail,
'upload_date' => $this->formatDate($folderResource->series->date_created),
'content_string' => $contentString,
- 'tags' => $folderResource->series->folder_tags ? array_map(fn($tag) => $tag->name, $folderResource->series->folder_tags) : null,
+ 'tags' => $folderResource->series->folder_tags ? array_map(fn ($tag) => $tag->name, $folderResource->series->folder_tags) : null,
'url' => $request->fullUrl(),
];
@@ -134,7 +133,7 @@ class PreviewGeneratorService {
'release_date' => $releaseDate,
'upload_date' => $this->formatDate($video->metadata->date_uploaded),
'mime_type' => $video->mime_type,
- 'tags' => $videoResource->video_tags ? array_map(fn($tag) => $tag->name, $videoResource->video_tags) : null,
+ 'tags' => $videoResource->video_tags ? array_map(fn ($tag) => $tag->name, $videoResource->video_tags) : null,
'studio' => ucfirst($folderResource?->series?->studio),
'url' => $request->fullUrl(),
];
@@ -203,11 +202,12 @@ class PreviewGeneratorService {
Storage::disk('public')->delete($tempRelativePath);
}
- if (!$selfStore || !isset($imageContents)) {
+ if (! $selfStore || ! isset($imageContents)) {
return $imageContents ?? false;
}
Storage::disk('public')->put($relativePath, $imageContents);
+
return VerifyFiles::getPathUrl($relativePath);
}
}