Skip to content
This repository has been archived by the owner on Sep 22, 2023. It is now read-only.

Cleanup #310

Closed
wants to merge 1 commit into from
Closed

Cleanup #310

wants to merge 1 commit into from

Conversation

emilsvennesson
Copy link
Collaborator

@emilsvennesson emilsvennesson commented Aug 12, 2017

#294

  • Renamed publishpoint function
  • Got rid of xmltodict in favour of ElementTree
  • Simplified logic in a lot of functions
  • Minor bug fixes and improvements

if game['phase'] == 'FINAL' or game['phase'] == 'FINAL_OVERTIME':
# show game duration only if user wants to see it
if addon.getSetting('hide_game_length') == 'false':
game_info = '%s [CR] Duration: %s' % (game['phase'], str(datetime.timedelta(seconds=int(float(game['video']['videoDuration'])))))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just noting, in case the issue comes back to bite us: there were a lot of oddities with datetime and Kodi on some platforms. We'll just keep this change in mind if we get bug reports and need to put the "try" statement back in.

---Alex

isBlackedOut = 'false'
listitem.setProperty('video_id', video_id)
listitem.setProperty('game_versions', 'Live')
else: # ONDEMAND
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not familiar with this status. What is "on demand"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Basically, all games that are archived has the 'videoStatus' set to 'ONDEMAND'. There's probably some additional info we're going to need in regards to blacked out games etc, but this should be easy to add later on.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@emilsvennesson Ahh, good to know. Thanks for the explanation.

---Alex

@aqw aqw closed this in 7a8dd65 Aug 13, 2017
@aqw
Copy link
Collaborator

aqw commented Aug 13, 2017

@emilsvennesson Really great stuff. Thanks a lot for these changes. Makes a bunch of code much more readable.

---Alex

@emilsvennesson
Copy link
Collaborator Author

@aqw I'm happy to help out! :-)

@emilsvennesson emilsvennesson deleted the cleanup branch August 13, 2017 20:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants