Repository navigation
Share one Config and helpers module - #71
Draft
chazlarson wants to merge 4 commits into
Draft
chazlarson wants to merge 4 commits into
chazlarson wants to merge 4 commits into
Conversation
Drop the copied loaders, keep the Plex auth-file behavior, and stop scripts from connecting to Plex or exiting just because they were imported. Remove the stale root image-picker app and point CI at the uv lockfiles. Co-authored-by: chaz <chaz@chazlarson.com>
Scripts import mediascripts directly and add the repo root to the path, so one module remains and a script run from its own directory can still find it. Co-authored-by: chaz <chaz@chazlarson.com>
import-IDs.py and database.py still stored the TMDB id twice, so a TVDB change was never recorded. Co-authored-by: chaz <chaz@chazlarson.com>
get_plex takes an optional user token for managed-user connections. Seven scripts run their bodies from main(). Logging lives in mediascripts.logs, and the unused Kometa helper is gone. Co-authored-by: chaz <chaz@chazlarson.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.
Summary
The three copied
Configclasses andhelpers.pymodules are deleted. The only implementation ismediascripts/. Scripts importmediascripts.configandmediascripts.helpersand put the repo root onsys.path, so a script still runs from its own directory. The orchestrator also puts the repo root onPYTHONPATH.baseurlorurl.booler()is gone; boolean settings go throughConfig.get_bool, andget_intreturns an int. Running the config module no longer writes a sampleconfig.yaml.get_plex()takes an optional user token and connects as that managed user. The owner path is unchanged: plexapi config, then a saved login, then an interactive login.show-all-playlists.pyprints a message when a user's playlists cannot be read.app.pyis removed. It was an older image picker, and Flask is no longer a root dependency. The maintained picker isplex-image-picker/.get_diffscompares TVDB and title.grab-all-info.py,import-IDs.py, anddatabase.pyhad each stored the TMDB id twice.main(), including the seven that previously did their work at import:import-IDs.py,tmdb-people.py,get_TMDB_Original_Language.py,captions.py,overlay-default-posters.py, and the two Kometa auth scripts. TheCURRENTLY BROKENexit inapply-all-status.pyis insidemain()too.mediascripts/logs.py. The Plex and Kometa copies are gone, and so is the unusedKometa/kometa-helpers.py.except:(E722) and redefined names (F811). Those bare handlers areexcept Exception..github/workflows/CI.ymlinstalls the root and picker lockfiles withuv sync --frozeninstead of the old plugin workflow.Verification
ruff checkpasses.show-all-playlists.pyandmetadata-extractor.py, does not connect to Plex, download, or prompt.get_plexacceptsuser_tokenand defaults it toNone.orchestrator.py liststill offers the runnable scripts and no longer offers the deleted helper.uv lockno longer includes Flask in the root environment. The picker lockfile still does.