Kodi Community Forum

Full Version: MediaFrontPage - Web interface with widget type architecture to control multiple apps
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
sraue Wrote:a configfile which contains configs the user do should never be in in the package dir byself. this should be inside $HOME/{.packagename} and should contain no code, only settings.

I get the same error when trying to update mfp with git pull on my nas. Is this something i can fix myself locally or is it something that should be fixed on github ?
I hope there isn't an obvious answer to this, but I just installed this but I don't see any hard drive widget. I'm running it on linux, if that matters.

edit: And it also seems that after I edit the navbar links, it erases all of them.
mattressfish Wrote:I hope there isn't an obvious answer to this, but I just installed this but I don't see any hard drive widget. I'm running it on linux, if that matters.

edit: And it also seems that after I edit the navbar links, it erases all of them.

The hard drive widget should be there in the 3rd column?

With the second one it seems to be an error in both the nav bar and sub nav bar saving methods. Once gugahoi has some time I'm sure he'll look into it.
How hard would it be to change MFP into a Python Application without changing from PHP to Python language?

I've been looking into making this into Windows EXE file and Linux Python PY file.

I think this is a great idea as it will mean webserver settings will be specific to MFP and everyone's will be the same.

I figure the easiest way, would be to encapsulate MFP into a simple Python Web Server - http://fragments.turtlemeat.com/pythonwebserver.php

Anyone think this is doable or am I barking up the wrong tree?
Doing it this way seems to me it can still be edited/changed by PHP (as it is now).
DejaVu Wrote:How hard would it be to change MFP into a Python Application without changing from PHP to Python language?

I've been looking into making this into Windows EXE file and Linux Python PY file.

I think this is a great idea as it will mean webserver settings will be specific to MFP and everyone's will be the same.

I figure the easiest way, would be to encapsulate MFP into a simple Python Web Server - http://fragments.turtlemeat.com/pythonwebserver.php

Anyone think this is doable or am I barking up the wrong tree?
Doing it this way seems to me it can still be edited/changed by PHP (as it is now).
It is possible as python modules do exist that allow you to run php in python (wPHP). In my opinion, it would be easier to either convert over to python completely aka "a complete rewrite" or stick php only and have a separate side all-in-one project which would be a python http server with php support which packages MFP with it.
Does anyone else experience the issue where your webserver and XBMC machine are on different machines, and if your XBMC machine is offline, then the MFP web interface just hangs?

I'm experiencing this.... My xbmc isn't always powered on, and when it's offline, the MFP website just hangs and hangs Sad
mdaddy Wrote:Does anyone else experience the issue where your webserver and XBMC machine are on different machines, and if your XBMC machine is offline, then the MFP web interface just hangs?

I'm experiencing this.... My xbmc isn't always powered on, and when it's offline, the MFP website just hangs and hangs Sad

yap thats just how its been from the get go
RaNaMaster Wrote:yap thats just how its been from the get go

Sad ... I'm using MFP for many many things, but my XBMC machine isn't always turned on... what a pain.
_Mikie_ Wrote:So it seems the only api that exists doesn't support software players or at least I can't get them to work. Do you use squeezeplay or is support for hard ware players enough?

What about a subsonic widget instead? It is basically the same as squeezebox for music and even has video. It has an API though. Thoughts?
RaNaMaster Wrote:yap thats just how its been from the get go

Actually -- what I really don't understand is that the hangups don't occur if the machine is POWERED ON, but XBMC isn't running...

Why does MFP care whether or not the machine is on if it can't find XBMC either way?
Narrowed it down to "$response = curl_exec($ch);" in xbmcjsonlib.php

CURL doesn't like it when the ip/host is offline, but apparently doesn't care if it's ONLINE but XBMC isn't running.

I guess a good analogy here is when making a phone call to your friend's house, it's quicker to have his mom answer the phone and say he's not here (XBMC not running), than it is to let the phone ring and ring and ring endlessly (what CURL is doing when there's no answer).

I guess I can easily code in a exec("ping $host") check before executing the CURL...
This software is really buggy. Firstly, it was complaining about a parse error on line 1 of config.ini -- found out that's because it's has included <?php and ?> tags. Removed those and found more issues with the RSS feeds, so I removed those and then MFP started up.

I then went to Admin and saved the config ... ** don't do this ** That wiped the config.ini and put those PHP tags back causing MFP to crash with the parse error again.

This is from the latest git repo too.
RaNaMaster Wrote:yap thats just how its been from the get go

mdaddy Wrote:Narrowed it down to "$response = curl_exec($ch);" in xbmcjsonlib.php

CURL doesn't like it when the ip/host is offline, but apparently doesn't care if it's ONLINE but XBMC isn't running.

I guess a good analogy here is when making a phone call to your friend's house, it's quicker to have his mom answer the phone and say he's not here (XBMC not running), than it is to let the phone ring and ring and ring endlessly (what CURL is doing when there's no answer).

I guess I can easily code in a exec("ping $host") check before executing the CURL...

Ok I found a much better option -- add a CURL timeout to the call:

curl_setopt($ch, CURLOPT_TIMEOUT, 1);
sikosis Wrote:This software is really buggy. Firstly, it was complaining about a parse error on line 1 of config.ini -- found out that's because it's has included <?php and ?> tags. Removed those and found more issues with the RSS feeds, so I removed those and then MFP started up.

I then went to Admin and saved the config ... ** don't do this ** That wiped the config.ini and put those PHP tags back causing MFP to crash with the parse error again.

This is from the latest git repo too.

We know it's buggy and none of us are professional coders or anything but we like it and keeping getting new ideas to try and improve it. If you think you can do better than by all means, please do! Otherwise don't come complaining like that. So many people have successfully installed MFP, if you need help just ask.

mdaddy Wrote:Ok I found a much better option -- add a CURL timeout to the call:

curl_setopt($ch, CURLOPT_TIMEOUT, 1);

This has been known for a while but hasn't really bothered most of us since we have XBMC on all the time. I know it's annoying to have MFP hang when XBMC is down. For me this is not a solution tho, 1 millisecond (I think that's the unit) is not enough when I'm using it over the internet. I'm sure there's a more elegant solution but a timeout should definitely be added. Maybe 5 seconds?

Besides MFP doesn't hang for me, it just takes a couple more seconds to load if XBMC is off.
Hi everyone,

First thanks for the great work on mediafrontpage! I'm using it everyday!

Also, I'm like m_daddy, I don't have my xbmcs running all day so I had this little problem of mediafrontpage waiting for an answer from the CURL_exec function.

I made a change quite similar to m_daddy by adding the option : CURLOPT_CONNECTTIMEOUT and I set it to 2 seconds.

I think it's better because it just give 2 seconds to establish the connection with xbmc. If it works, then there is no time limit to retrieve the data unlike TCURLOPT_TIMEOUT which set a complete timeout for the whole function Wink