Find trigger for loading artwork / restarting countdown

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

Find trigger for loading artwork / restarting countdown

Postby Fax » 26 Apr 2016, 23:48

Hi,

I would like to add lyrics to the coverart page. It works so far but I try to find out how to reload the lyrics script when the next song starts.
So I wonder if you could give me a hint where to look for the trigger that reloads cover and title and restarts the countdown.

Thanks in advance
Fax
Fax
 
Posts: 3
Joined: 26 Apr 2016, 23:40

Re: Find trigger for loading artwork / restarting countdown

Postby PeteB » 27 Apr 2016, 04:11

Hello, and welcome to the forum!

You could look at some of the code used to display artist and song title on a 2x16 character display. If I understand it correctly, they use mpc commands to read what is currently playing. The current track title is compared to the previous, saved, track title, and when it changes, the display string is updated.

You could use that method to detect when the next song starts.

The mpc command is executed each time in a loop, and the output is parsed to detect if a track is being played, the name of the track, and the name of the artist. If the track name is different from the last pass, the song changed.

P.
PeteB
 
Posts: 421
Joined: 06 Feb 2016, 05:07

Re: Find trigger for loading artwork / restarting countdown

Postby hondagx35 » 27 Apr 2016, 09:45

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

Re: Find trigger for loading artwork / restarting countdown

Postby Fax » 27 Apr 2016, 11:07

Thanks.

Can you give me a hint how to integrate a shell exec script there (e.g.: "shell_exec("inc/getlyrics.sh");")?
Fax
 
Posts: 3
Joined: 26 Apr 2016, 23:40

Re: Find trigger for loading artwork / restarting countdown

Postby hondagx35 » 27 Apr 2016, 16:38

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

Re: Find trigger for loading artwork / restarting countdown

Postby Fax » 27 Apr 2016, 20:55

Fax
 
Posts: 3
Joined: 26 Apr 2016, 23:40

Re: Find trigger for loading artwork / restarting countdown

Postby hondagx35 » 28 Apr 2016, 23:14

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

support RuneAudio Donate with PayPal


Return to General discussion

Who is online

Users browsing this forum: No registered users and 25 guests