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.
why dont you guys add an auto update function to mediafrontpage like sickbeard and couch potato have? that way when you go the webpage you can check if there is a new version in the repo to download and compare the version.

Just a thought as I dont know if this is possible or not.
rflores2323 Wrote:why dont you guys add an auto update function to mediafrontpage like sickbeard and couch potato have? that way when you go the webpage you can check if there is a new version in the repo to download and compare the version.

Just a thought as I dont know if this is possible or not.

please dont do this via git or svn like there... thats a very ugly way because git is no tool for update, and if you add a autoupdate function make it fully optional via a configfile (so it cant be enabled via the browser)
steve1977 Wrote:Thanks again. Gave it a try with your latest repo, but reverse proxy do not appear to be working yet. The relevant parts of the new config.ini look as follows. Any thoughts whether / what I am doing wrong.
Reverse Proxy is still WIP and as yet, still not supported with my Repo or the INI Branch.

Programs.php has not been integrated on the Repo yet.
I'm playing with the settings to make sure SubSonic is going to work properly.

I'm not updating the changes just yet til I know it works.

Adding 'programs.php?p=SubSonic' and the URL to it as is, will probably not work as yet as quite a few other files need to be updated.

Will keep you posted.

As for the upto update, when it happens will only update from the master branch of the Official repo. It (hopefully) will have the option of turning it off. I imagine this might not be available til Milestone v2 though.
DejaVu Wrote:@Dougedey.
I'm not even sure why the problems started with wNowPlaying.php, this must have something to with being a slightly older repo. Last mention of any changes to it was by SleepyP a little while back. I have not made any changes to it and is should still work as the Official Repo does. I'm now wondering if the INI Branch has an older version of some of the widgets in it.

I looked into it a lot more last night, the feedback from the JSON RPC calls to get the active playlist items are extremely inconsistent, sometimes there'll be a plot, sometimes not, sometimes it'll give a non-existant file (like the fanart) sometimes it won't.

It's not a bug with MFP, but I just made a workaround for the inconsistencies.

I'm raising an XBMC bug now
Anyone wanting to solve the problem with SubSonic loading the playlist correctly within the iFrame (steve1977).

It's a coding issue with SubSonic and I have found the answer. SubSonic automatically assumes it's in the top.window and so it should really.

The way to fix it is -

In SubSonic's folder somewhere find the file playAddDownload.jsp.

Find -

Code:
<a href="javascript:[b]noop[/b]()" onclick="[b]top[/b].playlist.onAdd('${path}');">
and replace it with
Code:
<a href="javascript:[b]noop[/b]()" onclick="[b]parent[/b].playlist.onAdd('${path}');">

Also, in order for the logout to work, open top.jsp.

find:
Code:
<a href="j_acegi_logout" target="_top">
replace with:
Code:
<a href="j_acegi_logout" target="_parent">

This will force the application to log out to the parent window which is the main login screen.

As you can tell, it's the same problem for the whole program. If top is changed to parent everywhere - everything should work. Wink


--EDIT--
Changed the code as it was wrong. Cheers to steve1977 for the headsup. Proof reading was never my strong point!
First off, thank you all for your hard work building this great tool.

DejaVu,

Im using your most recent update from https://github.com/DejaVu77/mediafrontpage

I have been having the below issue for the last few pulls and was wondering if it is something on my side or something that needs attention.

I have been getting this message for the xbmc and sickbeard pages:

Notice: Undefined variable: wIndex in C:\wamp\www\mediafrontpage\nav.php on line 40
Call Stack
# Time Memory Function Location
1 0.0009 679840 {main}( ) ..\programs.php:0
2 0.0014 703504 include( 'C:\wamp\www\mediafrontpage\nav.php' ) ..\programs.php:11


Warning: Invalid argument supplied for foreach() in C:\wamp\www\mediafrontpage\nav.php on line 40
Call Stack
# Time Memory Function Location
1 0.0009 679840 {main}( ) ..\programs.php:0
2 0.0014 703504 include( 'C:\wamp\www\mediafrontpage\nav.php' ) ..\programs.php:11
Going by the information gives us nothing to work with.
What OS are you using and try and explain your setup a little.

Undefined variables in wIndex (Index Widget?!) in the nav.php, using terminology like Call Stack or Time Memory Function Location sounds pretty serious and is unlikely to be anything to do with MFP. Unless it's configured incorrectly.

This sounds to me, like it's more of a server configuration issue.

Line 40 of Nav.php is a foreach statement -

Code:
        foreach( $wIndex as $wId => $widget ) {
            renderWidgetHeaders($widget);    
        }
        if(!empty($customStyleSheet)) {
            echo "\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"".$customStyleSheet."\">\n";
        }
This has nothing to do with MFP, I believe it's the server it's running on.
It's a new error for me (and being that I'm a self confessed n00b - and also intoxicated at the moment!), it maybe a little over my head. Once I sober up in the morning, I'll take another look! Wink
I am getting the below error on all my pages when I access them thru MFP... xbmc, sickbeard, couch potato, sabnzbd

Code:
Notice: Undefined variable: wIndex in /opt/lampp/htdocs/mediafrontpagecool/nav.php on line 40

Warning: Invalid argument supplied for foreach() in /opt/lampp/htdocs/mediafrontpagecool/nav.php on line 40

