Skip to content

[plugin.video.cbc] v4.0.23#4749

Open
micahg wants to merge 1 commit intoxbmc:matrixfrom
micahg:matrix
Open

[plugin.video.cbc] v4.0.23#4749
micahg wants to merge 1 commit intoxbmc:matrixfrom
micahg:matrix

Conversation

@micahg
Copy link

@micahg micahg commented Feb 15, 2026

Description

  • Add back missing live channels
  • Better live event handling
  • Better EPG error handling
  • Remove dead code and fix match bug

Checklist:

  • My code follows the add-on rules and piracy stance of this project.
  • I have read the CONTRIBUTING document
  • Each add-on submission should be a single commit with using the following style: [plugin.video.foo] v1.0.0

Additional information :

  • Submitting your add-on to this specific branch makes it available to any Kodi version equal or higher than the branch name with the applicable Kodi dependencies limits.
  • add-on development wiki page.
  • Kodi pydocs provide information about the Python API
  • PEP8 codingstyle which is considered best practice but not mandatory.
  • This add-on repository has automated code guideline check which could help you improve your coding. You can find the results of these check at Codacy. You can create your own account as well to continuously monitor your python coding before submitting to repo.
  • Development questions can be asked in the add-on development section on the Kodi forum.
  • If you see no activity on your PR after a week (so at least one weekend has passed) then please go to the #kodi-dev freenode IRC channel to reach out to the team

@micahg micahg marked this pull request as ready for review February 15, 2026 18:10
@micahg micahg marked this pull request as draft February 15, 2026 18:15
@micahg
Copy link
Author

micahg commented Feb 15, 2026

@kodiai review again please

Copy link

@kodiai kodiai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kodiai response

Decision: APPROVE
Issues: none

@micahg micahg marked this pull request as ready for review February 15, 2026 22:06
@kodiai
Copy link

kodiai bot commented Feb 15, 2026

Kodiai Review Summary

What Changed

Version bump to 4.0.23 adding back missing live channels, improving live event handling and EPG error handling, removing dead code and fixing match compatibility bug.

Reviewed: core logic

Strengths

  • ✅ Python 3.10+ compatibility fix: replaced match/case with if/elif chains (gemv2.py:224-234)
  • ✅ Added request timeout to prevent hanging on slow/unresponsive EPG servers (epg.py:96)
  • ✅ Live event timestamp validation prevents attempting to play future streams (gemv2.py:217-220, default.py:188-190)

Observations

Impact

[MAJOR] plugin.video.cbc/resources/lib/epg.py (110-113): Null pointer dereference when HTTP request fails
When call_guide_url() returns None (on HTTP error or timeout), BeautifulSoup(data, ...) and subsequent .find() calls will crash with AttributeError.

[MAJOR] plugin.video.cbc/resources/lib/epg.py (132): Missing null check causes AttributeError
When cell.find('dd') returns None (malformed HTML), calling .get_text() raises AttributeError and crashes EPG update.

[MEDIUM] plugin.video.cbc/resources/lib/gemv2.py (33): Bare except clause masks errors
Bare except: at line 33 silences all exceptions including SystemExit and KeyboardInterrupt, making debugging difficult when JSON parsing fails for unexpected reasons.

Suggestions

  • Optional: Add structured exception handling in EPG parser to gracefully skip malformed program entries
  • Future consideration: Consider adding retry logic for transient HTTP failures in EPG updates

Verdict

🔴 Address before merging -- 3 blocking issue(s) found

Review Details
  • Files reviewed: 7
  • Lines changed: +171 -110
  • Profile: balanced (auto, lines changed: 281)
  • Author: core (adapted tone)
  • Findings: 0 critical, 2 major, 1 medium, 0 minor (includes 3 from summary observations)
  • Review completed: 2026-02-15T22:10:23.970Z
  • Keyword parsing:
    • ignored [plugin.video.cbc]

@micahg
Copy link
Author

micahg commented Feb 16, 2026

@kodiai review again pls

@kodiai
Copy link

kodiai bot commented Feb 16, 2026

kodiai response

Decision: NOT APPROVED

Issues:

  • (1) [critical] plugin.video.cbc/resources/lib/epg.py (67, 118): Null pointer dereference when HTTP request fails. When call_guide_url() returns None at line 67, code continues to line 72 attempting BeautifulSoup(data, ...) on NoneType. Similarly at line 118, when call_guide_url() returns None, execution continues to line 122 with BeautifulSoup(data, ...) causing crash.
  • (2) [major] plugin.video.cbc/resources/lib/gemv2.py (33): Bare except: clause catches all exceptions including SystemExit/KeyboardInterrupt. Should specify exception type like except (ValueError, json.JSONDecodeError):.
  • (3) [minor] plugin.video.cbc/resources/lib/cbc.py (26): Bare except: clause should specify exception type to avoid catching system exceptions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant