PDA

View Full Version : New Yahoo Widget for TiVo



RussellC
03-05-2006, 12:19 PM
A new OzTiVo Widget has been released that offers improved functionality over the current crop.

It can be found at http://www.widgetgallery.com

It provides:
To Do List
Now Showing List
Temperature
Remote Remote Control

It uses TiVoWeb to interrogate the TiVo, so obviously it requires a LAN card.

If you have a dynamic DNS, you can manage your TiVo from work. Using the remote control, you can really confuse the wife and kids!

RussellC

thomson
06-05-2006, 06:26 AM
A new OzTiVo Widget has been released that offers improved functionality over the current crop.

I have include the minor changes required to support both TW&TWP (it may look like a lot, but there really are just a few lines of code). I have tested this against an old TW 1.9.4 and the newer TWP 1.2.2 release (http://minnie.tuhs.org/twiki/bin/view/Software/UpgradeToTiVoWebPlus) that I have been working on.

I have also attached a copy of OzTiVo.kon file with these changes implemented. I have emailed the writer (Paul Denaro) with the changes. There is also a bug/typo where the forward/back buttons on the remote are reversed.



***************
*** 770,776 ****
URL_waiting = 0;
Spark.visible = 0;
}
! if (connectivityRequest.response <= 400 && /TiVo Web Project/.test(connectivityRequest.result)) {
main.src="Images/TiVoMain.png";
setNowShowingRefreshRequest();
setToDoRefreshRequest();
--- 770,776 ----
URL_waiting = 0;
Spark.visible = 0;
}
! if (connectivityRequest.response <= 400 && /(TiVo Web Project|TivoWebPlus)/.test(connectivityRequest.result)) {
main.src="Images/TiVoMain.png";
setNowShowingRefreshRequest();
setToDoRefreshRequest();
***************
*** 804,810 ****
var temp = 0;
var str=tempRequest.result.match(/^.*Current Temperature.*$/mg);
for (y in str) {
! temp = str[y].replace(/^.*>([0-9]*).<.TD><.TR>$/, "$1");
}
var tempval = temp;
if (Number(tempval) > Number(preferences.temperatureWarning.value)) {
--- 804,810 ----
var temp = 0;
var str=tempRequest.result.match(/^.*Current Temperature.*$/mg);
for (y in str) {
! temp = str[y].replace(/^.*>([0-9]*).*<.TD><.TR>$/, "$1");
}
var tempval = temp;
if (Number(tempval) > Number(preferences.temperatureWarning.value)) {
***************
*** 852,859 ****
title = columnArray[3].replace(/.*title="(.*)" HREF.*$/, "$1");
thedate = columnArray[4].replace(/^>(.*)<.TD>.*$/, "$1");
thedate = thedate + " " + columnArray[5].replace(/^>(.*)<.TD>.*$/, "$1");
! FSID = columnArray[7].replace(/^>(.*)<.TD>.*$/, "$1");
!
icon = "Images/noicon.png";

if (columnArray[1].match(/^.*\/img\/Recording/) != null) {
--- 852,862 ----
title = columnArray[3].replace(/.*title="(.*)" HREF.*$/, "$1");
thedate = columnArray[4].replace(/^>(.*)<.TD>.*$/, "$1");
thedate = thedate + " " + columnArray[5].replace(/^>(.*)<.TD>.*$/, "$1");
! FSID = columnArray[6].replace(/^.*fsid_[0-9]*_([0-9]*)".*$/, "$1");
! if (!/^[0-9]+$/.test(FSID)) {
! // We have a Channel column, use the next one
! FSID = columnArray[7].replace(/^.*fsid_[0-9]*_([0-9]*)".*$/, "$1");
! }
icon = "Images/noicon.png";

if (columnArray[1].match(/^.*\/img\/Recording/) != null) {
***************
*** 937,943 ****
if (ToDorequest.response <= 400) {
TDList = new Array();

! var str=ToDorequest.result.match(/^<TR.*CHECKBOX.*TR>$/mg);
for (y in str) {
var program = "";
var episode = "";
--- 940,947 ----
if (ToDorequest.response <= 400) {
TDList = new Array();

! // Allow a single CR in the line (for blocklist popup)
! var str=ToDorequest.result.match(/^<TR([^\r]*\r)?.*CHECKBOX.*TR>$/mg);
for (y in str) {
var program = "";
var episode = "";
***************
*** 957,963 ****
thedate = thedate + " " + columnArray[2].replace(/.*>([^<]*)<.TD>.*$/, "$1");
thedate = thedate + " " + columnArray[3].replace(/.*>([^<]*)<.TD>.*$/, "$1");
FSID = columnArray[7].replace(/^.*fsid_[0-9]*_([0-9]*)".*$/, "$1");
!
TDList[TDList.length] = program + "|" + episode + "|" + channel + "|" + thedate + "|" + FSID + "|" + title;
}

--- 961,971 ----
thedate = thedate + " " + columnArray[2].replace(/.*>([^<]*)<.TD>.*$/, "$1");
thedate = thedate + " " + columnArray[3].replace(/.*>([^<]*)<.TD>.*$/, "$1");
FSID = columnArray[7].replace(/^.*fsid_[0-9]*_([0-9]*)".*$/, "$1");
! if (!/^[0-9]+$/.test(FSID)) {
! // We have a blocklist column, use the next one
! FSID = columnArray[8].replace(/^.*fsid_[0-9]*_([0-9]*)".*$/, "$1");
! }
TDList[TDList.length] = program + "|" + episode + "|" + channel + "|" + thedate + "|" + FSID + "|" + title;
}