-
Notifications
You must be signed in to change notification settings - Fork 277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/fix create cache from meta #5810
Conversation
DeepCode analyzed this pull request. |
medusa/metadata/generic.py
Outdated
def get_image_path(self, show_obj, image_type): | ||
"""Based on the image_type (banner, poster, fanart) call the correct method, and return the path.""" | ||
banner_path = { | ||
BANNER: self.get_banner_path, POSTER: self.get_poster_path, FANART: self.get_fanart_path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would put one on each line:
BANNER: self.get_banner_path,
POSTER: self.get_poster_path,
FANART: self.get_fanart_path,
medusa/metadata/generic.py
Outdated
BANNER: self.get_banner_path, POSTER: self.get_poster_path, FANART: self.get_fanart_path | ||
} | ||
if banner_path.get(image_type): | ||
return banner_path.get(image_type)(show_obj) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can avoid the second .get()
here and just use banner_path[image_type](show_obj)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
true
fix #5808