Grabbing currently playing

General discussion about RuneAudio. Do not post any support or feature requests here.

Grabbing currently playing

Postby CowJam » 05 Feb 2017, 14:12

Is there an easy way to get what's currently playing (artist and track)? I'd like to show it somewhere without showing the full playback page.
CowJam
 
Posts: 2
Joined: 05 Feb 2017, 14:08

Re: Grabbing currently playing

Postby hondagx35 » 05 Feb 2017, 17:12

Hi CowJam.

- on your device (console)
Code: Select all
root@runeaudio(rw):~# mpc
Santana - Europa
[playing] #7/67   1:11/4:56 (23%)
volume: 66%   repeat: off   random: off   single: off   consume: off
ERROR: Failed to decode http://192.168.0.98:3434/3965488131

or
Code: Select all
root@runeaudio(rw):~# redis-cli get act_player_info
"{\"volume\":\"66\",\"repeat\":\"0\",\"random\":\"0\",\"single\":\"0\",\"consume\":\"0\",\"playlist\":\"3\",\"playlistlength\":\"67\",\"mixrampdb\":\"0.000000\",\"state\":\"play\",\"song\":\"6\",\"songid\":\"7\",\"time\":\"296\",\"elapsed\":\"0\",\"bitrate\":\"320\",\"audio\":\"44100:24:2\",\"error\":\"Failed to decode http:\\/\\/192.168.0.98:3434\\/3965488131\",\"nextsong\":\"7\",\"nextsongid\":\"8\",\"OK\":null,\"song_percent\":0,\"audio_sample_rate\":\"44.1\",\"audio_sample_depth\":\"24\",\"audio_channels\":\"Stereo\",\"changed\":\"player\",\"currentartist\":\"Santana\",\"currentsong\":\"Europa\",\"currentalbum\":\"Hits of Santana\",\"currentcomposer\":null,\"fileext\":\"mp3\",\"file\":\"NAS\\/Musik\\/Audiophile Stream Network\\/3\\/Santana - Europa.mp3\",\"radioname\":null,\"actPlayer\":\"MPD\"}"


- from a remote location
Code: Select all
root@runeaudio(rw):~# telnet 192.168.0.24 6600
Trying 192.168.0.24...
Connected to 192.168.0.24.
Escape character is '^]'.
OK MPD 0.19.0
currentsong
file: NAS/Musik/Audiophile Stream Network/2/Audiophile Stream Network/Imagine Dragons - On Top Of The World (1).mp3
Last-Modified: 2016-10-22T22:28:46Z
Artist: Imagine Dragons
AlbumArtist: Various Artists
ArtistSort: Imagine Dragons
AlbumArtistSort: Various Artists
Title: On Top of the World
Album: The Angry Birds Movie (Original Motion Picture Soundtrack)
Track: 4/14
Date: 2016-05-06
Disc: 1/1
MUSICBRAINZ_ALBUMARTISTID: 89ad4ac3-39f7-470e-963a-56509c546377
MUSICBRAINZ_ARTISTID: 012151a8-0f9a-44c9-997f-ebd68b5389f9
MUSICBRAINZ_ALBUMID: 46ddc4d7-b48c-4d0b-a5e3-0ff0296810b8
MUSICBRAINZ_RELEASETRACKID: 46322a85-77ee-4ac3-93bd-0292995a4311
MUSICBRAINZ_TRACKID: 3b2cc0d6-88d0-4eed-ab4a-dd85cf3066fd
Time: 189
Pos: 7
Id: 8
OK


Frank
User avatar
hondagx35
 
Posts: 3042
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: Grabbing currently playing

Postby CowJam » 05 Feb 2017, 21:34

that's awesome, thanks
CowJam
 
Posts: 2
Joined: 05 Feb 2017, 14:08

Re: Grabbing currently playing

Postby irishwill2008 » 14 Feb 2017, 12:25

Hi Frank,

As CowJam stated,
that's awesome
. It is indeed! Didnt know you can telnet into mpc. Guess you learn something cool everyday.

I dont need any of this but great for educational purposes!

Regards,

Will.
irishwill2008
 
Posts: 157
Joined: 26 Jul 2016, 14:49
Location: Ireland

Re: Grabbing currently playing

Postby surfninja » 15 Feb 2017, 06:20

Will, you might enjoy this too.

note Frank entered currentsong to get the info.
rAudio 1, Raspberry Pi 2B
rAudio 1, Raspberry Pi 4B
rAudio 1, Raspberry Pi Zero W
surfninja
 
Posts: 95
Joined: 13 Mar 2015, 22:06
Location: Minnesota

support RuneAudio Donate with PayPal


Return to General discussion

Who is online

Users browsing this forum: No registered users and 1 guest