GetAiringsForShow() only returns airings of the specific episode; not all episodes of the show title in the EPG. So you should search by exact title, which is what I believe the default STV does in Sage. Unfortunately, it's a little messy for us using the remote APIs, but quite doable.
So, to get all airings of a show, I'd do this (I'm using the show var you introduced, I assume it's a Show JSON object previously loaded from somewhere):
items = airings.airingsToListItems(sageAPI.SearchByTitle(show['ShowTitle'], 'T'))
Now if you only want airings from the past, do this:
expr = 'FilterByRange(SearchByTitle("%s", "T"), "GetAiringStartTime", java_lang_Long_parseLong("0"), java_lang_Long_parseLong("%d"), true)' % (show['ShowTitle'], int(time.time()) * 1000)
items = airings.airingsToListItems(sageAPI.EvaluateExpression(expr))
For airings in the future:
expr = 'FilterByRange(SearchByTitle("%s", "T"), "GetAiringStartTime", java_lang_Long_parseLong("%d"), java_lang_Long_MAX_VALUE, true)' % (show['ShowTitle'], int(time.time()) * 1000)
items = airings.airingsToListItems(sageAPI.EvaluateExpression(expr))
Apply a filter to the EvaluateExpression() call to restrict the properties that are returned, if necessary. My guess is you'll want to add these as custom methods in sage.py for easier access throughout the UI.
- Derek