Decorum for the Forum:
  • Be nice. If you want to be mean, try Reddit.
  • No Piracy. If you want to be a thief, there are dark places on the internet dedicated to that.
  • No Cracking. Discussions on AnyDVD, DeUHD, DVDFab, UHDKeys and similar tools are not permitted here.
  • No Spamming. If you want to make a buck, work smarter... somewhere else.
  • No Adult Content. Half the internet is dedicated to adult content. This half isn't.

Privacy Policy: Click Here to Review (updated September 30, 2020)

Considering New App - Hotkey Monitor

General support forum for Chameleon MediaCenter (formerly MM Browser)
User avatar
Pauven
Posts: 2777
Joined: Tue Dec 26, 2017 10:28 pm
Location: Atlanta, GA, USA
Contact:

Re: Considering New App - Hotkey Monitor

Post by Pauven » Thu Feb 18, 2021 4:14 pm

I've been digging into the app crash issue, and best I can tell is that this is an Android app bug, and that the XML response I'm sending to the app is actually correct.

Interestingly, the app only crashes after playback is confirmed, so it's good enough as-is to initiate playback.

Additionally you can pull up the remote control panel in the app, and successfully pass commands.

So I'm going to go ahead and start implementing all this in the new CMC remote control app. I'll have to create a new bi-directional communications channel between the SysTray app and CMC, so CMC can tell the app if the user needs to select a disc, but this should be pretty easy.

Also, since the SysTray app will be able to receive commands from the MM mobile app even if CMC isn't running, then I probably need to create a routine that if you start playing a disc, that the CMC SysTray app will be smart enough to launch CMC and then begin playback.
President, Chameleon Consulting LLC
Author, Chameleon MediaCenter

User avatar
Pauven
Posts: 2777
Joined: Tue Dec 26, 2017 10:28 pm
Location: Atlanta, GA, USA
Contact:

Re: Considering New App - Hotkey Monitor

Post by Pauven » Thu Feb 18, 2021 7:07 pm

I've got the My Movies mobile Android app successfully communicating with the new CMC SysTray Service:

image.png
image.png (173.78 KiB) Viewed 3739 times

As in my earlier research, the Android app still crashes on the response to the request to "Play My Movies Disc". EDIT: I just tested, and the iOS app does not crash, instead it opens the Remote Control panel, but that's not actually working with my SysTray app yet. But as you can see, there's already enough info to initiate playback in CMC by that stage.

Next step is to set up communications with CMC.
President, Chameleon Consulting LLC
Author, Chameleon MediaCenter

User avatar
Pauven
Posts: 2777
Joined: Tue Dec 26, 2017 10:28 pm
Location: Atlanta, GA, USA
Contact:

Re: Considering New App - Hotkey Monitor

Post by Pauven » Fri Feb 19, 2021 6:18 pm

I just successfully launched a few movies from the Android App, with playback starting in CMC!

It was very clunky, lots of bugs to work out, but it did work.
President, Chameleon Consulting LLC
Author, Chameleon MediaCenter

User avatar
Pauven
Posts: 2777
Joined: Tue Dec 26, 2017 10:28 pm
Location: Atlanta, GA, USA
Contact:

Re: Considering New App - Hotkey Monitor

Post by Pauven » Sat Feb 20, 2021 11:09 am

Progress has been great. Not only have I worked out the playback bugs, but I have it so that the SysTray app will launch CMC if it isn't already running and then start playback.

I also updated the SysTray app to constantly monitor what app has focus. Previously it was only checking if you touched a remote button, but now with being able to send commands from the My Movies app, I changed this to constantly monitor by checking twice a second. I think this works better in general.

In the test below, CMC was not running when I select to play "A Hologram for the King", which only has 1 disc. The CMC_SysTray app saw that CMC didn't have focus and launched it, then sent the request. As the movie only had a single disc, CMC started playback immediately, and that result was passed back to the CMC_SysTray app, which in turn passed it back to the My Movies Android app (which promptly crashed! Brian is aware now).

image.png
image.png (211.54 KiB) Viewed 3724 times

What you can't see in the screenshot is how all this looks in CMC - I think it is pretty slick. CMC will change to the Movie Library if it is in the Music Library, will change the Media Type filter to All Titles, and apply the "Show Everything" hotkey to ensure that all titles are displayed. It will then navigate to the selected title and begin playback, which shows the Movie's FanArt while the ISO is loading. Later, when you return from watching the movie, CMC is focused on the movie you just watched, as if you had manually navigated there. I never saw this feature in WMC, so I'm not sure if I've simply reached WMC's capabilities or exceeded it, but I dare say that what CMC is doing is near perfect. I do need to test with some box-set titles, as that might trip up the auto-navigation step - I probably need to navigate the Box Set instead, and even open it up.

I also added a new optional feature to CMC to skip the "Who's Watching" user prompt on startup, and instead default to the previously selected user. You can still change the user via the Exit menu. I mainly did this because I was getting annoyed at having to select "Paul" every time on PC's that only I use. But this is also a requirement for the SysTray app to launch CMC and begin playback, as the User prompt halts startup progress so playback doesn't start. This new option doesn't disable the PIN prompt, so if the previous user has a PIN then that prompt will still be shown, so ultimately the new feature launch CMC and start playback only works for non-PIN users.

