Skip to content

refactor: playlist position tracking using player properties#1054

Merged
SyncedSynapse merged 1 commit intoxbmc:masterfrom
gopal-panigrahi:refactor/active-playlistitem
Nov 11, 2025
Merged

refactor: playlist position tracking using player properties#1054
SyncedSynapse merged 1 commit intoxbmc:masterfrom
gopal-panigrahi:refactor/active-playlistitem

Conversation

@gopal-panigrahi
Copy link
Copy Markdown
Contributor

@gopal-panigrahi gopal-panigrahi commented Nov 3, 2025

This PR optimizes playlist position tracking by using PlayerType.PropertyValue.position directly instead of searching through all playlist items by ID comparison. The current implementation uses an O(n) loop to find the active item, but since the player already provides the position, we can access it directly with O(1) complexity. This change improves performance (especially for large playlists), simplifies the code, and maintains all existing functionality including drag detection and UI selection behavior.

closes #1053

@SyncedSynapse
Copy link
Copy Markdown
Member

Looks good, merging

@SyncedSynapse SyncedSynapse merged commit 5c686f6 into xbmc:master Nov 11, 2025
1 check failed
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.

[Enchancement] Optimize playlist position tracking using player properties

2 participants