[script.punchplay] 1.5.2 - #2884
Conversation
|
| Filename | Overview |
|---|---|
| script.punchplay/resources/lib/library_events.py | Adds live watched-toggle batching and echo suppression, but the previously reported timestamp-only suppression defect remains. |
| script.punchplay/resources/lib/player.py | Adds asynchronous ordered playback posting and supplies recent-item timestamps consumed by the outstanding echo-suppression path. |
| script.punchplay/resources/lib/pull_sync.py | Implements PunchPlay-to-Kodi watched and resume synchronization with incremental checkpoints and per-item retries. |
| script.punchplay/resources/lib/api.py | Adds serialized token refresh, authentication generations, account-pinned replay, and device-login backoff. |
| script.punchplay/resources/lib/service.py | Integrates live and pull synchronization with the shared background network worker and service lifecycle. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
K[Kodi library update] --> L[LiveWatchedSync queue]
P[Playback timestamp] --> E[Echo suppression]
U[Pull-sync write timestamp] --> E
L --> E
E -->|accepted| B[Build import entry]
B --> W[Background post worker]
W --> A[PunchPlay API]
A -->|failure| Q[Offline queue]
Q --> W
Reviews (2): Last reviewed commit: "[script.punchplay] 1.5.2" | Re-trigger Greptile
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 088441dfc4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
both findings were real bugs, not false positives. Fixed and force-pushed:
Also shrank
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 601c774ff9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9a67a9c098
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Two more real findings from the Codex review, both fixed and force-pushed:
Regression tests added for both. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4cf315a314
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Updated once more after a deeper self-review of the full diff surfaced a few more real issues before they could show up as further review comments here:
kodi-addon-checker and the full unit suite (89 tests) pass clean against the updated tree. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8b94242354
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Updated once more after a further review pass against this branch's actual baseline. Additional fixes in this push:
kodi-addon-checker and the full unit suite (99 tests) pass clean against the updated tree. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8ad89b5a84
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 700b699e96
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Found and fixed a significant one in this update, confirmed against a real user report and reproduced locally. The token-refresh request built its own bare headers and was the only outbound call in the addon skipping the User-Agent every other request sends. A bare Reproduced locally with a token that had been expired since the previous day's login: before the fix, every scrobble attempt failed and queued, on a fresh restart, with the 403 visible in the log on every retry. After routing the refresh call through the same header-building path as everything else, the identical expired-token scenario refreshed silently with no relogin needed. Also included: a guard against a request from a since-replaced login (different account, or logout) retrying with the wrong account's credentials after a refresh. kodi-addon-checker and the full unit suite (107 tests) pass clean against the updated tree. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9d04625028
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
One more real bug found and fixed, confirmed live: quitting Kodi while something was playing never sent the stop event.
Fixed by routing Verified live: played a title, quit Kodi mid-playback, confirmed the stop event (with correct position) now appears in the log immediately before shutdown — previously nothing was logged at all for that case. kodi-addon-checker and the full unit suite (108 tests) pass clean against the updated tree. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1178ad80fb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Went back through the review comments on this PR to check which findings were still genuinely open against the current tree. Two were still real:
kodi-addon-checker and the full unit suite (111 tests) pass clean against the updated tree. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 59bec2eccd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Updated with a round of reliability fixes, most notably the actual root cause of the "keeps disconnecting" reports we'd been chasing:
113 unit tests passing, |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 09bc6f7794
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Two more fixes from this round, both closing out Codex findings on the previous revision (replied inline on each):
116 unit tests passing (3 new, 2 fixed to use realistic per-episode-varying ids instead of an unrealistic same-id-across-episodes fixture that had masked the second bug), |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 486fb92ce6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
One more fix this round, closing out the latest Codex finding (replied inline): A stale offline event could reach the backend after a new playback's start. Starting playback dispatches immediately on the post worker, while the offline queue only drains on the service loop's independent 60-second timer — a different thread with no ordering relationship to the new start. If connectivity returns right as a new item begins playing, a stop/progress event left over from a session that ended offline could still be sitting queued, and the periodic flush could deliver it after the new start — landing as the more recent event on the backend and clobbering the now-playing state the start just set. Starting playback now drains the offline queue first, on the same single-threaded post worker immediately ahead of the start job — both still run async off Kodi's callback thread, so this doesn't reintroduce the blocking problem the original callback-thread flush was removed for. 118 unit tests passing (2 new), |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4d4bbe081f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
This round is proactive hardening rather than a reply to a specific finding here — it came out of a broad internal review of the whole offline-queue/post-worker mechanism this PR has been building up over several rounds, then independently cross-checked before landing:
125 unit tests passing (17 new), |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 161dee8cc1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Two more fixes this round, continuing to harden the offline-queue mechanism:
131 unit tests passing (6 new), |
|
@greptileai review |
Changes
Updates the addon from 1.3.0 (currently on the official repo) to 1.5.2. Summary of what changed across that range:
Sync
Reliability
Ratings
113 unit tests passing,
kodi-addon-checker --branch omegaclean.Checklist: