mierak / rmpc

A configurable, terminal based Media Player Client with album art support via various terminal image protocols
https://mierak.github.io/rmpc/
BSD 3-Clause "New" or "Revised" License
138 stars 8 forks source link

Failed to handle work request for addyt command #74

Closed orhun closed 1 month ago

orhun commented 1 month ago

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 :)

orhun commented 1 month ago

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

mierak commented 1 month ago

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!

mierak commented 1 month ago

Fixed in https://github.com/mierak/rmpc/pull/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.

orhun commented 1 month ago

Perfect, thanks a lot!