Skip to content

Commit

Permalink
add server location to summary, team feed name vs away/home
Browse files Browse the repository at this point in the history
  • Loading branch information
kevcenteno committed Dec 12, 2014
1 parent 5d198e3 commit 0047612
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions Contents/Code/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ def OnDemandGamesMenu(gameDate):
for video in GetOnDemandGames(url):
(game_id, title, logo, arena, summary, isPlaying) = video

summary = summary + " - Server: " + getServerLocation(False)

oc.add(DirectoryObject(
key=Callback(OnDemandStreamMenu, game_id=game_id, title=title, logo=logo, arena=arena, summary=summary),
title=title,
Expand All @@ -228,8 +230,6 @@ def OnDemandStreamMenu(game_id, title, logo, arena, summary):
url = URL_ONDEMANDSTREAM % (game_id, TOKEN + serverLocation)
game_json = JSON.ObjectFromURL(url)

summary = summary + " - Server: " + getServerLocation(False)

# Get Prefs
quality = Prefs['quality']

Expand Down Expand Up @@ -386,6 +386,7 @@ def GetStream(game_id, title1, url, thumb, art, summary, include_container=False
else:
return vco

@route(PREFIX + '/playvideo')
@indirect
def PlayVideo(url):
return IndirectResponse(VideoClipObject, key=url)
Expand Down Expand Up @@ -535,13 +536,22 @@ def populateVideoArray(videoArr, videoObj, is_live=False):

# Add playing indicator if game-on (maybe take this out)

if videoObj['feedType']: feedType = ' - ' + videoObj['feedType']
if videoObj['feedType']:
if videoObj['feedType'] == "Away Feed":
feedType = " - " + getTeamName(awayTeam) + " feed"
elif videoObj['feedType'] == "Home Feed":
feedType = " - " + getTeamName(homeTeam) + " feed"
else:
feedType = " - " + videoObj['feedType']

# Built the title
title = playingMarker + getTeamName(awayTeam) + ligature + getTeamName(homeTeam) + feedType

summary = title + " - " + summary

if summary:
summary = title + " - " + summary
else:
summary = title

videoArr.append([game_id, title, logo, arena, summary, isPlaying])

###################################################################################################
Expand Down

0 comments on commit 0047612

Please sign in to comment.