Skip to content
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

Merged
merged 3 commits into from
Dec 1, 2018

Conversation

p0psicles
Copy link
Contributor

@p0psicles p0psicles commented Dec 1, 2018

  • PR is based on the DEVELOP branch
  • Don't send big changes all at once. Split up big PRs into multiple smaller PRs that are easier to manage and review
  • Read the contribution guide

fix #5808

@ghost
Copy link

ghost commented Dec 1, 2018

DeepCode analyzed this pull request.
There are no new issues.

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
Copy link
Contributor

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,

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)
Copy link
Contributor

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)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true

@p0psicles p0psicles merged commit 3c3fe6b into develop Dec 1, 2018
@p0psicles p0psicles deleted the feature/fix-create-cache-from-meta branch December 1, 2018 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants