Webbased remote control using PHP (2 Viewers)

Bram

Portal Pro
December 12, 2005
851
3
's-Hertogenbosch
Home Country
Netherlands Netherlands
I'm a professional PHP 'programmer'. I'd like to give writing a remote contol plugin a serious try. I have very little knowledge of C# and .NET.
I know how to take advantage of HTML, CSS, Javascript and PHP (and MySQL ofcourse) to it's limits. I know there is need for a advanced webbased interface and I'd like to use my knowledge to help developing MP. The missing link is the communication between PHP and MP. Can anyone help me understand what is needed to manipulate MP from PHP and the other way around?
If it's simply database manipulation (MP is using MSSQL I understand. And altough I don't have any experience with MS databases, I can't imagine it will be much more difficult than a MySQL database) I won't need much information....


Thank you in advance.


Just to complete the information....
I'm getting aqainted with ASP and C# a little thrue writing a interface for a MP Playlist Web Front End in development. But because I don't have any experence using ASP or C# I can't realy use my experience to it's max....
https://forum.team-mediaportal.com/viewtopic.php?p=107738#107738



Sorry for my, probebly far from perfect, English. I'm Dutch.


To get an idea of what is possible with webbased applications take a look at this.....
http://www.turboajax.com/turbowidgets/examples/
 

samuel337

Portal Pro
August 25, 2004
772
0
Melbourne, Australia
It depends on what sort of 'communication' you're talking about I guess. If you just want to edit database records, then I guess you can just edit the databases directly (they're SQLite3 DBs btw).

But if you want to change the behaviour of MP while its running, i.e. send through remote control commands, refresh DB commands etc. you'll need something that gives you access to MP while its running. An example of this is the ECP2 web service that comes with MPW. In fact if you look at the code for that, it is really an .NET web service and a PHP application which should suit your skillset.

Maybe you should contact the programmer of MPW (maschine is his username on these forums). The functions to retrieve info from the music database have not been added yet but will be soon.

Sam
 

Bram

Portal Pro
December 12, 2005
851
3
's-Hertogenbosch
Home Country
Netherlands Netherlands
Thak's for the response. I've contacted the author of mp-webinterface. Tomorrow I'll probebly have more information. I'll try to collect the information in this topic so a wiki page can be created later.
 

Bram

Portal Pro
December 12, 2005
851
3
's-Hertogenbosch
Home Country
Netherlands Netherlands

samuel337

Portal Pro
August 25, 2004
772
0
Melbourne, Australia
There's actually a later version of that web service, but it hasn't been released as I want to release it with the new version of MPW, which is still under development (I think the dev is currently busy with work).

The new version of the web service gives you more functions so you can manipulate MP data as well, e.g. add recordings, del recording etc. and look at a lot more stuff. The music functions will be coming, when I get time.

If you want to check out the code, goto
www.sf.net/projects/mp-webinterface

Sam
 

Bram

Portal Pro
December 12, 2005
851
3
's-Hertogenbosch
Home Country
Netherlands Netherlands
Thank you! I'm going to look into that immediately.

Maybe I've got it wrong....It seems like the older version isn't compatible anymore. When I try to obtain the GetCurrentlyPlayingItemDetails i.a., I get the following response. This is the case with all MyMusic related requests...

Code:
System.MissingMethodException: Method not found: 'PlayListItem MediaPortal.Playlists.PlayListPlayer.GetCurrentItem()'.

Server stack trace: 
   at ECP2Assembly.MPHandler.get_GetCurrentPlaylistItemProperties(String PropName)
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at ECP2Assembly.MPHandler.get_GetCurrentPlaylistItemProperties(String PropName)
   at MPECP2WS.ECP2WS.GetCurrentlyPlayingItemDetails()
 

Bram

Portal Pro
December 12, 2005
851
3
's-Hertogenbosch
Home Country
Netherlands Netherlands
I'm sorry. I don't know how to compile this correctly. I've compiled MP once, but only with help of the guide. It will take me days before I've got a working versio I'm affraid. Could some help me out? Maybe mail me the compiled version, or explain to me what to do?

Sorry if I'm asking to much. I'm willing to learn, but also hoping to start developing the webinterface asap. I have time this week, but have to start working again next thuseday. I'm hoping to do as much as possible this week.
 

samuel337

Portal Pro
August 25, 2004
772
0
Melbourne, Australia
Give me until tonight here and I'll have a compiled version posted - yes you do need to update your ECP2Assembly/ECP2Plugin as well as the web service itself, explaining your errors.

Sam
 

Bram

Portal Pro
December 12, 2005
851
3
's-Hertogenbosch
Home Country
Netherlands Netherlands
That will be tomorrow for me I guesse ...... keeping in mind you are at the other side of the world. :)

Thank you very much for your help Sam.
 

Users who are viewing this thread

Top Bottom