Clickfinder and TV-Server (1 Viewer)

edieter

Portal Member
July 14, 2007
10
1
Hi,

If you like clickfinder, a German tv-guide, and use the tvserver of mp, these two scripts might be interesting for you. They allow direct programming of recordings out of clickfinder. :D Simply choose "an Sendetermin erinnern" in clickfinder, exit clickfinder and the schedule in tvserver is set.

Installation:
1. Install PHP if not done yet
2. Set up two ODBC-connections to tvlibrary (tvlibrary) and the clickfinder-libary (tvdaten.mdb).
3. Adjust the names of the ODBC-connections and put this script into a file called clickfinder.php in the clickfinder directory:
------------------
<?php

$dbtvserver = odbc_connect('tvlibrary' , '', '', SQL_CUR_USE_ODBC);
$dbcf = odbc_connect('clickfinder', '', '', SQL_CUR_USE_ODBC);

$rescf = odbc_exec ($dbcf, "SELECT Sendungen.SenderKennung, Sendungen.Beginn, Sendungen.Ende, Markierungen.Sendung FROM Markierungen INNER JOIN Sendungen ON Markierungen.Pos = Sendungen.Pos;");
while (odbc_fetch_row($rescf))
{
$sender = odbc_result($rescf,"SenderKennung");
$sendung = odbc_result($rescf,"Sendung");
$beginn = odbc_result($rescf,"Beginn");
$ende = odbc_result($rescf,"Ende");

echo "$sender - $sendung ($beginn - $ende)";

$res_tvs1 = odbc_exec ($dbtvserver,"SELECT idChannel FROM Channel WHERE name = '$sender';");
if (odbc_fetch_row($res_tvs1))
{
$id_sender=odbc_result($res_tvs1,"idChannel");
$res=odbc_exec($dbtvserver,"INSERT INTO schedule VALUES(NULL, '$id_sender', '0', '$sendung', '$beginn', '$ende', '5', '0', ' ', '0', '0', '2000-01-01', '1', '5', '2000-01-01', '-1')");
}
}
$rescf = odbc_exec ($dbcf, "DELETE FROM Markierungen;");
?>
------------------

4. Put this script into a file called clickfinder.vba in the clickfinder directory, adjust the path settings and start clickfinder by calling this script
------------------
WScript.CreateObject("WScript.Shell").Run "tvghost.exe",0,True
WScript.CreateObject("WScript.Shell").Run "C:\PHP\php.exe C:\Programme\clickfinder\clickfinder.php",0,True
WScript.CreateObject("WScript.Shell").Run "taskkill /IM tvtip.exe",0
------------------

That's it, have fun!

Regards
EDieter
 

Users who are viewing this thread

Top Bottom