I am running ubuntu 10.04 with XAMPP server.

You can see a screenshot below tat shows under the navigation bar the above error message

Image

also I cant change the css themes as there is no save button.when is this going to be pushed and fixed on the dejavu repo?

Another thing is that I am getting the below when trying to do a git pull from the INI branch. it aborts since it tries to overwrite my config.php file.

Code:
xbmc@xbmc-desktop:/opt/lampp/htdocs/mediafrontpage$ cd /opt/lampp/htdocs/mediafrontpagenew
xbmc@xbmc-desktop:/opt/lampp/htdocs/mediafrontpagenew$ sudo git pull
[sudo] password for xbmc:
remote: Counting objects: 287, done.
remote: Compressing objects: 100% (214/214), done.
remote: Total 263 (delta 142), reused 164 (delta 48)
Receiving objects: 100% (263/263), 624.09 KiB, done.
Resolving deltas: 100% (142/142), completed with 18 local objects.
From https://github.com/DejaVu77/mediafrontpage
* [new branch]      DejaVu     -> origin/DejaVu
* [new branch]      INI        -> origin/INI
+ 93599cd...df75470 master     -> origin/master  (forced update)
error: Untracked working tree file 'config.php' would be overwritten by merge.  Aborting

how do I fix this so that when I do a git pull it will update but not overwrite my config and layout files?

Sorry but new to this and I greatly appreciate the help. MFP rocks! Big Grin
DejaVu Wrote:Anyone wanting to solve the problem with SubSonic loading the playlist correctly within the iFrame (steve1977).

It's a coding issue with SubSonic and I have found the answer. SubSonic automatically assumes it's in the top.window and so it should really.

The way to fix it is -

In SubSonic's folder somewhere find the file playAddDownload.jsp.

Find -

Code:
<a href="javascript:void()" onclick="top.playlist.onAdd('${path}');">
and replace it with
Code:
<a href="javascript:void()" onclick="parent.playlist.onAdd('${path}');">

This is awesome. Thanks for finding what was wrong in the subsonic code and fixing it. I am testing it right now, but don't find the code you are indicating. Instead, I see the following line:

Code:
<a href="javascript:noop()" onclick="top.playlist.onAdd('${path}');">

Any idea what this difference is?
My bad, it IS the noop() function that needs changing and not the void one.
Right, to get my Repo working, you should clone it as master from scratch.

I have just cloned it and everything seems to working fine. (As stated on the ReadMe on my Repo).
Backup your MFP folder if you wish. Then delete it completely including the folder it lives in.

In command line type -
Code:
sudo git clone git://github.com/DejaVu77/mediafrontpage.git <Path to Installation>
In your case rflores2323
Code:
sudo git clone git://github.com/DejaVu77/mediafrontpage.git /opt/lampp/htdocs/mediafrontpage
Then from the command line type -
Code:
sudo chmod 777 /opt/lampp/htdocs/mediafrontpage/*
Then visit Localhost and you will be greeted with the ServerCheck, which should all pass fine. Then click Continue and you will be sent to the config page.

Fill all the details in relative to your setup.
You can click Save on each page, but it's not necessary as all the settings Save at once.

Once that's done, let me know if the error still exists. It should'nt do.
Thanks for the updates DejaVu, is there anyway to disable the notifcations when it saves each page? Atm I get two notifications (one appears to be the update URL)

Also: the EXTRAS json, does that need to be used for XBMC Dharma 10.1, or is the normal one fine?
The EXTRAS is, from what I recall, just for the nightlies and should just be ignored if your using the official release.

Gugahoi is working on the notifications at the moment. I'm hoping to be able to understand his changes and add them to my Repo once he's completed them.

If not, I'll rewrite my changes from his next commit to the INI branch - which is going to be bit of a mission. Live and learn.

--EDIT--
HeadPhones is now supported.
DejaVu Wrote:My bad, it IS the noop() function that needs changing and not the void one.

Thanks. I have made the changes (basically only changing top to parent in 2 lines). Unfortunately, after having made these changes, it is still not working properly... Any other ideas?
Have you cleared your browser cache after doing this?
Mine's working top notch now...

http://www.youtube.com/watch?v=rvg1JcvKStE

Another one that did not work was the

Play all | Play random | Add all | Comment

Links.

These are found in main.jsp and changing these from top to parent fixes these too.

Code:
<a href="javascript:noop()" onclick="parent.playlist.onPlay('${path}')"><fmt:message key="main.playall"/></a> |
        <a href="javascript:noop()" onclick="parent.playlist.onPlayRandom('${path}', 10)"><fmt:message key="main.playrandom"/></a> |
        <a href="javascript:noop()" onclick="parent.playlist.onAdd('${path}')"><fmt:message key="main.addall"/></a>

The Logout one above does not change. It still hogs the screen when you logout.
Comment this out in login.jsp

Code:
<script type="text/javascript">
        if (window != window.top) {
            top.location.href = location.href;
        }
    </script>

like
Code:
<!--    <script type="text/javascript">
        if (window != window.top) {
            top.location.href = location.href;
        }
    </script> -->

These are gripes that others are having with SubSonic and community clubbed together to hack SubSonic a little bit - here.