Add support for plex library env variable#49
Open
jwmoss wants to merge 3 commits intoalex-phillips:masterfrom
Open
Add support for plex library env variable#49jwmoss wants to merge 3 commits intoalex-phillips:masterfrom
jwmoss wants to merge 3 commits intoalex-phillips:masterfrom
Conversation
Owner
|
This is great! Instead of your changes in (untested) but I think that would work. |
jwmoss
commented
Dec 7, 2020
| @@ -140,6 +142,10 @@ def main(): | |||
| # keyword_matches = [] # unused list? | |||
|
|
|||
| for medium in plex.media: | |||
Owner
There was a problem hiding this comment.
Just about there! Instead of adding in a new initialization of Plex, you should just include the conditional logic above around like 120ish where we are already checking for args.library. Just add in args.library or PLEX_LIBRARY at that location.
| if not sections: | ||
| print('No available sections.') | ||
| sys.exit() | ||
| sections = [ _ for _ in server.library.sections() if _.type in {'movie'} ] |
Owner
There was a problem hiding this comment.
@jwmoss Looks like some extra whitespace got in here and python's bombing on it.
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.
No description provided.