Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Problem: how do I know what moode is doing?
#8
(03-28-2021, 07:51 PM)TheOldPresbyope Wrote:
(03-28-2021, 07:07 PM)didomax Wrote:
(03-28-2021, 10:19 AM)adrii Wrote: Hi didomax

Correction: the state will have been previous read from MPD first, and may be 'pause', and so will only be finally be set to 'play' if MPD does not report a status.

Clarification: for the non-MPD players the actual play state is unknown and is simply set to play.

Adrian.

Hi @adrii

Thanks a lot, this goes exactly in the right direction!

The only missing step is the availability of such file through a GET call: does anybody know if there is a way to make these data available through the command API?

Thanks
Max

Well, if you want to try a "heat it and beat it" approach (a phrase I learned from a master welder), just create a symlink to make /var/local/www/currentsong.txt visible to the nginx server. Let's abuse the fact that it can serve up imagery for coverart

Code:
sudo ln -s /var/local/www/currentsong.txt /var/local/www/imagesw/currentsong.txt

Now point your code to

Code:
http://moode.local/imagesw/currentsong.txt

Assuming you've enabled moOde's Metadata file setting under m>Sys config>Local services, you'll see the last written content.

Here, for example, is what is displayed in my web browser while a track is streaming from another moOde player's DLNA server (in this case with BubbleUPnP on my phone as the UPnP control point).

Code:
file=http://192.168.4.26:8200/MediaItems/8321.flac
artist=Miles Davis & Quincy Jones
album=Miles & Quincy Live at Montreux
title=Boblicity
coverurl=
track=2
date=1993
composer=
encoded=VBR
bitrate=758 kbps
outrate=16 bit, 44.1 kHz, Stereo, 1.411 Mbps
volume=57
mute=0
state=play

Regards,
Kent

Kent, 

This is great! I am going to try this asap. 

The output format is not my preferred (JSON would rock  Tongue ), but it looks the whole process is doable, with no big mods of the base Moode system (important whenever I will need to restore the system from a HW failure  Smile ).

I will post the results once available.

Max
Reply


Messages In This Thread
how do I know what moode is doing? - by didomax - 03-27-2021, 09:40 PM
RE: how do I know what moode is doing? - by adrii - 03-28-2021, 10:03 AM
RE: how do I know what moode is doing? - by adrii - 03-28-2021, 10:19 AM
RE: how do I know what moode is doing? - by didomax - 03-28-2021, 08:55 PM

Forum Jump: