2012-09-16, 18:21
I am trying to add more days to the condensed games list but I cannot figure out how to add the date as a string. This is the code I am working on:
I want to add a loop to add 3-5 more days. I was able to add 1 day by modifying the strings and adding a dateStr.day[4] but I cannot seem to add the text of the dateStr like so:
It errors out on that. How can I make the list show the date for the day before the day before yesterday so I don't have to add several strings and do it the hard way?
(Hopefully that all makes sense)
J_K_M_A_N
Code:
def condensedGames():
base = 'http://www.mlb.com/gdcross/components/game/mlb/'
thumb = 'http://mlbmc-xbmc.googlecode.com/svn/icons/condensed.png'
addGameDir(__language__(30010),base+dateStr.day[0]+'/grid.json',13,thumb)
addGameDir(__language__(30011),base+dateStr.day[1]+'/grid.json',13,thumb)
addGameDir(__language__(30012),base+dateStr.day[3]+'/grid.json',13,thumb)
addGameDir(__language__(30014),'',15,'http://mlbmc-xbmc.googlecode.com/svn/icons/condensed.png')
I want to add a loop to add 3-5 more days. I was able to add 1 day by modifying the strings and adding a dateStr.day[4] but I cannot seem to add the text of the dateStr like so:
Code:
addGameDir(dateStr.day[4],base+dateStr.day[3]+'/grid.json',13,thumb)
It errors out on that. How can I make the list show the date for the day before the day before yesterday so I don't have to add several strings and do it the hard way?
(Hopefully that all makes sense)
J_K_M_A_N