[change] emby: Manage all media types in lists#3253
Merged
gazpachoking merged 5 commits intoFlexget:developfrom Nov 23, 2021
Merged
[change] emby: Manage all media types in lists#3253gazpachoking merged 5 commits intoFlexget:developfrom
gazpachoking merged 5 commits intoFlexget:developfrom
Conversation
flexget/components/emby/api_emby.py
Outdated
Comment on lines
+557
to
+569
| args['IncludeItemTypes'] = [] | ||
| for mtyp in self.types: | ||
| mtyp = str(mtyp).lower | ||
| if mtyp in ['movie', 'movies']: | ||
| args['IncludeItemTypes'].append('Movie') | ||
| elif mtyp in ['serie', 'series']: | ||
| args['IncludeItemTypes'].append('Series') | ||
| elif mtyp in ['season', 'seasons']: | ||
| args['IncludeItemTypes'].append('Season') | ||
| elif mtyp in ['episode', 'episode']: | ||
| args['IncludeItemTypes'].append('Episode') | ||
|
|
||
| args['IncludeItemTypes'] = ','.join(self.types) |
Member
There was a problem hiding this comment.
Doesn't seem like we need to support with and without the 's'. Why not just make there be one right way. (When the user is entering it in the config, it's already enforced due to the config validator.)
Suggested change
| args['IncludeItemTypes'] = [] | |
| for mtyp in self.types: | |
| mtyp = str(mtyp).lower | |
| if mtyp in ['movie', 'movies']: | |
| args['IncludeItemTypes'].append('Movie') | |
| elif mtyp in ['serie', 'series']: | |
| args['IncludeItemTypes'].append('Series') | |
| elif mtyp in ['season', 'seasons']: | |
| args['IncludeItemTypes'].append('Season') | |
| elif mtyp in ['episode', 'episode']: | |
| args['IncludeItemTypes'].append('Episode') | |
| args['IncludeItemTypes'] = ','.join(self.types) | |
| args['IncludeItemTypes'] = ','.join(typ.title() for typ in self.types) |
Contributor
Author
There was a problem hiding this comment.
Done! I din't knew about that "title()" method :)
Member
|
Thanks! |
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.
Motivation for changes:
Allow the managing of lists and favorites with all media types
Detailed changes:
Addressed issues: