Skip to content

Commit

Permalink
Add icon to bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
sander1 committed Sep 28, 2017
1 parent 7aa0645 commit 72021f0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions Contents/Code/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
PREFIX = '/video/pbskids'
NAME = 'PBS Kids'
ART = 'art-default.jpg'
ICON = 'icon-default.jpg'

PBSKIDS_URL = 'http://www.pbskids.org/video/'
PBSKIDS_SHOWS = 'http://pbskids.org/pbsk/video/api/getShows/?return=images'
Expand All @@ -14,7 +16,7 @@ def Start():
ObjectContainer.title1 = NAME

####################################################################################################
@handler(PREFIX, NAME)
@handler(PREFIX, NAME, art=ART, thumb=ICON)
def MainMenu():

oc = ObjectContainer()
Expand All @@ -36,7 +38,7 @@ def MainMenu():
key = Callback(ShowPage, title=title, thumb=thumb),
title = title,
summary = summary,
thumb = Resource.ContentsOfURLWithFallback(url=thumb)
thumb = Resource.ContentsOfURLWithFallback(url=thumb, fallback=ICON)
))

return oc
Expand All @@ -48,11 +50,11 @@ def ShowPage(title, thumb):
oc = ObjectContainer(title2=title)

oc.add(DirectoryObject(key=Callback(VideoPage, type='Episode', title=title), title='Full Episodes',
thumb=Resource.ContentsOfURLWithFallback(url=thumb)
thumb=Resource.ContentsOfURLWithFallback(url=thumb, fallback=ICON)
))

oc.add(DirectoryObject(key=Callback(VideoPage, type='Clip', title=title), title='Clips',
thumb=Resource.ContentsOfURLWithFallback(url=thumb)
thumb=Resource.ContentsOfURLWithFallback(url=thumb, fallback=ICON)
))

return oc
Expand Down Expand Up @@ -81,11 +83,11 @@ def VideoPage(type, title, start=0):

if type == 'Clip':
oc.add(VideoClipObject(url=url, title=video_title, summary=summary, duration=duration,
thumb=Resource.ContentsOfURLWithFallback(thumb)
thumb=Resource.ContentsOfURLWithFallback(url=thumb, fallback=ICON)
))
else:
oc.add(EpisodeObject(url=url, title=video_title, show=title, summary=summary, duration=duration,
thumb=Resource.ContentsOfURLWithFallback(thumb)
thumb=Resource.ContentsOfURLWithFallback(url=thumb, fallback=ICON)
))

if int(json_obj['matched']) > end:
Expand Down
Binary file added Contents/Resources/art-default.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Contents/Resources/icon-default.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 72021f0

Please sign in to comment.