There might be a way in the future to figure out which user sent the request via the app and automatically log in as that user, but as of right now I'm not sure how to do this. There is a Username in the request coming from the app, but this is always my My Movies username for all users, and I'm never bothered setting up additional My Movies users for family members before. Perhaps that's part of the answer.

But to be clear, I did not limit the new My Movies app functionality to CCC users only, it should work with CME and even mymovies.xml users too, as the underlying data is all the same. Though there is a risk that non-CCC users might not have a CMC library that 100% matches My Movies, which could cause some weird playback issues if a title isn't found.
President, Chameleon Consulting LLC
Author, Chameleon MediaCenter

User avatar
Pauven
Posts: 2777
Joined: Tue Dec 26, 2017 10:28 pm
Location: Atlanta, GA, USA
Contact:

Re: Considering New App - Hotkey Monitor

Post by Pauven » Sat Feb 20, 2021 1:46 pm

I went ahead and purchased the Pro version of the My Movies Android app, and that one doesn't crash on playback, nice!

I've also started implementing the remote control buttons. In my initial version, I simply mapped each of the app's remote control button to a Windows virtual key, and that worked okay for the more generic buttons, but not the advanced MCE media buttons. I'm going to enhance this, and run these buttons through the same routine that the MCE IR buttons go through, so the app's butons will be treated exactly the same as a true MCE remote, and you can map them any way you want, per app.

And yes, the My Movies app is able to navigate CMC too. This keeps getting so much better than I had ever dreamt possible.
President, Chameleon Consulting LLC
Author, Chameleon MediaCenter

Teddyboy
Posts: 268
Joined: Wed Apr 25, 2018 10:30 pm
Location: San Diego, Ca

Re: Considering New App - Hotkey Monitor

Post by Teddyboy » Sun Feb 21, 2021 1:04 pm

Paul this is so freaking awesome!
I didn’t think it would be this easy for you to implement. One thing that concerns me is playing movies that do not match what’s in the MyMovies web service. If it doesn’t have a web service ID, then you can’t play it. I know that sounds rather draconian, but maybe for this first round you should have that as a restriction. It just seems to me like a lot of work, and you might end up going down a rabbit hole.
I didn’t think this would come together so quickly. Granted you still have more work to do with bug smashing, but I’m really impressed. Your the only one that has taken the time to extract MyMovies data so it’s usable in a front end. Being able to do a full disc rip (DVD or Blu-Ray) of a tv series to my server and then be able jump to specific episodes using MyMovies data is a big plus for me. I don’t have to spend a ton of time prepping individual episodes for playback.
Mechanical Engineer, Solidworks junkie, Reef aquariums, sci-fi, weight training, orchids, Ferns, Kaiju, model kit building, balboa park, scripps aquarium

User avatar
Pauven
Posts: 2777
Joined: Tue Dec 26, 2017 10:28 pm
Location: Atlanta, GA, USA
Contact:

Re: Considering New App - Hotkey Monitor

Post by Pauven » Sun Feb 21, 2021 2:06 pm

Teddyboy wrote: Sun Feb 21, 2021 1:04 pm One thing that concerns me is playing movies that do not match what’s in the MyMovies web service. If it doesn’t have a web service ID, then you can’t play it.
I assume you're referring to personal home videos? I'm not sure if those would even be in the Mobile App. As I understand it, everything that gets synced to the web gets a WebServiceID (which is a GUID: Globally Unique ID). And since the app only shows what's synced to the web, then that means that everything you can select to play in the app should have a WSID, and be playable in CMC (assuming you're using CCC which syncs everything).

My thinking is that it's nothing to worry about until someone finds a break.

Teddyboy wrote: Sun Feb 21, 2021 1:04 pm I didn’t think it would be this easy for you to implement ... I didn’t think this would come together so quickly.
Ditto. Just like my regret about not implementing a MCE remote handler years ago, I now regret not doing this earlier. Both have been much easier (but not easy) than I feared, and the payoff is huge.

Though there are times in life that as something plays out, I get the feeling that it is happening at exactly the right time, and that had I done it earlier it might have failed or been so much less. With me working on the MCR remote handler these past few weeks, and then just happening to take a look at the My Movies mobile app, two things that go together like peanut butter and jelly, it's just perfect timing. Had I attempted interfacing with the mobile app a year ago, heck even a couple months ago, it would have been something completely different.

It's a weird (but nice) feeling that I get a lot from programming, where I'm forced to learn a new skill on one project, and then seemingly moments later I need that exact skill for another project and I never would have even recognized what skill I needed before I learned it. Or something in life occurs at just the right moment to bring to fruition another project. It's hard to put into words, but perhaps those who've experienced will understand.

Progress Update
I got the My Movies mobile app's remote control buttons now running through a mapping function, where I map them to official MCE buttons, and from there they get processed as if they came from a real MCE remote. Works great. The app also has a couple new non-MCE buttons too, one for launching the "MovieLibrary" and another for "Zoom", so I created fake MCE buttons for them.

