-
Notifications
You must be signed in to change notification settings - Fork 342
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
command/file: add command "readlyrics" #653
Conversation
How does your change deal with multi-line tag values? Lyrics tags are usually multi-line, aren't they? |
What's needed before this can be merged? |
@prat0088 This version doesn't really work with tags with newlines. I reimplemented lyrics support as a |
You added this as a regular MPD tag. This will still break the protocol, because now we have a regular tag with newlines. |
I'm unable to reproduce this. Without the lyrics tag in the |
With a long enough line, libmpdclient will close the connection. |
@@ -1947,7 +1948,7 @@ ver 0.12.0 (2006/9/22) | |||
* New --kill argument for killing MPD if pid_file is specified | |||
* Removed --update-db argument (use the update function in your client instead) | |||
* New mpdconf.example | |||
* New mpd.conf man page | |||
* New mpd.conf man page |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whitespace change?
@@ -1988,7 +1989,7 @@ the write() becomes successful) | |||
7) If "user" is specified, then convert ~ in paths to the user's home path | |||
specified by "user" config paramter (not the actual current user running mpd). | |||
|
|||
ver 0.11.2 (2004/7/5) | |||
ver 0.11.2 (2004/7/5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whitespace change?
@@ -2162,7 +2163,7 @@ non existing file. This causes parsing errors for clients. | |||
ver 0.8.4 (2003/8/13) | |||
1) Fix a bug where garbage is returned with errors in "list" command | |||
|
|||
ver 0.8.3 (2003/8/12) | |||
ver 0.8.3 (2003/8/12) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whitespace change?
:command:`readlyrics {URI}` | ||
Read lyrics from the file specified by "URI". This "URI" | ||
can be a path relative to the music directory or an | ||
absolute path. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does the response look like?
@@ -1275,7 +1280,7 @@ Audio output devices | |||
|
|||
:command:`outputs` | |||
Shows information about all outputs. | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whitespace change?
|
||
void OnLyrics(StringView value) noexcept override { | ||
response.Format("%.*s\n", | ||
int(value.size), value.data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this writes the lyrics right into the stream, raw. How does the client know when the lyrics are finished?
What if there are multiple lyrics tags?
Let's reopen this as soon as you have solved the fundamental problems. |
waiting for this for long time :( |
One possibility could be to print the size of lyrics as a pair before the lyrics. The client can then use the new mpd_recv_raw function to get the lyrics. |
I'm going to try pick this back up, and will probably make a new Merge Request this weekend. I changed it to have the same command API and binary response as I just need to rebase this and clean up the commit first. WIP branch: https://github.com/mxnemu/MPD/tree/unsynced-lyrics |
Implements unsynced lyrics (ID3 "USLT") as a tag.
Not sure if it should be disabled by default (like
TAG_COMMENT
); any feedback/opinions would be appreciated.