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)



- Avigrace - 2010-11-08

Nick8888 Wrote:I have absolutely no idea why it is changing it to https then. It also appears to be removing the port.

I just tried on my system with :
$sickbeardcomingepisodes = 'http://user: pass@IP: PORT/sickbeard/comingEpisodes/';
$sickbeardurl = 'http://user: pass@IP: PORT/sickbeard';
NOTE: (the /sickbeard part shouldn't be needed unless you have specified a webroot in sickbeards own config)

This worked.

When you get home let me know what all three in my previous post are.

Will do, thanks


- Avigrace - 2010-11-08

My config...

// enter path to sickbeards's coming episodes page
$sickbeardcomingepisodes = "http://user:password@externalIP:PORT/comingEpisodes/";
$sickbeardurl = "http://user:password@externalIP:Port";

both URL's work fine directly, the first takes me to comingepisodes and the second takes me to the home page.

Sickbeards images are located

http://externalIP:port/showPoster/?show=73255

but mediafrontpage expects them at

https://externalIP/showPoster/?show=73255

so somewhere MFP is dropping the port and using https, for info I am running MFP under XAMPP using https and port 80, sickbeard is the windows .exe version under a different port.

If you need anymore info let me know


EDIT** Just did a latest pull and it is all working fine again.


- hotlobster - 2010-11-08

Hi

Quote:They shouldn't be causing it. (Thanks for listing them. Zarquon cleaned them up today so it shouldn't warn about them anymore)

Does the music section I added yesterday work for you? I am interested in hearing other people's experience with the media library widget. Is it working for people?

Yes the music section works perfectly here.

Only clicking on movie section have problem ( and showing movie info in latest added movie ).

Some new test I've made:

Code:
http://myhost/mediafrontpage/widgets/wXBMCLibrary.php?w=re&style=w&a=d&bc=re&showid=&season=1&videoid=459
Works.
xbmc log:
Code:
GetEpisodesByWhere query: select * from episodeview order by idEpisode desc limit 25
Time for actual SQL query = 1
Time to retrieve episodes from dataset = 6
Code:
http://myhost/mediafrontpage/widgets/wXBMCLibrary.php?w=rm&style=w&a=d&bc=rm&videoid=389
Doesn't Works.

I've checked in the xbmc mysql database and videoid 389 exist.

Xbmc log:
Code:
GetSetsNav query: SELECT sets.idSet,sets.strSet,COUNT(1) AS c,count(files.playCount) FROM sets JOIN setlinkmovie ON sets.idSet=setlinkmovie.idSet JOIN movie ON setlinkmovie.idMovie=movie.idMovie JOIN files ON files.idFile=movie.idFile  GROUP BY sets.idSet HAVING c>1
GetMoviesByWhere query: select * from movieview WHERE movieview.idMovie NOT IN (SELECT idMovie FROM setlinkmovie s1 JOIN(SELECT idSet, COUNT(1) AS c FROM setlinkmovie GROUP BY idSet HAVING c>1) s2 ON s2.idSet=s1.idSet)
Time for actual SQL query = 6
Time to retrieve movies from dataset = 78

The only difference i have in between my Tv Shows and Movies databases is the scrapper. I use TVDB in english for TV, and Cinepassion in french for movie.

Perhaps a character encoding problem when receiving special characters in json data ?

edit:
Other thing, why does it calls getMovies for having one movie details ?
Because when i call this
Quote:wXBMCLibrary.php?w=rm&style=w&a=d&bc=rm&videoid=389
, it seems to give this request acording to the logs:

