Avoid blocking script in epg.py and content.py when wrong data in json#47
Open
frankdpGH wants to merge 2 commits intoadd-ons:masterfrom
Open
Avoid blocking script in epg.py and content.py when wrong data in json#47frankdpGH wants to merge 2 commits intoadd-ons:masterfrom
frankdpGH wants to merge 2 commits intoadd-ons:masterfrom
Conversation
Handle cases where 'images' may not be present in card data.
Avoid blocking script for epg in case of wrong data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Error epg.py :
2026-03-09 14:17:09.539 T:84 info : [plugin.video.play] [resources.lib.play.epg] Date is 2026-03-07 and channel is play
title': 'Achter De Schermen - S7 - Aflevering 8', 'type': 'video'}, 'published': True, 'shortFormType': None, 'subtype': 'longForm', 'type': 'video', 'uuid': 'd32cf133-abb5-4a5a-b936-19eeea65e510'}, 'wonId': '#108 - Dina Tersago bezorgt ons een lumbago | met Lukas Lelie'
File "/.Kodi/data/addons/plugin.video.play/resources/lib/play/epg.py", line 162, in _parse_program
won_id=int(data['program']['wonId']) if data['program']['wonId'] else None,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: '#108 - Dina Tersago bezorgt ons een lumbago'
Error in content .py :
2026-03-09 18:48:19.881 T:83 info : [plugin.video.play] [resources.lib.play.content] Card_Video : {'uuid': '3a5787d9-a639-4d3f-881d-0d4376b8831a', 'title': "Klara's gekke treinavontuur", 'images': [], 'type': 'PROGRAM', 'subtitle': None, 'parentalRating': 'AL', 'category': None, 'categoryId': None, 'badge': None, 'brand': 'kinepolis', 'duration': None, 'position': None, 'teaser': None}
File "/.Kodi/data/addons/plugin.video.play/resources/lib/play/content.py", line 603, in _parse_cards_data
poster=card.get('images')[0].get('url'),
~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range