Another stab at an EPG (1 Viewer)

ChrisOfCatford

MP Donator
  • Premium Supporter
  • August 2, 2006
    210
    6
    London UK
    Home Country
    United Kingdom United Kingdom
    Hello,

    I have had a go at making a really simple web EPG that helps me with recording and finding films (and other stuff as well).

    I didn't want to use the existing offerings as I already have web server running 24/7, and don't need the overheads of another one. Also, I just like making PHP applications.

    It works great (only on IE PHP and mysql), apart from any recordings I set using my interface ignore the default recording folder and record to the MP tv server root instead.

    Here is part of the code that I am using in case it helps:
    PHP:
    //Pre record
    $result=mysql_query("SELECT s.`value` FROM setting s WHERE s.`tag`='preRecordInterval'")
    or die("OOPS failed on select preRecord: ".mysql_error());
    
    $row=mysql_fetch_array($result);
    
    $prerecord=$row[0];
    
    //Post record
    $result=mysql_query("SELECT s.`value` FROM setting s WHERE s.`tag`='postRecordInterval'")
    or die("OOPS failed on SELECT postRecord: ".mysql_error());
    
    $row=mysql_fetch_array($result);
    
    $postrecord=$row[0];
    
    //Get GET vars from url
    $startdate=$_REQUEST["s"];
    
    $enddate=$_REQUEST["e"];
    
    $idchannel=$_REQUEST["c"];
    
    $title=$_REQUEST["t"];
    
    //Add the recording
    $result=mysql_query("INSERT INTO schedule (idChannel, scheduleType, programName, startTime, endTime, maxAirings, priority, quality, preRecordInterval, postRecordInterval, recommendedCard, keepDate, canceled) ".
    				"VALUES ('".$idchannel."' , '0' , '".$title."' , '".$startdate."' ,  '".$enddate."' , '2147483647' , '0' , '0' , '".$prerecord."' , '".$postrecord."' , '-1','2000-01-01 00:00:00','2000-01-01 00:00:00')")
    	or die("ERROR: ".mysql_error());

    Am I missing some setting somewhere? Is it even possible to set recordings JUST using the MYSQL DB? Can anyone help me solve this please?

    Thanks,
    Chris
     

    ChrisOfCatford

    MP Donator
  • Premium Supporter
  • August 2, 2006
    210
    6
    London UK
    Home Country
    United Kingdom United Kingdom
    Well, no-one had an answer so I think I solved it my self.

    Turns out you have to tell MP where each card records and not just the first card. I suppose so that you can record on multiple drives etc. So now I know. Duh!

    It is not pretty or fully featured, but it does seem to work (see attachment).

    Chris
     

    Attachments

    • myepg.JPG
      myepg.JPG
      83.1 KB

    Users who are viewing this thread

    Top Bottom