-
Notifications
You must be signed in to change notification settings - Fork 273
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
Added Season scene exception indicators to displayShow #82
Conversation
Every time I open a show page I get this error. Either you make sure that 'indexer' exists, or you set a default value for it, like: |
for tvdb_season_ep, anidb_season_ep in get_xem_numbering_for_show(indexer_id, indexer).iteritems(): | ||
if not xem_numbering_season.get(str(tvdb_season_ep[0])): | ||
xem_numbering_season[str(tvdb_season_ep[0])] = str(anidb_season_ep[0]) | ||
|
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.
Why not just?
for season, xem_season in get_xem_numbering_for_show(indexer_id, indexer).items():
xem_numbering_season[season[0]] = xem_season[0]
.items() for py3 compatibility. Don't need str() and I would avoid it everywhere it's not needed.
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.
@medariox and even better yet, make it a dict comprehension:
xem_numbering_season = {
season[0]: xem[0]
for season, xem in get_xem_numbering_for_show(indexer_id, indexer).items()
}
also exceptionLists should be both snake_case (and keys shouldn't be camel case) and a dict literal e.g.:
exception_lists = {
'season_exceptions': sickbeard.scene_exceptions.get_all_scene_exceptions(indexer_id),
'xem_numbering': xem_numbering_season, # can also use dict comprehension here directly.
}
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.
Items() is slow and memory expensive in python2. Actually i Used items() but changed it after feedback. I need the string there else its passed as int. If someone wants to commit the snakecase, i think it's fine.
870a5d1
to
7a14e21
Compare
7a14e21
to
2eb9430
Compare
…ne_exceptions saved in the cache scene_exceptions table. Xem season scene mappings are shown through the xem icon, through the img elements title attribute. Sickrage's scene name exceptions are indicated through the sickrage ico file. We do need to change the sickrage logo to the Medusa logo.
2eb9430
to
45a8b10
Compare
Added Season scene exception indicators to displayShow
This PR is here for everyone to review and give his/here approval.
If things are missing, we need to add features or whatever, let me know. Will push against this PR.
If approved i'll merge.
, using the scene_exceptions saved in the cache scene_exceptions table.
Xem season scene mappings are shown through the xem icon, through the img elements title attribute. Sickrage's scene name exceptions are indicated through the sickrage ico file.
We do need to change the sickrage logo to the Medusa logo.
Xem scene exceptions are mapped from the season to sceneseason json.
Season excepions from the sickrage github file are directly mapped to the season number.
#50