Add 3MF viewer and enable PDF thumbnails
All checks were successful
Automated Container Build / build-and-push (push) Successful in 1m12s

This commit is contained in:
Elijah 2026-05-31 21:28:47 -07:00
parent cd540499ca
commit 72b1de2937
5 changed files with 571 additions and 17 deletions

View file

@ -82,7 +82,7 @@ func (m *ThumbnailManager) ScanMissingThumbnails() {
mimeType = "video/"
} else if ext == ".mp3" || ext == ".flac" || ext == ".wav" || ext == ".m4a" || ext == ".aac" {
mimeType = "audio/"
} else if ext == ".docx" || ext == ".pptx" || ext == ".xlsx" {
} else if ext == ".docx" || ext == ".pptx" || ext == ".xlsx" || ext == ".pdf" {
mimeType = "application/"
} else {
continue
@ -148,7 +148,7 @@ func (m *ThumbnailManager) worker(id int) {
err = generateVideoThumbnail(fullSourcePath, destPath)
} else if strings.HasPrefix(job.MimeType, "audio/") {
err = generateAudioThumbnail(fullSourcePath, destPath)
} else if strings.HasSuffix(job.FilePath, ".docx") || strings.HasSuffix(job.FilePath, ".pptx") || strings.HasSuffix(job.FilePath, ".xlsx") {
} else if strings.HasSuffix(job.FilePath, ".docx") || strings.HasSuffix(job.FilePath, ".pptx") || strings.HasSuffix(job.FilePath, ".xlsx") || strings.HasSuffix(strings.ToLower(job.FilePath), ".pdf") {
err = generateOfficeThumbnail(job.FilePath, destPath, m.Config)
} else {
continue