Skip to content

Conversation

@anohren
Copy link
Collaborator

@anohren anohren commented May 13, 2025

When a start index for a playlist is specified and videos preceding it are excluded from the Kodi play queue, the start index needs to be adjusted.

Haven't tried this, just did a quick edit in the browser

When a start index for a playlist is specified and videos preceding it are excluded from the Kodi play queue, the start index needs to be adjusted.
brevilo referenced this pull request May 13, 2025
* dash_builder: add bitrates if available

* Overhaul stream selection logic

* fix stream resolution comparison

* fix audio-only check for DASH manifest building

* make playlists without distinct URLs play *something*
@brevilo
Copy link
Collaborator

brevilo commented May 13, 2025

I'd like to understand the reasoning. How is the playlist supposed to be filled/structured here, and what's special about startingEntry such that it gets treated separately?

@anohren
Copy link
Collaborator Author

anohren commented May 14, 2025

Thanks for taking a look.

You have the background in #60 and #63, but in short this is only relevant when the user has specified both a playlist and an index to start playing from. The startingEntry needs to be treated separately because it is the only entry that will have a corresponding List Item with a resolved playable video URL, while every other List Item has a recursive URL pointing back to the plugin for lazy resolution. Trying to play a recursive List Item directly from the plugin will crash upon plugin reentry (last time it was tested) so the first played List Item must be resolved. Update: The background for why the others must be lazily resolved can be found in #20.

Kodi's play queue needs to be filled with the unresolved entries first, in order to be able to insert the resolved starting entry (List Item) at its proper position (as seen in the supplied playlist). Since excluding any playlist item from Kodi's play queue will invalidate every subsequent externally sourced playlist index for use in Kodi's internal play queue, we'd need to compensate for that lest the starting video will be in the wrong position relative to the other queued videos (that all come from the same external playlist).

Taking a closer look I did forget that I'm doing a pop from unresolvedEntries so I don't need to check for == startingIndex. Update: Corrected.

@anohren
Copy link
Collaborator Author

anohren commented Jun 2, 2025

Did that make sense?

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.

3 participants