InputUsername/rescrobbled

Does MPRIS expose Genre

Closed this issue · 13 comments

Does MPRIS expose Genre? If so it'd be nice to be able to filter on genre,

It does actually, and it seems reasonable to allow filtering on it. Should be easy enough to add! (famous last words)

Thanks or looking into it. Would be nice for filtering Podcasts.

@bonelifer
Do you use Spotify? If so, I may have bad news: Spotify unfortunately doesn't expose the genre property. In fact its MPRIS support is notoriously bad and it basically only provides artist, title and album.

If you still want this feature or don't use Spotify, I will try to implement this for the next release.

Yes I would. I download my podcasts with GPodder and will be using MPD with a mpd MPRIS client.

Great, thanks! Would you be willing to test this feature before release?

Sure. I need to setup one of the MPRIS clients first as I have been deep diving into github/gist and google for interesting MPD related scripts.

@bonelifer thanks. Genre filtering is implemented on the filter-genre branch. I can also send over a binary if needed.

Apologies for the late reply.

Going to test later. But have this problem with the systemd file:

william@william:/etc/systemd/system$ sudo systemctl status rescrobbled.service 
● rescrobbled.service - An MPRIS scrobbler
     Loaded: loaded (/etc/systemd/system/rescrobbled.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Tue 2022-06-14 11:02:31 CDT; 9min ago
       Docs: https://github.com/InputUsername/rescrobbled
   Main PID: 34145 (code=exited, status=1/FAILURE)

Jun 14 11:02:31 william systemd[1]: Started An MPRIS scrobbler.
Jun 14 11:02:31 william rescrobbled[34145]: Authenticated with Last.fm successfully!
Jun 14 11:02:31 william rescrobbled[34145]: Error: Failed to connect to D-Bus
Jun 14 11:02:31 william rescrobbled[34145]: Caused by:
Jun 14 11:02:31 william rescrobbled[34145]:     D-Bus call failed: "Unable to autolaunch a dbus-daemon without a $DISPLAY for X11"
Jun 14 11:02:31 william systemd[1]: rescrobbled.service: Main process exited, code=exited, status=1/FAILURE
Jun 14 11:02:31 william systemd[1]: rescrobbled.service: Failed with result 'exit-code'.

OS: Xubuntu 20.04.4

No it gets better, tried re-enabling it again, now this status error:

william@william:/etc/systemd/system$ sudo systemctl status rescrobbled.service 
● rescrobbled.service - An MPRIS scrobbler
     Loaded: loaded (/etc/systemd/system/rescrobbled.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Tue 2022-06-14 11:20:25 CDT; 2min 15s ago
       Docs: https://github.com/InputUsername/rescrobbled
   Main PID: 36685 (code=exited, status=203/EXEC)

Jun 14 11:20:25 william systemd[1]: Started An MPRIS scrobbler.
Jun 14 11:20:25 william systemd[36685]: rescrobbled.service: Failed to execute command: No such file or directory
Jun 14 11:20:25 william systemd[36685]: rescrobbled.service: Failed at step EXEC spawning /root/.cargo/bin/rescrobbled: No such file or directory
Jun 14 11:20:25 william systemd[1]: rescrobbled.service: Main process exited, code=exited, status=203/EXEC
Jun 14 11:20:25 william systemd[1]: rescrobbled.service: Failed with result 'exit-code'.

Forget those errors. Restarted and all is well. Error randomly returned. Switch to running it via session Autostart entry, works. Such a weird day. Will report back later.

Ok, tested. Works. Thanks for your work.

Perfect, thank you! I'll release this in the next version, hopefully soon.

@bonelifer I've just released version 0.6.0 which includes this functionality!