Airplay issue

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

Airplay issue

Postby irishwill2008 » 23 Feb 2018, 17:58

Hey guys,

Wondering if someone has the same issue. When i play a track it loads on the player perfectly! But as soon as i reload runeaudio.local i just get swirls? Digging into this myself i can say that in rune_PL_wrk it seems that /var/run/shairport/now_playing doesnt get read again or looses its values because it doesnt go into the
Code: Select all
if(isset($status["currentartist"]) && ($status["currentartist"] !== "" || $status["currentsong"] !== "" || $status["currentalbum"] !== ""))
               {
statement! I had it spit out in log and it wont go into the if, if i re open the .local page! But as soon as i load a new track, BAM!! The artist, trackname etc loads in?

Is this a bug or? Please let me know what you think.

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

Re: Airplay issue

Postby janui » 23 Feb 2018, 19:24

Hi irishwill2008,
Yes, I have noticed this as well. I also find it rather irritating so looked at the code. The way it works is based on the metadata which it receives. When metadata is received it posts the information. No metadata, no post. When you reload you lose the current metadata and it waits for the next set of metadata.
Is it a bug or part of the design, I don't know? I have a feeling that it should repost the current meta data when reloaded. But this is tricky, initial load and reload are almost the same, but these situations needs to acted on differently.
Personally, I don’t think it is worth the effort to solve the problem with shariport. Better to implement shairport-sync and make that work properly.
janui
User avatar
janui
 
Posts: 699
Joined: 20 Dec 2014, 12:55
Location: Ollanda

Re: Airplay issue

Postby irishwill2008 » 26 Feb 2018, 10:58

Hei janui,

Thanks for the reply!

Perhaps we can save the first output and then just reinitialise it whenever a new connection is made? Then obviously let the original code do its magic whenever the airplay activates for new metadata incomming?

I was setting it in act_player_info then push that back for the stream. Thing is, i wasnt able to control how many it pushes.. I was getting spammed in the GUI with new playback outputs. My code was simple.

Code: Select all
if(isset($status["currentartist"]) && ($status["currentartist"] !== "" || $status["currentsong"] !== "" || $status["currentalbum"] !== ""))
{
}
else
{
ui_render('playback', json_decode($redis->get('act_player_info'), true))
}


Something down those lines! Again, i wasnt able to control how many ui_render it sends so therefore i was getting constant responses back to the GUI. Perhaps you may have an idea as to how we could push 1 response for every connected device? Then just let the original do the new push. <-- If that makes sense :D
irishwill2008
 
Posts: 157
Joined: 26 Jul 2016, 14:49
Location: Ireland

support RuneAudio Donate with PayPal


Return to General discussion

Who is online

Users browsing this forum: No registered users and 4 guests