Moode Forum
Isolate external engines and refactor AirPlay - Printable Version

+- Moode Forum (https://moodeaudio.org/forum)
+-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3)
+--- Forum: Feature requests (https://moodeaudio.org/forum/forumdisplay.php?fid=8)
+--- Thread: Isolate external engines and refactor AirPlay (/showthread.php?tid=13)



Isolate external engines and refactor AirPlay - RafaPolit - 04-06-2018

Hi Tim,

In my never-ending quest to integrate Spotify into Moode, I did yesterday some reverse engineering into the AirPlay service and may have found some issues.

The AirPlay rendering of the UI uses a recurrent Ajax request that gets fulfilled only when it reaches a certain level of completion. This can be even a couple of minutes of playing the same song. But how it accomplishes this may be the source of why metadata through AirPlay is mostly hit or miss.

I did a test with sockets instead of this archaic approach of non-fulfilling-requests and it gets certainly more stable and reliable. Maybe it's worth looking into that approach?

Also, the airplayactv variable is not centralized correctly, it is used here and there, so adding another service like Spotify or maintaining the AirPlay becomes really cumbersome.

I think that isolating the Player to a state of 'external engine' and then having each engine just pass the required variables to the player would be much easier than going on and adding more "and"s and "or"s everywhere.

What do you think? I could invest some time on achieving this if you think is something that could be useful and create a pull request.

Hope this helps,
Rafa.


RE: Isolate external engines and refactor AirPlay - Tim Curtis - 04-06-2018

Hi Rafa,

I actually dropped the Airplay metadata feature from upcoming moOde 4.1 due its unreliability, but if you have a reliable solution or approach then I'll be happy to have a look at it :-)

moOde 4.1 also includes a central mechanism that detects when Airplay, Bluetooth or Squeezelite renderers are active and then alters the UI to reflect this. Its also used to enable "Resume MPD after Bluetooth" feature :-)

-Tim