tr.classList.add(CLS_PLAYLIST_ROW);
const td_entry_control = new_child_to('td', tr);
td_entry_control.classList.add('entry_control');
- if (data.title_digest == file.digest) {
+ if (i == data.idx) {
td_entry_control.textContent = 'playing'; }
else {
for (const [symbol, prefix] of [['>', 'jump'],
'last_update': self.server.player.last_update,
'running': self.server.player.is_running,
'paused': self.server.player.is_paused,
- 'title_digest': digest,
+ 'idx': self.server.player.idx,
'title_tags': tags,
'title': title}
if 'playlist' in params.as_dict:
self._kill_mpv()
self._start_mpv()
+ @property
+ def idx(self) -> int:
+ """Read-only access to ._idx."""
+ return self._idx
+
@property
def empty(self) -> bool:
"""Return if playlist empty."""