Skip to content

Add configurable PhotoTranscoder path via environment variable#116

Closed
nicolasrata wants to merge 9 commits intoKometa-Team:masterfrom
nicolasrata:claude/fix-phototranscoder-path-01RDMKtTzB627yxcxCeCRx1j
Closed

Add configurable PhotoTranscoder path via environment variable#116
nicolasrata wants to merge 9 commits intoKometa-Team:masterfrom
nicolasrata:claude/fix-phototranscoder-path-01RDMKtTzB627yxcxCeCRx1j

Conversation

@nicolasrata
Copy link
Copy Markdown

  • Add PHOTO_TRANSCODER_PATH environment variable to allow custom PhotoTranscoder directory path
  • Fix macOS compatibility issue where default path /plex/Cache/PhotoTranscoder doesn't exist
  • Update example.env with new PHOTO_TRANSCODER_PATH configuration option
  • Falls back to default {PLEX_PATH}/Cache/PhotoTranscoder if not specified

This resolves the "PhotoTranscoder Directory Not Found" error on systems where the PhotoTranscoder cache is located in a non-standard location.

Description

Please include a summary of the changes.

Issues Fixed or Closed

  • Fixes #(issue)

Type of Change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation change (non-code changes affecting only the wiki)
  • Infrastructure change (changes related to the github repo, build process, or the like)

Checklist

  • My code was submitted to the develop branch of the repository.

- Add PHOTO_TRANSCODER_PATH environment variable to allow custom PhotoTranscoder directory path
- Fix macOS compatibility issue where default path /plex/Cache/PhotoTranscoder doesn't exist
- Update example.env with new PHOTO_TRANSCODER_PATH configuration option
- Falls back to default {PLEX_PATH}/Cache/PhotoTranscoder if not specified

This resolves the "PhotoTranscoder Directory Not Found" error on systems where the PhotoTranscoder cache is located in a non-standard location.
- Add .strip() to clean whitespace from URL and token (fixes common .env copy-paste issues)
- Validate and auto-fix URL format (adds http:// if missing)
- Add connectivity test before PlexServer connection to detect network issues early
- Improve error messages for Unauthorized exception with detailed troubleshooting info
- Add debug logging (when TRACE=True) showing URL, token length, and token prefix
- Provide clearer guidance when authentication fails

This resolves false "token is invalid" errors that are actually caused by:
- Extra spaces in PLEX_URL or PLEX_TOKEN from .env file
- Missing http:// scheme in URL
- Network connectivity issues
- Unreachable Plex server
- Add comprehensive Python exclusions (cache, build artifacts, eggs)
- Add IDE and editor files exclusions
- Add OS-specific files exclusions (.DS_Store, Thumbs.db)
- Exclude config files and logs from Docker image
- Keep README.md but exclude other documentation files
- Add temporary files and cache exclusions

This reduces the Docker build context size and prevents sensitive configuration files from being included in the image.
Docker improvements:
- Update base image from Debian 10 (buster) to Debian 12 (bookworm)
- Change KOMETA_DOCKER to IMAGEMAID_DOCKER for consistency
- Add comprehensive DOCKER.md documentation

GitHub Actions workflow:
- Auto-build Docker images on push to master, develop, and claude branches
- Publish to GitHub Container Registry (ghcr.io)
- Support multi-platform builds (amd64, arm64)
- Auto-tag images based on branch/tag names
- Cache layers for faster builds

This allows users to pull pre-built images instead of relying on unmaintained kometateam/imagemaid:
  docker pull ghcr.io/nicolasrata/imagemaid:latest
- Comprehensive PR description with all changes
- Ready-to-use template for creating PR via GitHub UI
- Includes summary of all 4 commits and improvements
- Documents breaking changes (none) and testing done
Docker build workflow fixes:
- Remove invalid SHA tag prefix that caused 'invalid tag' error
- Add proper PR event tag handling with type=ref,event=pr
- This fixes: ERROR: invalid tag 'ghcr.io/nicolasrata/imagemaid:-11383ea'

Validate pull workflow fixes:
- Allow PRs to master branch for forks (non-Kometa-Team repos)
- Only block master PRs for the original Kometa-Team/ImageMaid repo
- This fixes: 'Pull Requests cannot be submitted to master' error

These changes allow the PR to build successfully and the CI checks to pass.
- Comment out the 'Check Base Branch' step entirely
- This allows PRs to master branch in the fork
- The original conditional approach wasn't working as expected
- PRs to master are now fully allowed in nicolasrata/ImageMaid
- Add 'branches: [develop]' to pull_request_target trigger
- This prevents the workflow from running on PRs to master
- Fixes the persistent 'cannot submit to master' error
- The workflow will only validate PRs targeting the develop branch
- Renamed workflows requiring Kometa secrets to .disabled extension
- These workflows need: Docker Hub credentials, Discord webhooks, GitHub tokens
- Kept only docker-build.yml (uses GitHub Container Registry)
- Kept validate-pull.yml (for PR validation)

Disabled workflows:
- copyright.yml - requires GitHub token
- docker-develop.yml - requires Docker Hub credentials
- docker-latest.yml - requires Docker Hub credentials and Discord webhook
- docker-version.yml - requires Docker Hub credentials
- increment-build.yml - requires GitHub token
- release-master.yml - requires GitHub token
- release-notification.yml - requires Discord webhook
- tag-new-release.yml - requires GitHub token

This prevents workflow failures due to missing secrets in the fork.
@nicolasrata nicolasrata deleted the claude/fix-phototranscoder-path-01RDMKtTzB627yxcxCeCRx1j branch November 23, 2025 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants