Align xmplaylist metadata selection, adaptive refresh timing, and cached next-track transitions with play-behind-live timestamp#80
Conversation
Agent-Logs-Url: https://github.com/paul-1/plugin-SiriusXM/sessions/d3f58cf7-6417-4b92-9e3e-c6ee08bbd157 Co-authored-by: paul-1 <6473457+paul-1@users.noreply.github.com>
Agent-Logs-Url: https://github.com/paul-1/plugin-SiriusXM/sessions/d3f58cf7-6417-4b92-9e3e-c6ee08bbd157 Co-authored-by: paul-1 <6473457+paul-1@users.noreply.github.com>
|
-If there is no pdt_ file or there is no timestamp in the file, just use the channel metadata. |
Agent-Logs-Url: https://github.com/paul-1/plugin-SiriusXM/sessions/55872c72-26ab-4c7c-9bf7-fb5ba0ac8f0d Co-authored-by: paul-1 <6473457+paul-1@users.noreply.github.com>
Updated in commit Changes made:
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
metatdate refreshes seem to lag. See the attached log. It matched the correct record, but did not update for 2 cycles later> |
Agent-Logs-Url: https://github.com/paul-1/plugin-SiriusXM/sessions/e2012d0d-80fc-429d-a656-9c1d26cc5678 Co-authored-by: paul-1 <6473457+paul-1@users.noreply.github.com>
Agent-Logs-Url: https://github.com/paul-1/plugin-SiriusXM/sessions/e2012d0d-80fc-429d-a656-9c1d26cc5678 Co-authored-by: paul-1 <6473457+paul-1@users.noreply.github.com>
Implemented a fix in commit Metadata update skipping is now based on a canonical signature of the actual metadata content (not xmplaylist No UI changes were made (backend metadata logic only). Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot when the data coming from xmplaylist.com has a track timestamp that is newer than what we are currently playing, use that time offset to schedule the metadata update rather than just the flat METADATA_UPDATE_INTERVAL. If there is no newer track in the data, then fallback to the next check based on METADATA_UPDATE_INTERVAL |
Agent-Logs-Url: https://github.com/paul-1/plugin-SiriusXM/sessions/31bc80a5-4475-4eba-bafb-99f4aed978d6 Co-authored-by: paul-1 <6473457+paul-1@users.noreply.github.com>
Agent-Logs-Url: https://github.com/paul-1/plugin-SiriusXM/sessions/31bc80a5-4475-4eba-bafb-99f4aed978d6 Co-authored-by: paul-1 <6473457+paul-1@users.noreply.github.com>
Implemented in commit Metadata refresh scheduling now uses the nearest xmplaylist track timestamp newer than the current play timestamp ( No UI changes were made (backend scheduling logic only). Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot There seems to be a small time calculation error. The first calculated offset of ~100 at next check was still ~2s away. |
|
@copilot when stopping a stream the metadata does not stop, but gets put in an infinite refresh loop. See attached log |
Agent-Logs-Url: https://github.com/paul-1/plugin-SiriusXM/sessions/c5fce86f-cb8f-4e01-bcc3-c593fe679ab7 Co-authored-by: paul-1 <6473457+paul-1@users.noreply.github.com>
Agent-Logs-Url: https://github.com/paul-1/plugin-SiriusXM/sessions/c5fce86f-cb8f-4e01-bcc3-c593fe679ab7 Co-authored-by: paul-1 <6473457+paul-1@users.noreply.github.com>
... Fixed in commit I added a play-state guard in Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot The last refresh loop issue was due to the way timers are set. Before this Pull Request, the timer was set before updating metadata asynchronously. So stopping a player while the async refresh was happening, would properly clear the timer, and when the async metadata exited, no new timer was set. In this PR the next timer is not set until after the async metadata refresh occurs. The playstate safeguard in the last commit appears to work properly, but can you check that other things are not affected by the asynchronous updates of metadata, potentially exiting after a player state change. |
Agent-Logs-Url: https://github.com/paul-1/plugin-SiriusXM/sessions/7263d41a-a4dd-4708-9f54-c2c46c08aacd Co-authored-by: paul-1 <6473457+paul-1@users.noreply.github.com>
Agent-Logs-Url: https://github.com/paul-1/plugin-SiriusXM/sessions/7263d41a-a4dd-4708-9f54-c2c46c08aacd Co-authored-by: paul-1 <6473457+paul-1@users.noreply.github.com>
Agent-Logs-Url: https://github.com/paul-1/plugin-SiriusXM/sessions/7263d41a-a4dd-4708-9f54-c2c46c08aacd Co-authored-by: paul-1 <6473457+paul-1@users.noreply.github.com>
Agent-Logs-Url: https://github.com/paul-1/plugin-SiriusXM/sessions/7263d41a-a4dd-4708-9f54-c2c46c08aacd Co-authored-by: paul-1 <6473457+paul-1@users.noreply.github.com>
Agent-Logs-Url: https://github.com/paul-1/plugin-SiriusXM/sessions/7263d41a-a4dd-4708-9f54-c2c46c08aacd Co-authored-by: paul-1 <6473457+paul-1@users.noreply.github.com>
Agent-Logs-Url: https://github.com/paul-1/plugin-SiriusXM/sessions/7263d41a-a4dd-4708-9f54-c2c46c08aacd Co-authored-by: paul-1 <6473457+paul-1@users.noreply.github.com>
Checked and hardened this path in commit I added async callback state-safety guards so a metadata response is ignored if player state was removed/superseded, playback has stopped, or channel changed before the callback returns. I also bound each async request to a per-state request sequence token so stale responses cannot update metadata or schedule the next timer after a state transition. No UI changes were made. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot we are polling xmplaylist every 25 seconds until we find new metadata for the next track. We then set the timer to the difference. We should also save that metadata state so that when that timer times we can just set the metadata to what was found, rather than reading the pdt file and polling xmplaylist again for new information. Reading the pdt file and polling xmplaylist.com would resume at the next refresh time of 25s. |
Agent-Logs-Url: https://github.com/paul-1/plugin-SiriusXM/sessions/d75b7846-4258-4cad-bc14-390a93faf08f Co-authored-by: paul-1 <6473457+paul-1@users.noreply.github.com>
Agent-Logs-Url: https://github.com/paul-1/plugin-SiriusXM/sessions/d75b7846-4258-4cad-bc14-390a93faf08f Co-authored-by: paul-1 <6473457+paul-1@users.noreply.github.com>
Agent-Logs-Url: https://github.com/paul-1/plugin-SiriusXM/sessions/d75b7846-4258-4cad-bc14-390a93faf08f Co-authored-by: paul-1 <6473457+paul-1@users.noreply.github.com>
Implemented in commit We now cache the nearest future track metadata returned by xmplaylist along with its delay, and when that delay timer fires we apply the cached metadata directly (no PDT read, no xmplaylist poll). After that local apply, metadata refresh resumes on the normal 25s polling interval. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
This PR aligns SiriusXM metadata behavior with play-behind-live timestamps and improves timer behavior around track transitions and async state changes.
Changes Made
next_update_delay) when a future xmplaylist track timestamp is available.Validation
sxm.pl ... --help).Original prompt
This pull request was created from Copilot chat.