Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: format media_position_updated_at attribute as ISO time #1402

Merged
merged 2 commits into from
Jul 26, 2023

Conversation

Sirs0ri
Copy link
Contributor

@Sirs0ri Sirs0ri commented Jul 25, 2023

Currently the attribute is a timestamp in seconds (because that's what python's time uses) which causes some issues when HAss tries to parse it because JavaScript assumes timestamps are in milliseconds. Formatting the time as ISO String (YYYY-mm-DDTHH:MM+HHMM) makes parsing errors much less likely.

Closes #1401

Currently it's a timestamp in seconds which causes some issues when HAss tries to parse it because JavaScript assumes timestamps are in milliseconds. Formatting the time as ISO String (YYYY-MM-DDTHH:mm+HHMM) makes parsing errors much less likely. 

Closes music-assistant#1401
@marcelveldt
Copy link
Member

Nice catch and thanks for implementing the solution right away!
I assume you did test the outcome on your setup ?

marcelveldt
marcelveldt previously approved these changes Jul 25, 2023
Copy link
Member

@marcelveldt marcelveldt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, thanks!

@Sirs0ri
Copy link
Contributor Author

Sirs0ri commented Jul 26, 2023

Yep, been testing it locally and I haven't found any issues so far!

@marcelveldt marcelveldt merged commit 3d29874 into music-assistant:main Jul 26, 2023
@Sirs0ri Sirs0ri deleted the patch-1 branch July 28, 2023 11:07
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.

HomeAssistant: media_position_updated_at supplied as UNIX timestamp in seconds
2 participants