Skip to content

A self-hosted media server and file management system

fix: ogp doesn't differentiate between majority audio vs video folders the same way as frontend

aminnausin9ab4d5414ab4
diff --git a/app/Services/PreviewGeneratorService.php b/app/Services/PreviewGeneratorService.php
index af33371d..2b8adfa3 100644
--- a/app/Services/PreviewGeneratorService.php
+++ b/app/Services/PreviewGeneratorService.php
@@ -92,7 +92,7 @@ class PreviewGeneratorService {
$folderResource = $this->getDecodedResource(new FolderResource($folder));
$thumbnail = $folder->series->thumbnail_url ?: $this->defaultThumbnail;
- $isAudio = $folder->series->primary_media_type === 1;
+ $isAudio = $folderResource->is_majority_audio;
$fileCount = $folderResource->file_count ?? 0;
$fileType = ($isAudio ? 'Track' : 'Episode') . ($fileCount === 1 ? '' : 's');
$contentString = ($folderResource->series->date_start ? $this->getMediaReleaseSeason($folderResource->series->date_start) . ' • ' : '') . "$fileCount $fileType";