Quote:{"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}

This not seems to be the json call we want , isn't it ?


- danz0l - 2010-11-08

does this only work on an apache server ? nothing much working on lighthttpd, probably due to redirect rules ?


- Zarquon - 2010-11-09

danz0l Wrote:does this only work on an apache server ? nothing much working on lighthttpd, probably due to redirect rules ?

Does is PHP-CURL supported. MediaFrontPage heavily relies on it.


- gugahoi - 2010-11-09

Nick8888 Wrote:Yeh I wouldn't mind seeing your code for pausing (all and individual items) in sabnzbd. Perhaps just use pastebin.com

I'll do it now. You're going to have to change quite a few things because you've been using the simple JSON output and to get individual items I had to use the advanced. But I think in the long run you better just convert everything to advanced since it gives you way more options. I also managed to get a delete button for individual items, I'll post that with the rest of the code.

Quote:I am running on windows using the .exe version of sickbeard and don't know how to hide it behind apache which would probably fix it if I included /sickbeard/ in the config strings.

If anyone knows how I hide a site behind apache with XAMPP I would appreciate it as it looks neater than my setup.

I would also like to know that.



And one more thing maybe someone can help me with: when I try to access my site through Safari, it gives me a page saying it's a phishing site because it has my username and pass in the url, therefore I and up not being able to access it. Anyone knows of a way to hide the username and pass from the browser but still be able to access the page without having to put sabnzbd, sickbeard and couchpotato pass everytime? In Chrome everything works fine.


- gugahoi - 2010-11-09

Here is the pastebin link. I've commented almost every line just in case. I assume there are better ways to accomplish what I've done but this at least is functional. The class tags are different as I've changed them them around in my css.

I was fiddling around with the css and accidentally came up with a pretty cool design for banners in the coming episodes widget and then had the idea that maybe you could add an option in the config file to for people that use banners? just like you did with the alternate theme.

Lastly, just giving feedback that the XBMC library widget has worked for me since I first started using this.

I forgot to mention I created a hidden frame to direct the href links so that it doesn't change the page

Code:
            <iframe src ="" width="0px" height="0px" name="nothing" frameborder='0'>
                <p>Your browser does not support iframes.</p>
            </iframe>



- Nick8888 - 2010-11-09

hotlobster Wrote:Hi



Yes the music section works perfectly here.

Only clicking on movie section have problem ( and showing movie info in latest added movie ).

Some new test I've made:

Code:
http://myhost/mediafrontpage/widgets/wXBMCLibrary.php?w=re&style=w&a=d&bc=re&showid=&season=1&videoid=459
Works.
xbmc log:
Code:
GetEpisodesByWhere query: select * from episodeview order by idEpisode desc limit 25
Time for actual SQL query = 1
Time to retrieve episodes from dataset = 6
Code:
http://myhost/mediafrontpage/widgets/wXBMCLibrary.php?w=rm&style=w&a=d&bc=rm&videoid=389
Doesn't Works.

I've checked in the xbmc mysql database and videoid 389 exist.

Xbmc log:
Code:
GetSetsNav query: SELECT sets.idSet,sets.strSet,COUNT(1) AS c,count(files.playCount) FROM sets JOIN setlinkmovie ON sets.idSet=setlinkmovie.idSet JOIN movie ON setlinkmovie.idMovie=movie.idMovie JOIN files ON files.idFile=movie.idFile  GROUP BY sets.idSet HAVING c>1
GetMoviesByWhere query: select * from movieview WHERE movieview.idMovie NOT IN (SELECT idMovie FROM setlinkmovie s1 JOIN(SELECT idSet, COUNT(1) AS c FROM setlinkmovie GROUP BY idSet HAVING c>1) s2 ON s2.idSet=s1.idSet)
Time for actual SQL query = 6
Time to retrieve movies from dataset = 78

The only difference i have in between my Tv Shows and Movies databases is the scrapper. I use TVDB in english for TV, and Cinepassion in french for movie.

Perhaps a character encoding problem when receiving special characters in json data ?

edit:
Other thing, why does it calls getMovies for having one movie details ?
Because when i call this

, it seems to give this request acording to the logs:



This not seems to be the json call we want , isn't it ?

Okay, I'm thinking it is taking too long and curl is timing out perhaps? It should be just requesting the movie info for the one movie but instead it gets them all and finds the correct one itself. I'll have a go at fixing it when I get a chance.

Edit: doesn't look like you can with videoid/movieid. I should be able to use the start and end parameters to achieve it though


- DejaVu - 2010-11-09

Just updated from the Git and have to say "WOW", it's come along a bundle and looks the bees knees.

Keep up the good work lads.
Anywhere we can post suggestions yet?


- Nick8888 - 2010-11-09

DejaVu77 Wrote:Just updated from the Git and have to say "WOW", it's come along a bundle and looks the bees knees.

Keep up the good work lads.
Anywhere we can post suggestions yet?

Either in this thread or here:
https://github.com/nick8888/mediafrontpage/issues


- Nick8888 - 2010-11-09

@hotlobster,

Can you test these three files and let me know which display output
1. http://pastebin.com/QThVY5qn
2. http://pastebin.com/pKVy4fQY
3. http://pastebin.com/T0sU4Ue0


- Nick8888 - 2010-11-09

gugahoi Wrote:Here is the pastebin link. I've commented almost every line just in case. I assume there are better ways to accomplish what I've done but this at least is functional. The class tags are different as I've changed them them around in my css.

Cool thanks, I'll have a look at it tonight and see what I can add to the github branch.

Quote:I was fiddling around with the css and accidentally came up with a pretty cool design for banners in the coming episodes widget and then had the idea that maybe you could add an option in the config file to for people that use banners? just like you did with the alternate theme.
Yeh I thought of adding this, and might still but I do think it is something which should be fixed in sickbeard itself.
Quote:Lastly, just giving feedback that the XBMC library widget has worked for me since I first started using this.
Thanks for letting us know. Good to know its working for some people.
Quote:I forgot to mention I created a hidden frame to direct the href links so that it doesn't change the page.
Cool. This could be done using ajax like is done in the library and nowplaying widgets.


- hotlobster - 2010-11-09

Quote:@hotlobster,

Can you test these three files and let me know which display output
1. http://pastebin.com/QThVY5qn
2. http://pastebin.com/pKVy4fQY
3. http://pastebin.com/T0sU4Ue0

Ok tested, so :

1. output "1"
2. output "1".
3. output:
Quote:"Array ( [id] => 1 [jsonrpc] => 2.0 [result] => Array ( [end] => 101 [movies] => Array ( [0] => Array ( [director] => Tony Jaa [duration] => 5580 [file] => stack://smb://MEDIACENTER/Storage/Videos/FILMS/Films/Ong Bak 2/Ong.Bak.2.2008.VOSTFR.DVDRiP.AC3.XviD.CD1-VoStFrCreW.avi , smb://MEDIACENTER/Storage/Videos/FILMS/Films/Ong Bak 2/Ong.Bak.2.2008.VOSTFR.DVDRiP.AC3.XviD.CD2-VoStFrCreW.avi [genre] => Action [label] => Ong-Bak 2 [lastplayed] => 2010-08-02 18:01:19 [movieid] => 101 [mpaa] => Tourné en :Thaï / [originaltitle] => Ong-Bak 2 [plot] => Un jeune boxeur thaï apprend les rudiments du combat et le sens des Arts Martiaux. [rating] => 7 [thumbnail] => special://masterprofile/Thumbnails/Video/7/7f9b9346.tbn [title] => Ong-Bak 2 [year] => 2006 ) ) [start] => 100 [total] => 400 ) ) 1"

Encoding characters for mediafrontpage should use UTF8. Json output UTF8 data, but it seems mediafrontpage is encoded in ISO-8859-1.

This would be a problem with special characters perhaps.


- Nick8888 - 2010-11-09

I think this confirms it is a problem with the timeout in either curl, php or apache. Can you try using
Code:
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
In the first two files and let me know if it works. I'm guessing you have a large movies library? It would also be handy if you could test with a different smaller library.


- hotlobster - 2010-11-09

Not so large I think. I have almost 500 movies , and 12 tv shows with many seasons.

Tested while adding curl option as sugested, but it still answer "1" on booth first test.

I tryed increasing timeouts to 60 but it doesn't change anything.

Anyway i tryed to call the jsonrpc remotely from my office, with javascript ( using xbmc json debug interface ), for a full getMovies, and it takes less than 6 seconds to answer and download the full json data.

I don't think the problem come from curl timeout.