fix merge issues

This commit is contained in:
Graham Steffaniak committed 2025-09-09 18:26:40 -05:00
1 parent 2385994736
commit 92909a7403
6 files changed
+4 -31

No files matched your search

+1 -1
View File
@@ -21,7 +21,7 @@ jobs:
run: npm i && npm run build
working-directory: frontend
- name: Install OS Requirements
run: sudo apt update && sudo apt install -y upx build-essential musl-tools libde265-dev libheif-dev
run: sudo apt update && sudo apt install -y upx build-essential musl-tools
- uses: goto-bus-stop/setup-zig@v2
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
+1 -5
View File
@@ -8,14 +8,10 @@ Thank you for your interest in contributing to FileBrowser Quantum! This guide w
- **Node.js 18.0.0+** with npm 7.0.0+ (see `frontend/package.json`)
- **Docker** (optional, for containerized development)
- **Git**
- **libde265**: Required for HEIF/HEIC preview generation
- Ubuntu/Debian: `sudo apt-get install libde265-dev libheif-dev`
- macOS: `brew install libde265 libheif`
- Windows: Download from [github.com/strukturag/libde265](https://github.com/strukturag/libde265) or use `vcpkg install libheif`
### Optional Tools
- **ffmpeg**: For media features (subtitles, thumbnails)
- **ffmpeg**: For media features (subtitles, thumbnails, heic)
- Ubuntu/Debian: `sudo apt-get install ffmpeg`
- macOS: `brew install ffmpeg`
- Windows: Download from [ffmpeg.org](https://ffmpeg.org/download.html)
+1 -1
View File
@@ -4,7 +4,7 @@ ARG VERSION
ARG REVISION
WORKDIR /app
COPY ./backend ./
RUN apk update && apk add --no-cache gcc musl-dev upx libde265-dev g++
RUN apk update && apk add --no-cache gcc musl-dev upx
ENV CGO_ENABLED=1
ENV GOEXPERIMENT=greenteagc
RUN go build -tags mupdf,musl -ldflags="-w -s \
+1 -1
View File
@@ -3,7 +3,7 @@ ARG VERSION
ARG REVISION
WORKDIR /app
COPY ./backend ./
RUN apk update && apk add upx libde265-dev g++
RUN apk update && apk add upx
ENV GOEXPERIMENT=greenteagc
RUN go build -ldflags="-w -s \
-X 'github.com/gtsteffaniak/filebrowser/backend/common/version.Version=${VERSION}' \
-8
View File
@@ -168,15 +168,7 @@ func (s *Service) Resize(in io.Reader, width, height int, out io.Writer, options
return err
}
<<<<<<< HEAD
// Note: For HEIC files processed via FFmpeg, orientation is handled automatically
=======
// Try to detect if this is a HEIC file and manually handle rotation
if format == FormatHeic {
// EXIF shows 'Rotate 90 CW' (value 6), but applying 270° CW (90° CCW) to correct upside-down issue
img = imaging.Rotate270(img) // 270° CW = 90° CCW
}
>>>>>>> 586a76c5cae449e8a688e7baa23df5744877dda9
switch config.resizeMode {
case ResizeModeFill:
-15
View File
@@ -19,9 +19,6 @@ import (
"github.com/gtsteffaniak/filebrowser/backend/common/settings"
"github.com/gtsteffaniak/filebrowser/backend/indexing/iteminfo"
"github.com/gtsteffaniak/go-logger/logger"
// heic support
_ "github.com/adrium/goheif"
)
var (
@@ -129,7 +126,6 @@ func GeneratePreview(file iteminfo.ExtendedFileInfo, previewSize, officeUrl stri
return nil, fmt.Errorf("failed to create image for office file: %w", err)
}
} else if strings.HasPrefix(file.Type, "image") {
<<<<<<< HEAD
logger.Infof("🔍 PREVIEW DEBUG: Image file detected - Name: %s, Type: %s, Extension: %s", file.Name, file.Type, filepath.Ext(file.Name))
// Quick HEIC identification and delegation
@@ -145,14 +141,6 @@ func GeneratePreview(file iteminfo.ExtendedFileInfo, previewSize, officeUrl stri
logger.Infof("✅ HEIC DEBUG: HEIC processing successful, got %d bytes", len(imageBytes))
=======
if file.Type == "image/heic" {
// HEIC files need conversion to JPEG with proper size/quality handling
imageBytes, err = service.convertHEICToJPEGWithSize(file.RealPath, previewSize)
if err != nil {
return nil, fmt.Errorf("failed to convert HEIC image file: %w", err)
}
>>>>>>> 586a76c5cae449e8a688e7baa23df5744877dda9
// For HEIC files, we've already done the resize/conversion, so cache and return directly
cacheKey := CacheKey(file.RealPath, previewSize, file.ModTime, seekPercentage)
if err = service.fileCache.Store(context.Background(), cacheKey, imageBytes); err != nil {
@@ -161,10 +149,7 @@ func GeneratePreview(file iteminfo.ExtendedFileInfo, previewSize, officeUrl stri
return imageBytes, nil
} else {
// get image bytes from file (non-HEIC images)
<<<<<<< HEAD
logger.Infof("📖 PREVIEW DEBUG: Reading non-HEIC image file directly")
=======
>>>>>>> 586a76c5cae449e8a688e7baa23df5744877dda9
imageBytes, err = os.ReadFile(file.RealPath)
if err != nil {
return nil, fmt.Errorf("failed to read image file: %w", err)