Kodi Community Forum
MediaFrontPage - Web interface with widget type architecture to control multiple apps - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Supplementary Tools for Kodi (https://forum.kodi.tv/forumdisplay.php?fid=116)
+--- Thread: MediaFrontPage - Web interface with widget type architecture to control multiple apps (/showthread.php?tid=83304)



- DejaVu - 2011-06-08

_Mikie_ Wrote:Ran into a minor problem with authentication. If you enable it before first run it misses out the server checks. Don't know how to get around this. If anyone has any ideas let me know. Once that's sorted it can be added to main repo

Should this not be done after the server checks.
Server checks should then redirect to login.php instead?

I tried enabling it from your Repo, but it does not ask to start a session, just simply logs in. Even if I put nothing in the fields. Am I missing something?


- gugahoi - 2011-06-08

_Mikie_ Wrote:1) http://www.w3schools.com/php/func_filesystem_chmod.asp

Can we add that in then to chmod the layout.php

2) http://www.w3schools.com/PHP/func_filesystem_rename.asp

Can we rename defualt-layout.php to layout.php if layout.php doesn't exist. This can happen on first run. Then there won't be a layout.php on git so if u git pull you won't overwrite but new users won't have to rename it manually. It will also then chmod it via point 1 and mean users won't have to worry about that.

With regards to the question to Sleepy. I'm guessing this is to open the config.php file one first run. I couldn't find a way to open the file but what i thought of was opening it with this http://www.cdolivet.com/index.php?page=editArea&sess=ee84fff266509828aed2e9b7cf3cd8c9 and then users could just run it immediately and it would ask them to edit it and then save as config.php.

EDIT: Maybe this is a bit of an overkill. A normal text area might do better.

I'm busy with some other stuff at the mo and trying to get authentication to work properly but once I'm done with all that I'll give this stuff a bush if someone else hasn't done it yet.Smile

Chmodding doesn't work for me, and I dont think it's the best of practices to have it enabled in php...

Ye, that was exactly what I was thinking, to open config.php in a text editor. I think I've found a couple of solutions too but I'm not entirely sure yet. Will look into it soon too, just trying to sort a couple of things with your branch tho.


- SleepyP - 2011-06-08

The editing of the config.php should be done within the web browser if at all possible. PHP can only execute stuff on the server side. I know for some people (including me) the client machine where I set up MFP is not the same machine where its being served. My server is a headless box in the closet. As a result you can't really use exec() to get access to a text editor, since it would run one server-side, where guys like me wouldn't even see it.
For bug bashing, I highly recommend setting display_errors to either 1 or true in your php.ini. This way any PHP errors are immediately visible in your web browser. Has anyone had a chance to test the stuff I updated to fix the 4 tickets assigned to me on LightHouse? I had updated stuff for the Search, Transmission, XBMC Library, and Now Playing widgets. I wanted to get some 3rd party testing of that stuff done before I try to pull them to the main branch.


- LiLChris - 2011-06-08

gugahoi Wrote:What XBMC version are you using?

Latest released build, forgot the number. :o


- gugahoi - 2011-06-08

LiLChris Wrote:Latest released build, forgot the number. :o

I take that as a nighty? The feature most likely hasn't been added yet for nightlies in the official build. It's possible that SleepyP has added it in his version if you want to try it.

https://github.com/DivinityCycle/mediafrontpage


- gugahoi - 2011-06-08

SleepyP Wrote:The editing of the config.php should be done within the web browser if at all possible. PHP can only execute stuff on the server side. I know for some people (including me) the client machine where I set up MFP is not the same machine where its being served. My server is a headless box in the closet. As a result you can't really use exec() to get access to a text editor, since it would run one server-side, where guys like me wouldn't even see it.

You're right, my solution already takes that into account. All within the browser.

SleepyP Wrote:For bug bashing, I highly recommend setting display_errors to either 1 or true in your php.ini. This way any PHP errors are immediately visible in your web browser. Has anyone had a chance to test the stuff I updated to fix the 4 tickets assigned to me on LightHouse? I had updated stuff for the Search, Transmission, XBMC Library, and Now Playing widgets. I wanted to get some 3rd party testing of that stuff done before I try to pull them to the main branch.
Will test it today, but I don't use nightlies so I can only check the error handling.


- LiLChris - 2011-06-08

gugahoi Wrote:I take that as a nighty? The feature most likely hasn't been added yet for nightlies in the official build. It's possible that SleepyP has added it in his version if you want to try it.

10.1 actually, I rather not test the unofficial releases since some stuff doesn't work. :p

So any ideas on how to fix it?
I already did a fresh setup with new configs and no matter what I cant start a new video only control one that is already playing.


This is how it looks now...

Image


- gugahoi - 2011-06-08

SleepyP Wrote:For bug bashing, I highly recommend setting display_errors to either 1 or true in your php.ini. This way any PHP errors are immediately visible in your web browser. Has anyone had a chance to test the stuff I updated to fix the 4 tickets assigned to me on LightHouse? I had updated stuff for the Search, Transmission, XBMC Library, and Now Playing widgets. I wanted to get some 3rd party testing of that stuff done before I try to pull them to the main branch.

Ok, I'm still getting some errors, but much less than from the Official repo.

