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)



- boulala - 2011-03-18

Quote:If you can understand the code for the coming episodes widget than this should be possible. Have a look at the example widget to get the barebones but some research is gonna be required.

bumper. i hoped somebody had already done somthing like that and could just give me the config for the widget. it seems like i have to do some serious reading Nerd


- hernandito - 2011-03-19

Never mind... I figured it out...


Default Search - hernandito - 2011-03-19

gugahoi Wrote:Hey all, I finally managed to get the Search widget to work as I intended. No reload required, results are loaded on the fly! I've got a few bugs I'm gonna need to sort but all in all I'm very happy with the way I got it done. If you guys want to have a look at it just head on to my repo --> https://github.com/gugahoi/mediafrontpage/

Gugahoi,

Love the search widget... Thank you.

I have a quick question/suggestion. Is it possible to default a search web site (NZBMatrix) and a given category (movies HD.264) for the widget?

Pretty much I always search one of the sites and a couple categories. It would make it much easier if these were assigned when I load the page.

Doing this is way beyond my expertise.

Thanks again.


- gugahoi - 2011-03-19

hernandito Wrote:Gugahoi,

Love the search widget... Thank you.

I have a quick question/suggestion. Is it possible to default a search web site (NZBMatrix) and a given category (movies HD.264) for the widget?

Pretty much I always search one of the sites and a couple categories. It would make it much easier if these were assigned when I load the page.

Doing this is way beyond my expertise.

Thanks again.

Good to hear! I want to know everyone's experience and opinions. Answering your question -- it should be pretty easy to have it default to a category. I'm not in front of my computer now, but I'll let you know as soon as I can.


- RaNaMaster - 2011-03-19

ya that would be nice sense i wanted to remove the XXX =)


- gugahoi - 2011-03-19

RaNaMaster Wrote:ya that would be nice sense i wanted to remove the XXX =)

Exactly what I thought. Some people would probably enjoy the extra parental control ability. Would you guys think a password based solution would be best? I was thinking that depending on your password, we could try and restrict the categories that show up? I'm not sure how feasible it is but just thinking the best way to implement it.


- andyh69uk - 2011-03-19

gugahoi,

Not sure if this is something I am doing wrong but when I first tried to search I got the following error (using NZBMatrix):-

Code:
Notice: Undefined offset: 1 in C:\xampp\htdocs\mediafrontpage\widgets\searchComponents\query.php on line 91

Notice: Undefined offset: 2 in C:\xampp\htdocs\mediafrontpage\widgets\searchComponents\query.php on line 92

Notice: Undefined offset: 3 in C:\xampp\htdocs\mediafrontpage\widgets\searchComponents\query.php on line 93

There was more than this but just more undefined offset errors. In the nzbmatrix function I have just wrapped the code that is setting the ID, Name, Link, etc in an if statement to check if the item array has more than 1 element and it seems to have fixed the problem.

Also, the nzb.su function was throwing an undefined constant error, defining the constants when looking up guid, name, etc seemed to solve this.

I have not got a lot of experience with PHP so please accept my apologies if these are errors something to do with my own set-up.


- branlr - 2011-03-19

Request:

Any way we could get some smooth lookin' drop down sub menus on the nav bar, editable from the config file? That bar is much too precious real estate to not have more items on it.

BTW, I love this project. Great job guys.


- gugahoi - 2011-03-20

andyh69uk Wrote:gugahoi,

Not sure if this is something I am doing wrong but when I first tried to search I got the following error (using NZBMatrix):-

Code:
Notice: Undefined offset: 1 in C:\xampp\htdocs\mediafrontpage\widgets\searchComponents\query.php on line 91

Notice: Undefined offset: 2 in C:\xampp\htdocs\mediafrontpage\widgets\searchComponents\query.php on line 92

Notice: Undefined offset: 3 in C:\xampp\htdocs\mediafrontpage\widgets\searchComponents\query.php on line 93

There was more than this but just more undefined offset errors. In the nzbmatrix function I have just wrapped the code that is setting the ID, Name, Link, etc in an if statement to check if the item array has more than 1 element and it seems to have fixed the problem.

Also, the nzb.su function was throwing an undefined constant error, defining the constants when looking up guid, name, etc seemed to solve this.

I have not got a lot of experience with PHP so please accept my apologies if these are errors something to do with my own set-up.

I see how there could've been an error. Funny I've never gotten one. Would you mind telling me what did you search for so I can try and replicate this here? Don't worry about experience, I'm also learning as I go along, just glad you told me about those.

ps.: Forgot to celebrate my 100th post before... YEAH!


- andyh69uk - 2011-03-20

gugahoi Wrote:I see how there could've been an error. Funny I've never gotten one. Would you mind telling me what did you search for so I can try and replicate this here? Don't worry about experience, I'm also learning as I go along, just glad you told me about those.

ps.: Forgot to celebrate my 100th post before... YEAH!

I get an error when searching for anything, not much help I realise. I have PHP 5.3.3, using Firefox on Vista. I am using an XAMPP install of Apache.


- gugahoi - 2011-03-20

andyh69uk Wrote:I get an error when searching for anything, not much help I realise. I have PHP 5.3.3, using Firefox on Vista. I am using an XAMPP install of Apache.

Alright. Well that's pretty bad, haha. So did you manage to fix both? If so, how exactly?

Cheers


- andyh69uk - 2011-03-21

Ok, here's my NZBMatrix & NZBsu functions:-

PHP Code:
function nzbsu($q$saburl,$sabapikey$nzbsuapi$nzbsudl){

    
$type "";

    if(!empty(
$_GET['type'])){
        
$type "&cat=".$_GET['type'];
    }

    
$table "";
    
$search "http://nzb.su/api?t=search&q=".urlencode($q).$type."&apikey=".$nzbsuapi."&o=json";
    
$json = @file_get_contents($search);
    
$content json_decode($jsontrue);
    
//print_r($content);

    
foreach($content as &$array){
        
//print_r($array);
        //if(count($array)>1){
        
$id $array['guid'];
        
$name $array['name'];
        
$cat $array['category_name'];
        
$size $array['size'];
        
$postdate "<p>Date Posted: ".$array['postdate']."</p>";
        
$coments "<p>Coments: ".$array['comments']."</p>";
        
$group_name "<p> Group name: ".$array['group_name']."</p>";
        
$grabs "<p> Grabs: ".$array['grabs']."</p>";
        (!empty(
$array['seriesfull']))?($seriesfull=("<p>Episode info: ".$array['seriesfull']." ".$array['tvtitle']." ".$array['tvairdate']."</p>")):($seriesfull="");

        
$url="http://nzb.su/getnzb/".$id.".nzb".$nzbsudl;
        
$addToSab $saburl.'api?mode=addurl&name='.urlencode($url).'&apikey='.$sabapikey;
        
$nzblink "http://nzb.su/details/".$id;
        
$name str_replace(".""\n"$name);
        
$name str_replace(" ""\n"$name);
        
$item_desc $postdate.$coments.$group_name.$grabs.$seriesfull;
        
$item_desc str_replace("\n""<br>"$item_desc);
        
        
$addToSab addCategory($cat,$addToSab);
        
//}
        
if(strlen($name)!=0){
            
$table .= printTable($name,$cat,$size,$addToSab,$nzblink,$item_desc);
        }
    }
    return 
$table;



Just added apostrophes around the element index.

PHP Code:
function nzbmatrix($item$nzbusername$nzbapi,$saburl,$sabapikey) {
    
$type "";
    if(!empty(
$_GET['type'])){
        
$type "&catid=".$_GET['type'];
    }
    
$search "http://api.nzbmatrix.com/v1.1/search.php?search=".urlencode($item).$type."&username=".$nzbusername."&apikey=".$nzbapi;
    
$content file_get_contents($search);
    
$itemArray explode('|',$content);


    
$table "";

    foreach(
$itemArray as &$item){
        
$item explode(';',$item);
        
/*
                    foreach($item as &$value){
                    echo $value;
                    echo "</br>";
                    }
*/
        
if(count($item)>1){
        
$id $item[0];
        
$name substr($item[1],9);
        
$link "http://www.".substr($item[2], 6);
        
$size 0+substr($item[3], 6);
        
$size $size;
        
$cat substr($item[6],10);
        
$addToSab=$saburl."api?mode=addurl&name=http://www.".substr($link,6)."&nzbname=".urlencode($name)."&apikey=".$sabapikey;

        
$indexdate $item[4];
        
$group $item[7];
        
$comments $item[8];
        
$hits = (string)$item[9];
        
$nfo $item[10];
        
$item_desc "Not yet implemented";

        
$addToSab addCategory($cat,$addToSab);
        }
        if(
strlen($name)!=0){
            
$table .= printTable($name,$cat,$size,$addToSab,$link,$item_desc);
        }
    }
    return 
$table;


Just added an IF statement


- gugahoi - 2011-03-22

andyh69uk Wrote:Ok, here's my NZBMatrix & NZBsu functions:-

PHP Code:
function nzbsu($q$saburl,$sabapikey$nzbsuapi$nzbsudl){

    
$type "";

    if(!empty(
$_GET['type'])){
        
$type "&cat=".$_GET['type'];
    }

    
$table "";
    
$search "http://nzb.su/api?t=search&q=".urlencode($q).$type."&apikey=".$nzbsuapi."&o=json";
    
$json = @file_get_contents($search);
    
$content json_decode($jsontrue);
    
//print_r($content);

    
foreach($content as &$array){
... 

Just added an IF statement

I'll take that into consideration but since you are the first to have the problem I'll leave as it is, if more people start to have similar problems than I'll change it for good.

New anouncement to everyone. Kewlj, Ranamaster and I are starting an IRC channel to discuss ideas for new widgets and improvements for current ones. So come and join us on #mediafrontpage at Freenode.


index.html.1 2 3 ... - croontje - 2011-04-04

Hi,

I noticed a few weeks/months ago that sickbeard is generating index.html files in my XBMC Live root folder (/):

Code:
-rw-r--r--   1 root root 13680 2011-02-21 21:44 index.html
-rw-r--r--   1 root root 13685 2011-02-25 06:47 index.html.1
-rw-r--r--   1 root root 13768 2011-03-16 17:40 index.html.10
-rw-r--r--   1 root root 13772 2011-03-17 23:52 index.html.11
-rw-r--r--   1 root root 13685 2011-02-27 07:54 index.html.2
-rw-r--r--   1 root root 14093 2011-03-06 23:34 index.html.3
-rw-r--r--   1 root root 14090 2011-03-10 22:51 index.html.4
-rw-r--r--   1 root root 13774 2011-03-14 23:56 index.html.5
-rw-r--r--   1 root root 13768 2011-03-15 10:43 index.html.6
-rw-r--r--   1 root root 13768 2011-03-15 10:50 index.html.7
-rw-r--r--   1 root root 13768 2011-03-16 09:14 index.html.8
-rw-r--r--   1 root root 13768 2011-03-16 09:16 index.html.9

When I delete them they reappear after a while. I asked other users on the Dutch forum tweakers.net and there is at least 1 user with the same problem. I can't find anyone on google with the same problem. I asked midgetspy (creator of sickbeard) about it but he says it's almost certainly not sickbeard. The only other "suspect" I can think of is Mediafrontpage. Can anyone tell me if this is the case, and why those files are created?


An example of one of the html files: http://pastebin.com/rW7kn8F6


- syk3d - 2011-04-04

I'm experiencing the exact same thing. Doesn't bother me in the slightest, but yes, that does happen to me as well. I currently have 30 different index.html files in my root folder. I checked the dates on the files, and they have been there since the 13th of March. For me, that's roughly when I installed MFP.