2020-07-16, 21:33
(2020-07-12, 23:55)feerlessleadr Wrote:I was able to figure this out. The error happens with the Amazing Mysteries show because the JSON blob is using a key that the show.py script isn't expecting within 'thumbnail'.(2020-07-12, 23:08)lasers Wrote: I was able to work around the above issue by disabling the VOD service in settings.xml.
I'm also noticing every time I reboot, IPTV simple loses the EPG/channel information. It still is present in the sqlite database though...
I would have expected that it would fallback to cache if the slinger service fails. For whatever reason when IPTV-simple requests the m3u or xml file, it's blank.
Glad I'm not the only one. Mind sharing what you modified in the settings.xml to disable?
Thanks
Here is an Amazing Mysteries episode that is being parsed:
json:{
"airings": [{
"ratings": [
"US_MPAA_UR"
],
"_href": "http://cbd46b77.cdn.cms.movetv.com/cms/publish3/asset/info/e57c565f7ebe44849e323ba6dd23deb8.json",
"title": "Amazing Mysteries",
"program_id": 2168738,
"source_id": 1442,
"vendor_content_id": "LLVAL014MAG_Bonus",
"has_blackouts": false,
"duration": 2909.01,
"external_id": "e57c565f7ebe44849e323ba6dd23deb8",
"availability": [{
"channel_id": 1885,
"channel_guid": "246b3ad254b34b0498682688d8fab675",
"stop": "2030-07-11T03:59:00Z",
"start": "2020-03-16T04:01:00Z",
"availability_type": "svod",
"qvt": "http://cbd46b77.cdn.cms.movetv.com/cms/publish3/entitlement/asset/efc89fb7371e4bfe9968495e6a684d50/e57c565f7ebe44849e323ba6dd23deb8.qvt"
},
{
"channel_id": 1885,
"channel_guid": "246b3ad254b34b0498682688d8fab675",
"stop": "2030-07-11T03:59:00Z",
"start": "2020-03-16T04:01:00Z",
"availability_type": "svod",
"qvt": "http://cbd46b77.cdn.cms.movetv.com/cms/publish3/entitlement/asset/2b51540c9ed84863804a037e73d940c6/e57c565f7ebe44849e323ba6dd23deb8.qvt"
}
],
"airing_id": 43933715
}],
"ratings": [
"US_MPAA_UR"
],
"background_image": {
"url": "http://p-img.movetv.com/cms/images/bbe93e4711deffaf18e69997eb76f73c76fcf05a.jpg",
"h": 1080,
"credit_short": null,
"w": 1920,
"credit_full": null
},
"guid": "dbb2bfd7ff784a72aa901be16bfa8585",
"description": "Dinosaurs became extinct 65 million years ago. Was it triggered by an asteroid impact? Global volcanic activity? A worldwide flood? The fossil records show something different. What really happened? ",
"name": "Dinosaur Extinction: What Killed the Dinosaurs?",
"thumbnail": {
"url": "http://p-img.movetv.com/cms/images/bbe93e4711deffaf18e69997eb76f73c76fcf05a.jpg",
"h": 1080,
"credit_short": null,
"w": 1920,
"credit_full": null
},
"episode_number": 3,
"type": "episode",
"id": 2168738,
"_href": "http://cbd46b77.cdn.cms.movetv.com/cms/api/programs/dbb2bfd7ff784a72aa901be16bfa8585"
}
Here is a normal JSON blob of a different show/episode:
json:{
"airings": [{
"ratings": [
"US_UPR_TV-G"
],
"_href": "http://cbd46b77.cdn.cms.movetv.com/cms/publish3/asset/info/1a41eb1d985641a782a17fe16b9d1756.json",
"title": "Adopt",
"program_id": 2505612,
"source_id": 1603,
"vendor_content_id": "DOGP0000000000009163",
"has_blackouts": false,
"duration": 294.53,
"external_id": "1a41eb1d985641a782a17fe16b9d1756",
"availability": [{
"channel_id": 1467,
"channel_guid": "de24cb792ce14252860ef3a7e1ab6fad",
"stop": "2024-05-06T03:59:59Z",
"start": "2020-05-05T04:01:00Z",
"availability_type": "svod",
"qvt": "http://cbd46b77.cdn.cms.movetv.com/cms/publish3/entitlement/asset/6fb84893343d4ee89ebadb45d0c5d605/1a41eb1d985641a782a17fe16b9d1756.qvt"
},
{
"channel_id": 2056,
"channel_guid": "354260716fd4486d9dd4cd979fb02cac",
"stop": "2024-05-06T03:59:59Z",
"start": "2020-05-05T04:01:00Z",
"availability_type": "svod",
"qvt": "http://cbd46b77.cdn.cms.movetv.com/cms/publish3/entitlement/asset/d9184b7fece64017b1cb25cf4d246979/1a41eb1d985641a782a17fe16b9d1756.qvt"
}
],
"airing_id": 49518559
}],
"ratings": [
"US_UPR_TV-G"
],
"background_image": {
"h": 1440,
"href": "http://p-img.movetv.com/cms/images/31c326b6eed9d77597dac322221fee7c6035671b.jpg",
"credit_short": null,
"w": 2560,
"credit_full": null
},
"guid": "d0e557969fb84b1599a0757cb9ac04d4",
"description": "DOGTV is working with rescues across the US to get dogs adopted. Adopt a dog now and get a great adoption kit. Season 2 episode 23",
"name": "Adopt S02E23",
"thumbnail": {
"h": 1440,
"href": "http://p-img.movetv.com/cms/images/31c326b6eed9d77597dac322221fee7c6035671b.jpg",
"credit_short": null,
"w": 2560,
"credit_full": null
},
"episode_number": 23,
"type": "episode",
"id": 2505612,
"_href": "http://cbd46b77.cdn.cms.movetv.com/cms/api/programs/d0e557969fb84b1599a0757cb9ac04d4"
}
The show.py script expects that the thumbnail section contain the key 'href'. In the broken episode it's 'url'.
I fixed mine by editing the show.py script directly like so:
python:204 def processEpisode(self, episode, new_season, new_show, episode_query):
205 timestamp = int(time.time())
206 log(json.dumps(episode, indent=4))
207 new_episode = {
208 'GUID': episode['guid'],
209 'ID': int(episode['id']),
210 'Show_GUID': new_show['GUID'],
211 'Season_GUID': new_season['GUID'],
212 'Name': episode['name'],
213 'Number': int(episode['episode_number']) if 'episode_number' in episode else episode['guid'],
214 'Description': '',
215 'Thumbnail': new_season['Thumbnail'],
216 'Poster': new_show['Poster'],
217 'Rating': '',
218 'Start': 0,
219 'Stop': 0,
220 'Duration': 0,
221 'Playlist_URL': '',
222 'infoLabels': {},
223 'infoArt': {}
224 }
225
226 if 'description' in episode:
227 if episode['description'] is not None:
228 new_episode['Description'] = episode['description']
229 if 'thumbnail' in episode:
230 if 'url' in episode['thumbnail']:
231 new_episode['Thumbnail'] = episode['thumbnail']['url']
232 elif episode['thumbnail'] is not None:
233 new_episode['Thumbnail'] = episode['thumbnail']['href']
234 if 'background_image' in episode:
235 if 'url' in episode['thumbnail']:
236 new_episode['Poster'] = episode['background_image']['url']
237 elif episode['background_image'] is not None:
238 new_episode['Poster'] = episode['background_image']['href']
239
240 for airing in episode['airings']:
I could open a bug report or create a PR but I'm sure there is a better way to fix this...