Skip to content

Config class - #65

Merged
chazlarson merged 15 commits into
mainfrom
config-class
Oct 21, 2026
Merged

chazlarson merged 15 commits into
mainfrom
config-class

Conversation

@chazlarson

@chazlarson chazlarson commented Sep 23, 2025 •

Copy link
Copy Markdown
Owner

Changes from a .env file to a config.yml

Changes from a .env file to a config.yml

Summary

Moves script configuration from .env files to a shared config.yaml (copied from config.template.yaml) and a Config helper used by the Plex, Kometa, and TMDB scripts.

This update also:

  • merges current main, including asset-type subfolders for originals-to-assets.py, substring collection deletes, and the plex-image-picker app from Modification on ITEMS and ITEM pages #67
  • leaves the image picker's square-art option and list/icon toggle off this branch. Those edits are saved on cursor/plex-picker-square-view-054f
  • wires settings that were still read from the environment (reset_posters.target_labels in reset-posters-tmdb.py, kometa.config_dir in originals-to-assets.py)
  • moves TMDB/tmdb-people.py, TMDB/get_TMDB_Original_Language.py, and Kometa/kometa-helpers.py onto config.yaml, and removes the unused dotenv upgrade helper
  • adds orchestrator.py as the single entry point: list, a script name, or menu. The Plex Image Picker is not included
  • adds a Dockerfile whose /config mount holds config.yaml and the plex/, kometa/, and tmdb/ folders scripts write into
  • fixes grab-all-status.py (sys and textwrap were used without imports) and the TMDB logo downloader progress loop
  • replaces the sample API keys in the Config example with placeholders, and stops using eval for boolean settings
  • clears the ruff failures on this branch
  • adds .cursor/orchestrator-handoff.md so a follow-up agent can build the image without rediscovering the decisions. That file is session notes and can be removed before merge

GitGuardian flagged sample keys in an earlier commit on this branch (Plex/config.py). Those values are gone from the current files. The incident can be resolved in the GitGuardian dashboard. If those keys were real, rotate them.

Test plan

  • ruff check .
  • python -m compileall
  • config.template.yaml parses
  • Config load, bool/int parsing, originals-to-assets path layout, and the collection-delete predicate
  • Remaining scripts read tmdb_people, original_language, and Plex URL/token from config.yaml
  • orchestrator.py list omits the image picker, and picker exits with an error
  • With MEDIA_SCRIPTS_CONFIG_DIR set, the orchestrator seeds config.yaml and runs scripts from plex/, kometa/, and tmdb/
  • docker build and a run against a live Plex server
Open in Web Open in Cursor 

@gitguardian

gitguardian Bot commented Sep 23, 2025 •

Copy link
Copy Markdown

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
While these secrets were previously flagged, we no longer have a reference to the
specific commits where they were detected. Once a secret has been leaked into a git
repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

chazlarson and others added 10 commits September 23, 2025 18:06
Merge main into config-class, keep asset-type subfolders and substring collection deletes on the yaml config, and fix the remaining config wiring and ruff failures.

Co-authored-by: chaz <chaz@chazlarson.com>
tmdb-people, get_TMDB_Original_Language, and kometa-helpers now read the shared config, and the unused dotenv upgrade helper is gone.

Co-authored-by: chaz <chaz@chazlarson.com>
It lists and launches scripts by name for a container command, and opens the existing menu on a terminal.

Co-authored-by: chaz <chaz@chazlarson.com>
The menu and container entry point no longer launch it, and a Docker build of this repo ignores that directory.

Co-authored-by: chaz <chaz@chazlarson.com>
MEDIA_SCRIPTS_CONFIG_DIR points at /config, which holds config.yaml and the plex, kometa, and tmdb folders scripts write into.

Co-authored-by: chaz <chaz@chazlarson.com>
The notes record the Docker mount, what is already decided, and the build that still needs to run.

Co-authored-by: chaz <chaz@chazlarson.com>
Take the plex-image-picker app from #67. The square-art option and list/icon toggle stay on cursor/plex-picker-square-view-054f.

Co-authored-by: chaz <chaz@chazlarson.com>
@chazlarson
chazlarson merged commit 30eaaa8 into main Oct 21, 2026
3 checks passed
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