Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.00 KB | None | 0 0
  1. @handler('/video/giantbomb', 'Giant Bomb')
  2. def MainMenu():
  3.     oc = ObjectContainer()
  4.  
  5.     # Live stream
  6. #    response = JSON.ObjectFromURL(API_PATH + '/chats/?api_key=' + ApiKey() + '&format=json')
  7. #    chats = response['results']
  8.  
  9. #    for chat in chats:
  10. #        url = 'http://www.twitch.tv/' + chat['channel_name']
  11. #        try:
  12. #            thumb = chat['image']['super_url']
  13. #        except:
  14. #            thumb = R(ICON)
  15.  
  16. #        oc.add(
  17. #            VideoClipObject(
  18. #                url=url,
  19. #                title='LIVE: ' + chat['title'],
  20. #                summary=chat['deck'],
  21. #                source_title='Twitch.tv',
  22. #                thumb=thumb,
  23. #                art=R(ART),
  24. #                rating_key=chat['channel_name']
  25. #           )
  26. #        )
  27.  
  28.     oc.add(
  29.         DirectoryObject(
  30.             key='/video/giantbomb/videos',
  31.             title='Latest',
  32.             summary='Watch the newest stuff.',
  33.             thumb=R(ICON),
  34.             art=R(ART)
  35.         )
  36.     )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement