fix: recover cleanly from failed Elementum playback resolution - #208
Draft
Therand90 wants to merge 3 commits into
Draft
fix: recover cleanly from failed Elementum playback resolution#208Therand90 wants to merge 3 commits into
Therand90 wants to merge 3 commits into
Conversation
Add strict Elementum episode selection for TV metadata, propagate failed/cancelled resolution back to Jacktook, preserve SourceSelect after resolver failure, and use explicit Player.play() for retries after Kodi's original plugin resolution handle has been consumed. Also keep SourceSelect visually intact while resolving and cover the failure/recovery paths with unit tests. Runtime validated on Kodi with repeated selection of an Elementum season pack missing the requested episode.
Replace the Jacktook-specific Elementum resolution session contract with a generic resolution_token query parameter and plugin.video.elementum.resolution_status.<token> property. Runtime validated with repeated failed episode resolution and manual movie buffering cancellation.
Generalize the explicit playback handoff logging and add regression tests covering Kodi handle consumption. The tests verify that the first SourceSelect playback attempt uses the pending setResolvedUrl handle while retries switch to Player.play(), avoiding reuse of an already-consumed Kodi plugin resolution.
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.
Summary
Improve Jacktook's Elementum playback flow when automatic file resolution fails or playback is cancelled.
For TV playback, Jacktook now asks Elementum to keep its automatic file matching behavior but avoid falling back to the manual file picker when no automatic match is found.
Jacktook also tracks Elementum playback resolution through a per-playback token so a failed or cancelled resolution can return cleanly to SourceSelect instead of closing the parent source list.
If the first playback attempt from the same SourceSelect has already consumed Kodi's plugin resolution handle, subsequent attempts use an explicit
Player.play()handoff instead of trying to reuse the stalesetResolvedUrl()handle.Dependencies
This PR depends on two upstream Elementum changes:
skip_file_dialogsupportresolution_token/ resolution statusThis PR is intentionally opened as a draft until those Elementum changes are available upstream.
Behavior
TV Elementum URLs include show / season / episode metadata and request
skip_file_dialog=truewhen those values are valid.Each Elementum playback attempt receives a unique
resolution_token. A failed or cancelled Elementum resolution is detected without coupling Elementum to Jacktook-specific property names.SourceSelect stays open after failed resolution and can retry another source. The first attempt uses Kodi's pending plugin-resolution handle; later attempts from the same SourceSelect use an explicit playback handoff because the original handle has already been consumed.
The SourceSelect resolving state is cleared on failure, and the background no longer fades out while a source is being resolved.
Movie playback keeps the existing Elementum filename-matching behavior.
Testing
git diff --checkpassesRuntime-tested on Kodi / LibreELEC with:
In all tested failure/cancellation cases, playback returns cleanly to SourceSelect and the source list remains usable.