mierak/rmpc

Failed to handle work request for addyt command

Closed this issue · 4 comments

Hello!

I'm giving rmpc a try and I followed the steps in https://mierak.github.io/rmpc/guides/youtube/ for YouTube playback. However, I'm getting an error while trying to add a song:

$ rmpc addyt "https://www.youtube.com/watch?v=ZAt8oxY0GQo"
Failed to handle work request: yt-dlp failed with exit code: Some(1). Check logs for more details.

Then if I try to run it again, it gives me a different error:

Failed to already downloaded youtube video to queue: MpdError: 'Cannot execute command: 'add'. Detail: 'No such song'. Reason: 'resource does not exist'. Cmd idx: '0''

It says check for logs but I couldn't find how to do that. Is there a verbose argument or a log file somewhere? It would be nice to add troubleshooting section to the website for issues like this :)

Alright, it turns out I was missing python-mutagen, but there was no indicator of that from the CLI :/

Yeah the log situation in there is a bit unfortunate. There is a log file located at /tmp/rmpc.log, but running directly from CLI does not create the log file, just the TUI mode itself. TUI should display a short warning about mutagen missing and log it to file as well as yt-dlp's output. There is also the rmpc debuginfo command which will tell you that mutagen is missing.

I will look into improving this, thanks!

Fixed in #76

Rmpc now logs warnings and errors to stderr in CLI mode. The log level can be overwritten by using the standrard RUST_LOG environment variable.

Missing mutagen now produces this output:
image
it also checks whether the other dependencies are satisfied.

Perfect, thanks a lot!