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

brittle parsing of outputs response #12

Open
grobian opened this issue Sep 5, 2024 · 0 comments
Open

brittle parsing of outputs response #12

grobian opened this issue Sep 5, 2024 · 0 comments

Comments

@grobian
Copy link

grobian commented Sep 5, 2024

https://github.com/Difegue/MpcNET/blob/ddd090c6d0ccd116696043c8b32b44a831f148e8/Sources/MpcNET/Commands/Output/OutputsCommand.cs#L38C86-L38C87

This assumes MPD server will emit 4 lines (excluding attributes) for all outputs. This may change, or just be different on other implementations (such as owntone's MPD: https://github.com/owntone/owntone-server/blob/master/src/mpd.c#L3797-L3807).

In the future MPD might add (or remove) keys here, and perhaps it is safer to run through all lines and use outputid as marker for a new output instead of assuming it's once very 4 lines.

(I've got a PR to rectify owntone's output for the moment in owntone/owntone-server#1804)

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

No branches or pull requests

1 participant