[script.wetrakr] 1.1.6#2835
Conversation
Kodiai Addon Check✅ No issues found by kodi-addon-checker. |
Review completed with reduced scope. |
Review Details
|
| def _dispatch_async(target, *args, **kwargs): | ||
| """Run a callable in a daemon thread; never blocks the caller.""" | ||
| t = threading.Thread(target=target, args=args, kwargs=kwargs) | ||
| t.daemon = True | ||
| t.start() | ||
| return t |
There was a problem hiding this comment.
[MAJOR] Background threads lack exception handling. If target raises an exception after the thread starts, it won't be caught by the callback's try-except blocks and won't be logged via Kodi's logging system (player.py:150-152, 198-200, 255-257, 342-349, 351-353, 390).
Only _send_scrobble() (line 427-432) wraps its call with proper error handling via the inner _send() function. All other _dispatch_async() calls risk silent failures that make debugging difficult.
| def _dispatch_async(target, *args, **kwargs): | |
| """Run a callable in a daemon thread; never blocks the caller.""" | |
| t = threading.Thread(target=target, args=args, kwargs=kwargs) | |
| t.daemon = True | |
| t.start() | |
| return t | |
| def _dispatch_async(target, *args, **kwargs): | |
| """Run a callable in a daemon thread; never blocks the caller.""" | |
| def _wrapped(): | |
| try: | |
| target(*args, **kwargs) | |
| except Exception as e: | |
| xbmc.log("[WeTrakr] Background thread error: {}".format(str(e)), xbmc.LOGERROR) | |
| t = threading.Thread(target=_wrapped) | |
| t.daemon = True | |
| t.start() | |
| return t |
Wrap target callable in try/except so unhandled exceptions are piped through xbmc.log(LOGERROR) instead of dying silently. Addresses the review comment from kodiai bot on PR xbmc#2835. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
LGTM |
Update to WeTrakr Scrobbler (
script.wetrakr) v1.1.6.Changes since 1.1.4
v1.1.6
v1.1.5
VideoPlayer.UniqueIDinfolabel when JSON-RPCuniqueidcomes back empty. Enables correct media resolution for items played outside Kodi's local library (Jellyfin for Kodi, Plex Kodi Connect).The full changelog is also embedded in
addon.xmlunder<news>.