Disclaimer: I’m not a programmer! My experience is limited to playing around with arduino stuff.
So I spent this weekend installing and getting to grips with Qt Creator. It seems pretty straightforward and I’ve got it compiling on my Ubuntu VM. I had a hell of a job trying to get local cross-compiling working, mainly due to incompatible libraries and no Pi Zero to easily pull from. I have ordered a Pi Zero to assist which should arrive later in the week.
Anyway… I butchered Marton’s Spotify one and got it working.
I had to make some changes to the mediaplayer component too, the most critical was setting up the SPEAKER_CONTROL page. I created a CardSpeakerControl.qml. I just used the AlbumModel to store the data and it seems to work nicely (I would propose creating a SpeakerModel in the future to hold more information including supported features). I changed the title from Speakers to Players as it seems more generic and makes more sense for Plex and any other video based systems?
I added some additional context items as well - SHUFFLE, QUEUE and CONNECT (for the speakers). In the mediaplayer code I added the following complementary commands as well: ADD_TO_QUEUE, SHUFFLE, CHANGE_SPEAKER, GET_SPEAKERS.
I don’t think anything is too controversial there as I just extended what was there previously and it shouldn’t break anything as they are optional controls?
Perhaps more controversially I extended the type definition to include Movies, Shows and Episodes as these are need for Video based media players. I would propose that the search page is refined to only show the types that are returned . This means that audio integrations will never show Movies, etc.
That’s about it for now. I haven’t tested this on my remote as I am waiting on another Zero to turn up. If anyone knows an easy way of cross-compiling by pulling the required ARMv6 libraries without a slave Zero I would love to hear it! I guess it’s a one time thing so maybe someone could host a slimmed down root filesystem??? I think guidance on cross-compiling is worth adding to the Wiki??
On the Plex side of things, I have only done cursory testing with video and movies. The biggest hurdle is that I haven’t got ADD_TO_QUEUE to work with the API at the moment. I’m not sure of what is required. I’m currently trying [server address]/playQueues/[playQueueID]?type=[content type]&uri=[server path or server://machineIdentifier/com.plexapp.plugins.library]/library/metadata/[contentId]&repeat=0&own=1 but while I’m not getting an error nothing is being added to the queue. Worse when I try to refresh the queue via [player address]/player/playback/refreshPlayQueue?playQueueID=[playQueueID] it crashes the player!
Once I’ve got this working on the remote, Marton let me know if you’d like to roll anything up more generally? I have no idea how GitHub works so would appreciate some guidance. I’ll create another thread on this topic…about reporting bugs and feature requests as I’m a complete noob!