I still think that there are more real MCE buttons than I have identified, but I'm not quite sure where to find their definitions, at least not without a remote control to send them through the MCE IR6 receiver. My WMC keyboard doesn't work since I accidentally left the batteries installed while it was in storage for several years (several meaning 6+ years). The batteries sit directly on the PCB, and the battery acid has corroded the traces. I may disassemble the keyboard to properly clean the PCB and maybe repair some traces. Short of that, I might be able to program my Logitech remote to send a few more WMC buttons that aren't normally used (assuming Logitech has any more in their online DB to configure), so I can map them all.

The reason I think there are more is that each remote button has a unique "Byte" value, and a byte can be anything from 0 to 255, so 256 possible values, but there are only 57 buttons currently defined in my table, and there are some suspicious gaps in the ranges. For example the "Blue" button is A1, which progresses to "Teletext" at A5, but then 9 values are skipped and the next button is "Radio" at AF. So that leaves A6 through AE as suspiciously undefined. Most likely they are very rare or manufacturer specific type buttons, but I would love to find a listing for all of them.

Two shortcomings of the My Movies remote control is that it doesn't support long button presses, and it doesn't have an alpha keyboard. Seems like it would be really awesome to have a full keyboard on your remote to type text on your PC. I plan to mention both of these ideas to Binnerup, perhaps he would be willing to improve the app.

While it is easy to play movies/discs through the app, I was disappointed that I can't seem to direct play TV series episodes via the app. I thought I had seen a way to do this via the API, but I just reviewed Binnerup's knowledge base article again, and I don't see any options for that. I'll add that to the list of ideas for Binnerup to improve. I guess the good news here is that I'm technically done with interfacing to the mobile app now - I thought I had more to do but nope.

So now I'm back to working on finishing both the new Remote Control button mapping tool and the SysTray app. I also need to add support for sending media button presses (like "Record") so that apps that can respond to them will get them. I estimate I have about a weeks worth of programming ahead of me, so we're looking at reaching public beta in early March.
President, Chameleon Consulting LLC
Author, Chameleon MediaCenter

Teddyboy
Posts: 268
Joined: Wed Apr 25, 2018 10:30 pm
Location: San Diego, Ca

Re: Considering New App - Hotkey Monitor

Post by Teddyboy » Mon Feb 22, 2021 4:39 pm

I was referring to Personal videos.

I get that same feeling when I’m working on a mechanical design. I definitely understand.
I bought the MyMovies iOS app yesterday. It’s been a while since I last played with it. He’s made a lot of improvements to it. I still don’t find it practical, but that’s just me. I’m not one to edit my collection with the app, but sitting at my pc. I’m looking forward to seeing how your new control scheme works.

I just finished ripping my latest tv series to my server. I went on a Amazon shopping spree last week and bought a bunch of movies and tv series. I’ll post in the blu ray dvd section about what I got.
Mechanical Engineer, Solidworks junkie, Reef aquariums, sci-fi, weight training, orchids, Ferns, Kaiju, model kit building, balboa park, scripps aquarium

Teddyboy
Posts: 268
Joined: Wed Apr 25, 2018 10:30 pm
Location: San Diego, Ca

Re: Considering New App - Hotkey Monitor

Post by Teddyboy » Wed Mar 03, 2021 12:53 pm

How’s your progress been so far? I’m looking forward to the day that I have seamless remote control over the players. I really do like MPC-BE, but it’s really not very remote friendly. I like the episode playback, but when I was playing a episode last night once it finished it went to the episode menu of the dvd. I prefer to have episode play back one at a time then having it send me back to the episode playlist to pick another episode of my choosing. Is that currently possible or would you be able to add that later?

Efrain
Mechanical Engineer, Solidworks junkie, Reef aquariums, sci-fi, weight training, orchids, Ferns, Kaiju, model kit building, balboa park, scripps aquarium

User avatar
Pauven
Posts: 2777
Joined: Tue Dec 26, 2017 10:28 pm
Location: Atlanta, GA, USA
Contact:

Re: Considering New App - Hotkey Monitor

Post by Pauven » Wed Mar 03, 2021 3:09 pm

Teddyboy wrote: Wed Mar 03, 2021 12:53 pm I like the episode playback, but when I was playing a episode last night once it finished it went to the episode menu of the dvd. I prefer to have episode play back one at a time then having it send me back to the episode playlist to pick another episode of my choosing. Is that currently possible or would you be able to add that later?
Ultimately that is controlled by the disc's authoring. CMC simply initiates playback. As soon as the episode ends, or gets to the end credits, just hit the close button to exit MPC and return to CMC, and the next episode will auto-launch if you have that feature enabled.

Teddyboy wrote: Wed Mar 03, 2021 12:53 pm How’s your progress been so far? I’m looking forward to the day that I have seamless remote control over the players.
Slow this past week. Life has required more of my attention this week so I haven't been able to make much progress. Should be back on track in a few days...
President, Chameleon Consulting LLC
Author, Chameleon MediaCenter

Post Reply