Code:
Notice: Undefined property: stdClass::$downloadedBytes in /Users/guga/Sites/Sleepy/widgets/wTransmission.php on line 73
Notice: Undefined property: stdClass::$uploadedBytes in /Users/guga/Sites/Sleepy/widgets/wTransmission



- gugahoi - 2011-06-08

LiLChris Wrote:10.1 actually, I rather not test the unofficial releases since some stuff doesn't work. :p

So any ideas on how to fix it?
I already did a fresh setup with new configs and no matter what I cant start a new video only control one that is already playing.


This is how it looks now...

Image

Hmmm, not sure. It's weird how that's the only command that does not work.

If you can, go to

http://your.url.com/xbmcjsonlib.php?tester=true

and select the XBMC.play command in the end of the first drop down menu and then post your results here.


- LiLChris - 2011-06-08

gugahoi Wrote:Hmmm, not sure. It's weird how that's the only command that does not work.

If you can, go to

http://your.url.com/xbmcjsonlib.php?tester=true

and select the XBMC.play command in the end of the first drop down menu and then post your results here.


This?

PHP Code:
{"jsonrpc""2.0""method""XBMC.Play""params": { %}, "id"1


PHP Code:
Call:

{
"jsonrpc""2.0""method""XBMC.Play""params": { %}, "id"1}


Result:

Array
(
    [
error] => Array
        (
            [
code] => -32700
            
[message] => Parse error.
        )

    [
id] => 0
    
[jsonrpc] => 2.0



The parse error doesn't make me happy. >.<
I hope that is enough info to get it sorted.


Oh here is more stuff...
Since I tried about every command and its only the last 3 XBMC commands that don't work, this is what I got.

PHP Code:
Call:

{
"jsonrpc""2.0""method""XBMC.Play""params": { "file""path_to_file" }, "id"1}



Result:

Array
(
    [
id] => 1
    
[jsonrpc] => 2.0
    
[result] => OK
)



Call:

select from movieview order by idMovie desc limit 50



Result
:

Array
(
    [
error] => Array
        (
            [
code] => -50000
            
[message] => Configuration ErrorCheck your config.php file.
        )

    [
id] => 0
    
[jsonrpc] => 2.0


Says to check my config file, and on my XBMC screen it says Playback Failed.


- SleepyP - 2011-06-08

That call won't work in the tester because of the %s parameter. That's gotta be an actual filepath I think. Can't remember the syntax at present, but I will try to figure out why its not working and fix it.

I'm having some difficulty testing cuz my Stable XBMC since it appears to have stopped working for me completely. Really weird considering I haven't changed much recently. I'll have to trace through the XBMC Library widget and see what's wrong, so while I'm doing that I will also try to reproduce / fix the "Play" bug.

-EDIT-
Nailed at least the root cause of my "sudden" problems: apparently my config.php isn't set up quite as I expected it to be. I'll need to re-read what I have it doing for the $xbmcjsonservice variable. Will post back after I get it working.

-EDIT 2-
This is pretty weird. With the nightly builds I can use the Apache reverse proxy setup to access XBMC. With the "Stable" version of XBMC I cannot.
I'd be interested in any feedback / observations / theories from other members of the team on this issue, since on the face of it it seems like that shouldn't matter at all.
I am proxying 192.168.1.2:8080 to /xbmc on my server.
The "proxy" setting is $xbmcjsonservice = "http://192.168.1.1/xbmc/jsonrpc";
The "direct" setting is $xbmcjsonservice = "http://192.168.1.2:8080/jsonrpc";

With my nightly build of XBMC I can use either.
With my stable 10.1 build of XBMC I can ONLY use the "direct" setting, proxying simply does not work. I have triple-checked that the settings within both XBMC setups are the same.
Can any reverse-proxy users test this out?

-EDIT 3-
Also I am having no difficulty making anything play using the widgets, so maybe my version is different somehow?


- SleepyP - 2011-06-08

gugahoi Wrote:Ok, I'm still getting some errors, but much less than from the Official repo.

Code:
Notice: Undefined property: stdClass::$downloadedBytes in /Users/guga/Sites/Sleepy/widgets/wTransmission.php on line 73
Notice: Undefined property: stdClass::$uploadedBytes in /Users/guga/Sites/Sleepy/widgets/wTransmission

Fix commited to my repo https://github.com/DivinityCycle/mediafrontpage


- _Mikie_ - 2011-06-08

DejaVu Wrote:Should this not be done after the server checks.
Server checks should then redirect to login.php instead?

I tried enabling it from your Repo, but it does not ask to start a session, just simply logs in. Even if I put nothing in the fields. Am I missing something?

Okay fixed the server checks. It runs before login if you enable login or like before if you don't. Make sure you using the new config? Otherwise it should work. Does it show you the login page?

EDIT: Getting same problem. Possibly server checks causing issues.


- gugahoi - 2011-06-08

_Mikie_ Wrote:Okay fixed the server checks. It runs before login if you enable login or like before if you don't. Make sure you using the new config? Otherwise it should work. Does it show you the login page?

EDIT: Getting same problem. Possibly server checks causing issues.

It's working perfectly fine for me.


- Lunatixz - 2011-06-08

I've had no luck getting this running on windows 7 with uniform server...
Could someone please post a simple guide on how to get this running?
Thanks...