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)



- gugahoi - 2011-10-09

oneadvent Wrote:LOL sorry, transmission wont work, it says:
Code:
Program is probably closed or THIS is not the right address.

and when I go to the page it says:
Code:
409: Conflict

Your request had an invalid session-id header.

To fix this, follow these steps:

    When reading a response, get its X-Transmission-Session-Id header and remember it
    Add the updated header to your outgoing requests
    When you get this 409 error message, resend your request with the updated header

This requirement has been added to help prevent CSRF attacks.

X-Transmission-Session-Id: YZCP02eoLO5TmQ0VH06jpyY3HVlgwdSX7NPI4dNgZzxZBD4e

It is probably a URL problem. Transmission is very picky so if you don't have a '/' in the end add one, if you do remove it and give it a go.


- DejaVu - 2011-10-09

I may remove the Program Check altogether. It was a good idea at the time, but I cannot work out how to include the reverse proxy settings.

I've found numerous ways of checking using cURL, but putting into practice feels way over my head - seeing as I've spent days trying to learn how it works and got nowhere.

I am getting annoyed I cannot understand. Huh

I've read up on get_headers, cURL, fopen and fsockopen.

My brain is overloaded with loads of incorrect ways of doing it, but I cannot find a single script I can adapt to do what I want it too.

This looked like the closest option, but this also got me pulling my hair out -
http://www.neowin.net/forum/topic/1000190-php-curl-and-multiple-urls/

This is what I have so far - am I completely off track I wonder?

PHP Code:
<?php
            
include "config.php";
                function 
