Fix: skip video server check on photo-only batches; degrade gracefully without Companion plugin#64
Open
Gotcha26 wants to merge 55 commits into
Open
Fix: skip video server check on photo-only batches; degrade gracefully without Companion plugin#64Gotcha26 wants to merge 55 commits into
Gotcha26 wants to merge 55 commits into
Conversation
…he chain text to be captured for translation.
…he Piwigo version working.
private.
…eo size BEFORE anything.
- ffprobe.py: VideoInfo gains is_hdr property and color_transfer field (detects smpte2084/PQ, arib-std-b67/HLG, smpte428, bt2020-10/12) - ffmpeg.py: HDR sources automatically get zscale tonemap filter (SDR out) when preset is not origin; origin preset always does stream copy - processor.py: SDR sources auto-downgraded to origin (remux, no transcode) while preserving the requested preset suffix for output filename naming - cli.py, status.py: minor improvements from previous session Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
En republication avec même preset, PublishTask lit le fichier .vtk/<stem>.json pour récupérer les dimensions (width×height) et la taille de la variante déjà transcodée, puis appelle PiwigoAPI.setVideoInfo pour mettre à jour Piwigo. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- LrTasks.execute via temporary .bat file to avoid nested quotes issue on Windows (cmd /c + multiple quoted paths = silent failure) - Delete stale VTK log before launch to prevent reading old results - Remove metadata_only mode: republish always triggers VTK (cache decides) - Use publishedCollection:addPhotoByRemoteId to mark videos as published (works for both new and existing photos, unlike getPublishedPhotos loop) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- PiwigoAPI.lua: new setVideoInfo(propertyTable, imageId, w, h, filesize) calls pwg.companion.setVideoInfo to store video dimensions in Piwigo DB - lightroom-companion/main.inc.php: new API method companion_set_video_info updates width, height, filesize (KB) in images table for a given image_id Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- processor.py: thumbnail extracted from transcoded variant (SDR colors) instead of HDR source — avoids washed-out colors in poster image - PublishTask.lua: LrDialogs.message informs user before VTK launch that transcoding may take several minutes and Lightroom will be frozen Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…anion plugin update - Refactor: extract VTK logic into vtk_core.lua and vtk_ui.lua - Add hwaccel support (NVIDIA/AMD/Intel) with auto-detection - Reorganize lightroom-companion plugin structure (lightroom_companion/) - Add VIDEO-TOOLKIT-USER-GUIDE documentation - Improve video processing pipeline with metadata handling - Update icon assets (email, github) - Remove requirements.txt (Python 3.8+ stdlib only) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…tstrap Darkroom theme
This reverts commit ad1179e.
The function was accidentally removed but is still used in PublishTaskImageProcessing.lua (6 calls for resize validation). Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- utils.lua: Restore utils.anonymisePropertyTable() (removed by refactor) - PiwigoAPI.lua: Re-apply anonymisePropertyTable() on all propertyTable/ publishSettings log calls (deletePhoto x2, addComment x3) - PublishTask.lua: Change keyword block message from 'Blocked by' to 'Skipped (keyword filter):' to avoid confusion with upload errors Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Remove 'Refresh from Piwigo' button (not functional in edit context) - Simplify createPiwigoAlbumSettingsUI() signature (no remoteId/publishSettings) - Remove per-collection sync overrides from defaults - Keep global albumDescSyncMode/albumStatusSyncMode for conflict resolution - Update buildCommonCollectionUI() calls in both viewForCollectionSettings This reverts the incomplete per-collection override feature. Album metadata sync now relies on global settings + reconcile dialog during publish.
Fix: Secure logging and improve keyword filter UX
…lly without Companion Two related issues: 1. `vtk_core.checkServerSupport` was called unconditionally even when the export batch contained zero video files. If the Lightroom Companion plugin was absent from the Piwigo server, this triggered a spurious "Video Upload Blocked" critical dialog on every photo-only publish. Fix: guard the call with `if batchVideoCount > 0`. 2. When videos ARE present and the Companion plugin is absent, the upload was hard-blocked. `PiwigoAPI.updateGallery` already handles all video MIME types, and the three Companion-specific enrichment calls (`setRepresentative`, `setVideoInfo`, `setVideoMeta`) are already individually guarded by `if companionAvailable then` in `vtk_core.uploadVariants`. The block was therefore unnecessary. Fix: replace the hard block with a non-critical warning. Videos are uploaded via the standard Piwigo API; thumbnail and dimension metadata are silently skipped. If the server is not configured to accept video file types, the existing "forbidden file type" error handler surfaces the rejection naturally. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Two related bugs involving the Lightroom Companion plugin being absent from the Piwigo server:
Bug 1 — Spurious error on photo-only publish
vtk_core.checkServerSupportwas called unconditionally regardless of whether the export batch contained any video files. When the Lightroom Companion plugin was absent, this always triggered a "Video Upload Blocked" critical dialog — even when the user was publishing photos only (0 videos in the batch).Bug 2 — Hard block when Companion is absent and videos are present
When videos were in the batch and Companion was absent, the upload was blocked entirely. This was unnecessarily strict:
PiwigoAPI.updateGalleryalready handles all video MIME types (mp4, m4v, mov, avi, webm, etc.), and the three Companion-specific enrichment calls (setRepresentative,setVideoInfo,setVideoMeta) invtk_core.uploadVariantsare already individually guarded byif companionAvailable then. The fallback path was therefore already in place — it just was never reached.Fix
PublishTask.lua— GuardcheckServerSupportwithif batchVideoCount > 0. When no videos are in the batch, the server video check is skipped entirely and publication proceeds without any dialog.vtk_core.lua— Replace the hard block (when Companion is absent) with a non-critical warning. Videos are uploaded via the standardpwg.images.addSimpleAPI. Companion-specific enrichment (custom thumbnail, video dimensions, codec/fps/bitrate metadata) is silently skipped. If the server is not configured to accept video file types, the existing"forbidden file type"error handler surfaces the rejection naturally.Behaviour after fix
updateGalleryTest plan