Page 1 of 1

Airplay issue

PostPosted: 23 Feb 2018, 17:58
by irishwill2008
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

Re: Airplay issue

PostPosted: 23 Feb 2018, 19:24
by janui
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

Re: Airplay issue

PostPosted: 26 Feb 2018, 10:58
by irishwill2008
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