program_check($url$timeout=5) {
                        foreach (array(
$xbmcimgpath,$saburl,$subsonic_url,$sickbeardurl,$cp_url,$automovies_url,$headphones_url,$transmission_url,$utorrent_url,$jd_url) as $url
                            
$ch curl_init();
                                
curl_setopt($chCURLOPT_URL$url);
                                
curl_setopt($chCURLOPT_USERAGENT$useragent);
                                
curl_setopt($chCURLOPT_HTTPHEADER, array($contentlength));
                                
curl_setopt($chCURLOPT_HEADER0);
                                
curl_setopt($chCURLOPT_USERPWD$username ":" $password);
                                
curl_setopt($chCURLOPT_TIMEOUT15);
                                
curl_setopt($chCURLOPT_POST1);
                                
curl_setopt($chCURLOPT_POSTFIELDS$inputdata);
                                
curl_setopt($chCURLOPT_RETURNTRANSFER1);
                                
curl_setopt($chCURLOPT_HTTPAUTHCURLAUTH_DIGEST);
                            
$data curl_exec($ch);
                                
curl_close($ch);
                                }
                        if (!empty(
$data)) {
                            echo 
"<td width='80' align='center'><img src='media/green-tick.png' height='15' Title='Found'></td>";
                        }else{
                            echo 
"<td width='80' align='center'><img src='media/red-cross.png' height='15' Title='Unavailable'></td>";
                              }
            
?>



- oneadvent - 2011-10-09

gugahoi Wrote:It is probably a URL problem. Transmission is very picky so if you don't have a '/' in the end add one, if you do remove it and give it a go.


Same issue on the Transmission thing..here are my settings, maybe something is wrong:

192.168.1.191/ (tried with and without that slash as suggested)
9091
oneadvent
PASSWORD (not telling you guys!)

Anyway those are the only settings I see for Transmission...let me know if I am off track.


- gugahoi - 2011-10-10

oneadvent Wrote:Same issue on the Transmission thing..here are my settings, maybe something is wrong:

192.168.1.191/ (tried with and without that slash as suggested)
9091
oneadvent
PASSWORD (not telling you guys!)

Anyway those are the only settings I see for Transmission...let me know if I am off track.

hmmm okay. When you click on "THIS" on the widget, what page does it take you to exactly? Post the address here...

Mine for example is:
Code:
http://IP:9091/transmission/web/



- oneadvent - 2011-10-10

http://192.168.1.191:9091/transmission/rpc


- gugahoi - 2011-10-10

try this link and tell me what it does

http://192.168.1.191:9091/transmission/rpc/


otherwise, can you access the web interface?

http://192.168.1.191:9091/transmission/web/


- oneadvent - 2011-10-10

http://192.168.1.191:9091/transmission/rpc/
Gives me the 409 error.


http://192.168.1.191:9091/transmission/web/
Gets me to the Transmission page, no problem.


- gugahoi - 2011-10-11

oneadvent Wrote:http://192.168.1.191:9091/transmission/rpc/
Gives me the 409 error.


http://192.168.1.191:9091/transmission/web/
Gets me to the Transmission page, no problem.

That's expected. I remember there was some configuration you had to do in Transmission itself to enable the RPC control. Maybe have a look around because as far as MFP goes it seems your set-up is fine...

I remember I had to modify Transmission's config file and disable the black/white list or something like that. Did you ever do that?


- newtothis - 2011-10-11

Got this running on synology ds211j, Has anyone got the hard drive widget working with the synology?, also i get the xbmc json isnt responding,but in the bottom right i have all the details of my libary

With much thanks


- DejaVu - 2011-10-11

New update, I am proud to announce, it took for ever to work out and may still be wrong. But the Program Check now uses cURL and should be Reverse Proxy compatible (hopefully).

@steve1977 (BEFORE YOU UPDATE TO MY NEW COMMIT).

I think the Program Check with Reverse Proxy, should be working. But I want to check what is going on with your updating.

When you update, can you let me know what state it's in before and after, if it fails. Screenshots would be good - Files in the MFP folder and MFP as it errors out.

Something like this would be good - Wink
Image


- fryguy503 - 2011-10-12

First off, I love everyones work here.

Now, I may of missed it, but is there a good walkthrough or setup information for Reverse Proxys?


- Archigos - 2011-10-12

Sadly I haven't been able to keep up with the project lately and have been having a bunch of problems lately.

At first I had done NO changes on my HTPC system, but the TV, Movies, and RSS widgets kind of died. I verified the setting for XBMC inside MFP and they are still the same. The RSS just complains that it's unable to determine the feed type.

I upgraded to the 10/10 Nightly and the widgets all act the same no matter how I screw with the settings. I'm using the latest Deja repo as of about midnight tonight (less than two hours old). I'm guessing the last round of JSON changes messed it up.

I hope I'm not the only one having the issues above but figured I'd give a heads up...

Last point, the footer in Deja's repo still doesn't work by default without adding the following line to the relevant files that use it (index.php, etc.)

Code:
<link rel="stylesheet" type="text/css" href="css/footer.css" />



- DejaVu - 2011-10-12

XBMC Nightlies have never really been supported properly by MFP because of the constant changes made to XBMC. Nightlies are the bleeding edge of XBMC, until Eden is released.

I chose to remain on Dharma til Eden's official release - MFP works a treat for me.

The footer.css file should already be in files that need it. I cannot say I have had trouble with the footer not showing.

The CSS is called everytime the Footer.php loaded using the first line of the footer.php.

https://github.com/DejaVu/mediafrontpage/blob/master/footer.php

It might be the leading '/' that is making this happen though.

I'll remove it and see if that helps.


- Archigos - 2011-10-12

DejaVu Wrote:XBMC Nightlies have never really been supported properly by MFP because of the constant changes made to XBMC. Nightlies are the bleeding edge of XBMC, until Eden is released.

I chose to remain on Dharma til Eden's official release - MFP works a treat for me.

I could have sworn awhile back some stuff (other than the files in the EXTRA folder) were done to make it work in Dharma and Nightly versions. Guess I was wrong. Not that big a deal.

And the footer thing, might be an issue with the way IIS handles it since I'm not using an Apache based server. I had to add the link to the head section of every page that called the footer at the bottom as the footer apparently doesn't call it. By the sounds, since no one else complained, it'd probably be easier/safer if you just leave it the way it is and I'll just have to change it on mine.


- newtothis - 2011-10-12

newtothis Wrote:Got this running on synology ds211j, Has anyone got the hard drive widget working with the synology?, also i get the xbmc json isnt responding,but in the bottom right i have all the details of my libary

With much thanks


Managed to sort out most things,still struggling with json thing,anyone got any tips?
The Json server is def ok,because i can find it using chrome.

With many thanks