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)



- Nick8888 - 2010-11-06

toby77jo Wrote:Hi,

As of 2 days the sicbeard page is empty, anyone see something bad on my config? aldo the Control does not work, give me file not found..

Also chaning position of any dashboard give popup :problem saving layout, file not writeable, and i have done chmod -R 777 on my entire www dir:
rename default-layout.php to layout.php and make sure your web-server has write access to it (I am not sure why chmod 777 isn't working for you but I'm thinking you haven't renamed the file to layout.php).

The default links in Control widget are not supposed to work, they are part of my own setup which are not generic, I left them as examples. You need to add your own shortcuts to things you find useful by editing config.php.


- toby77jo - 2010-11-06

thanks a lot nick, works like a charm.

any ETA on sickbeard coming episode page, in GIT it seems broken

also any chance of having some themes to choose from like light or dark?

love this project!


- hotlobster - 2010-11-06

Added the log.But not really relevant, it print the same message as before:
[HTML]
XBMC's JSON API did not respond.

Check your configuration (config.php) and that the JSON service variable is configured correctly and that the Service is running.

{"jsonrpc": "2.0", "method": "VideoLibrary.GetMovies", "params": { "sortorder" : "ascending", "fields" : [ "genre", "director", "trailer", "tagline", "plot", "plotoutline", "title", "originaltitle", "lastplayed", "showtitle", "firstaired", "duration", "season", "episode", "runtime", "year", "playcount", "rating", "writer", "studio", "mpaa", "premiered", "album" ] }, "id": 1}[/HTML]

And this jsonrpc request works directly with curl:

Code:
curl -i -X POST -d '{"jsonrpc": "2.0", "method": "VideoLibrary.GetMovies", "params": { "sortorder" : "ascending", "fields" : [ "genre", "director", "trailer", "tagline", "plot", "plotoutline", "title", "originaltitle", "lastplayed", "showtitle", "firstaired", "duration", "season", "episode", "runtime", "year", "playcount", "rating", "writer", "studio", "mpaa", "premiered", "album" ] }, "id": 1}' http://127.0.0.1/jsonrpc



- Nick8888 - 2010-11-06

toby77jo Wrote:thanks a lot nick, works like a charm.

any ETA on sickbeard coming episode page, in GIT it seems broken

also any chance of having some themes to choose from like light or dark?

love this project!

I'm having a look at the coming episode stuff right now. Its broken when you specify a path such as http://... (those with relative paths should be fine)

Already the option for a light theme just uncomment this in your config
Code:
//$customStyleSheet = "css/lighttheme.css";
ie remove the // at the front

I won't be making any additional themes as I'm happy with the dark one but if others create any feel free to let me know and I'll add them.


- Nick8888 - 2010-11-06

hotlobster Wrote:Added the log.But not really relevant, it print the same message as before:
[HTML]
XBMC's JSON API did not respond.

Check your configuration (config.php) and that the JSON service variable is configured correctly and that the Service is running.

{"jsonrpc": "2.0", "method": "VideoLibrary.GetMovies", "params": { "sortorder" : "ascending", "fields" : [ "genre", "director", "trailer", "tagline", "plot", "plotoutline", "title", "originaltitle", "lastplayed", "showtitle", "firstaired", "duration", "season", "episode", "runtime", "year", "playcount", "rating", "writer", "studio", "mpaa", "premiered", "album" ] }, "id": 1}[/HTML]

And this jsonrpc request works directly with curl:

Code:
curl -i -X POST -d '{"jsonrpc": "2.0", "method": "VideoLibrary.GetMovies", "params": { "sortorder" : "ascending", "fields" : [ "genre", "director", "trailer", "tagline", "plot", "plotoutline", "title", "originaltitle", "lastplayed", "showtitle", "firstaired", "duration", "season", "episode", "runtime", "year", "playcount", "rating", "writer", "studio", "mpaa", "premiered", "album" ] }, "id": 1}' http://127.0.0.1/jsonrpc

If it didn't print any thing above the comm error stuff them it means xbmc isn't returning anything. I'm not quite sure whats going on because it is working fine here. If others have the same problem I'll look into it. Make sure you've done a full "update "(copy/paste) of the most recent mfp. Its not finished yet anyway so perhaps we will figure it out as we work through finishing it off.


- gugahoi - 2010-11-06

Image

Just wanted to show the modifications I made in the widget. The names that dont fit scroll from side to side. The colours as I said. And the Total progress Bar (1st one in the queue), it only shows up when the queue is resumed.

How do I get the API from the code? Is it included in one of JSON command?


- Nick8888 - 2010-11-06

@gugahoi, Looks good. I like it for the hard drive usage but don't really feel the need for the download items. Jodeman has put together some images to use on the hard drive progress bars. I'll try and implement them in the next few days.

The sabnzbd widget is all in widgets/wSabnzbd.php . It has a function called sabQuery which uses curl to connect to sabnzbd's json server and it returns an array with the info. I can't give much more help than that as zarquon wrote it and I've only had a glance. http://sabnzbd.wikidot.com/api

For those having troubles with the coming episodes widget, I just updated it to work correctly. Hopefully zarquon can pinpoint what was going wrong with his updates because I have no clue how that widget works!


- gugahoi - 2010-11-06

Right, I read that page before, JSON doesnt output the SAB API from what I see. How can I use the API from the config file in the widget?


- Nick8888 - 2010-11-06

JSON stands for JavaScript Object Notation (it is just a data format, as is xml)

widgets/wSabnzbd uses this api:
http://sabnzbd.wikidot.com/api#toc6

You can see it clearly from widgets/wSabnzbd line 15:
Code:
$queryurl = $saburl."api?mode=".$command."&output=json"."&apikey=".$sabapikey;

And this is an example of how it uses it:
Code:
$sabqueue = sabQuery("qstatus");
//echo "<br/><pre>".print_r($sabqueue)."</pre>";

echo "\t<p>".$sabqueue["state"];

Uncomment the middle part to see the full json array


- Avigrace - 2010-11-06

Probably something I'm doing wrong but the home button on the top bar always duplicates the url like https://IP.port/mediafrontpage/mediafrontpage/


- gugahoi - 2010-11-06

Thanks a lot, I got it working now. If paused, it resumes when clicked and if resumed it pauses. But the way I have it now the link opens up a new window that says 'ok' (the default answer from sab when the url is run), do you know how to run the url without having to open a new tab or window and without leaving the page, sort of in the background? I'm using a simple <a href> by the way.


- Nick8888 - 2010-11-06

Avigrace Wrote:Probably something I'm doing wrong but the home button on the top bar always duplicates the url like https://IP.port/mediafrontpage/mediafrontpage/

Try it again now.


- Avigrace - 2010-11-06

That change didn't fix it for me but oddly changing it to below worked.

<a href='./mediafrontpage.php' target='main'></a>";


- gugahoi - 2010-11-07

Avigrace Wrote:That change didn't fix it for me but oddly changing it to below worked.

<a href='./mediafrontpage.php' target='main'></a>";

This is what I was saying a few pages back. Without .php, it doesn't seem to work for me.

I've implemented a few new things in the Sab widget. When clicking PAUSED/DOWNLOADING it pauses/ starts the queue.

When downloading, the overall progress bar shows up with Time Left and Size left/ Size total.

The buttons next to each file progress bar Pauses/ Resumes the specific file.
And when paused from queue, "PAUSED - " is added to the begining of the name. I got rid of the name scrolling, now it is truncated to 40 characters.

What do you guys think?

Image


- Nick8888 - 2010-11-07

I can't see why adding .php would change anything unless you have something else in the folder named mediafrontpage.

Pausing individual items is a nice feature.

I've tried truncation in the past but didn't like the appearance as depending on what is in the string, the length will differ. You can achieve the same thing by using css so that it doesn't wrap.