Ever curious which shows will be deleted 1st, 2nd, 3rd, an..

G

Guest

Guest
Archived from groups: alt.video.ptv.tivo (More info?)

<!--save this as an .xhtml file, put in the appropiate IP(s), media
access key, and drive size
and click on expires to sort-->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Loading...</title>
<script type="text/javascript">
<![CDATA[
var tivo = new Array(5);
tivo[0]=["Living Room","192.168.0.101"];
//tivo[1]=["Master Bedroom","192.168.0.101"];
//tivo[2]=["Den","192.168.0.101"];
//tivo[3]=["Kitchen","192.168.0.101"];
//tivo[4]=["Bathroom","192.168.0.101"];
var mak='0123456789'; //your media access key
var totalGB = 29.252; //(optional) total gigabytes used to record shows

window.onload = function (evt) {
if (tivo[1]){
var f = document.createElement('form');
f.setAttribute('name','frmSelTiVo');
f.setAttribute('id','frmSelTiVo');
var s = document.createElement('select');
s.setAttribute('disabled',"disabled");
s.setAttribute('name','selTiVos');
s.setAttribute('id','selTiVos');
s.onchange=getContent;
var o = new Array(5);
var oTN = new Array(5);
for (i = 0; i < 5; i++) {
if (tivo){
o = document.createElement('option');
o.setAttribute('value',tivo[1]);
oTN = document.createTextNode(tivo[0]);
o.appendChild(oTN);
s.appendChild(o);
}
}
f.appendChild(s);
document.body.appendChild(f);
}
getContent();
}
function getContent(){
var tivo_ip = tivo[0][1];
if (document.getElementById("selTiVos")){
var tivo_list = document.getElementById("selTiVos");
tivo_list.setAttribute('disabled','disabled');
tivo_ip = tivo_list.options[tivo_list.selectedIndex].value;
}
document.title="Loading...";
if (document.getElementById('content')){
document.body.removeChild(document.getElementById('content'));
}
var contentDiv = document.createElement('div');
contentDiv.setAttribute('id','content');
document.body.appendChild(contentDiv);
var xsltNS = 'http://www.w3.org/1999/XSL/Transform';
var xsltSheet = document.getElementsByTagNameNS(xsltNS,
'stylesheet')[0];
var xsltProcessor = new XSLTProcessor();
var xmlDoc;
xsltProcessor.importStylesheet(xsltSheet);
var myXMLHTTPRequest = new XMLHttpRequest();
netscape.security.PrivilegeManager.enablePrivilege
('UniversalBrowserRead');
myXMLHTTPRequest.open("GET", 'https://'+tivo_ip+
'/TiVoConnect?Command=QueryContainer&Container=%
2FNowPlaying&Recurse=Yes'
, true,'tivo',mak);
myXMLHTTPRequest.send(null);
myXMLHTTPRequest.onreadystatechange=function() {
if (myXMLHTTPRequest.readyState==4) {
netscape.security.PrivilegeManager.enablePrivilege
('UniversalBrowserRead');
xmlDoc = myXMLHTTPRequest.responseXML;
var fragment = xsltProcessor.transformToFragment(xmlDoc,
document);
document.getElementById('content').appendChild(fragment);
convertDates();
calcTimeLeft();
var tblNP = document.getElementById('nowPlay');
for (i = 0; i < tblNP.rows.length; i++) {
getExpDate(tivo_ip, tblNP.rows.cells[2], i,
tblNP.rows.length-1);
}
if (document.getElementById("selTiVos")){
document.getElementById("selTiVos").removeAttribute
('disabled');
}
}
}
}
function getExpDate(tivo_ip, node, timesCalled, timesToBeCalled){
var showId = node.childNodes[0].childNodes[0].nodeValue;
var myXMLHTTPRequest = new XMLHttpRequest();
netscape.security.PrivilegeManager.enablePrivilege
('UniversalBrowserRead');
myXMLHTTPRequest.open("GET", 'https://'+tivo_ip+
'/TiVoVideoDetails?id='+showId, true,'tivo',mak);
myXMLHTTPRequest.send(null);
myXMLHTTPRequest.onreadystatechange=function() {
if (myXMLHTTPRequest.readyState==4) {
if (myXMLHTTPRequest.status!=200){
getExpDate(tivo_ip, node, timesCalled, timesToBeCalled);
} else {
netscape.security.PrivilegeManager.enablePrivilege
('UniversalBrowserRead');
var responseText = myXMLHTTPRequest.responseText;
var zuluTime = responseText.match( /<expirationTime>(.+)
<\/expirationTime>/ )
var spanNode = document.createElement("span");
if (zuluTime[1]=='2038-01-19T00:00:00Z') {
var textNode=document.createTextNode('Never');
spanNode.appendChild(textNode);
node.appendChild(spanNode);
node.childNodes[0].childNodes[0].nodeValue=
9999999999;
} else{
var y = zuluTime[1].substring(0,4);
var mo = zuluTime[1].substring(5,7);
var d = zuluTime[1].substring(8,10);
var h = zuluTime[1].substring(11,13);
var m = zuluTime[1].substring(14,16);
var s = zuluTime[1].substring(17,19);
var expDate = new Date(Date.UTC(y,mo-1,d,h,m,s));
var weekday=new Array
("Sun","Mon","Tue","Wed","Thu","Fri","Sat");
var d =weekday[expDate.getDay()]+' '+
(expDate.getMonth()+1)+'/'+expDate.getDate();
var textNode=document.createTextNode(d);
var di = document.createElement("div");
var tn = document.createTextNode(getClockTime
(expDate));
di.appendChild(tn);
spanNode.appendChild(textNode);
spanNode.appendChild(di);
node.appendChild(spanNode);
node.childNodes[0].childNodes[0].nodeValue=
(expDate.getTime()/1000);
}
if (timesCalled==timesToBeCalled){
var where = " on my Tivo";
if (document.getElementById("selTiVos")){
var tivo_list = document.getElementById
("selTiVos");
where = " in my "+tivo_list.options
[tivo_list.selectedIndex].childNodes[0].nodeValue
}
document.title="Now Playing"+where;
if (document.getElementById('exp'))
document.getElementById('exp').className = 'sort';
}
}
}
}
}

function convertDates(){
var tblNP = document.getElementById('nowPlay');
for (i = 0; i < tblNP.rows.length; i++) {
var hexDate = tblNP.rows.cells[3].childNodes[1].nodeValue;
var d=new Date((parseInt(hexDate, 16))*1000+2000);
var weekday=new Array
("Sun","Mon","Tue","Wed","Thu","Fri","Sat");
var newValue =weekday[d.getDay()]+' '+(d.getMonth()+1)
+'/'+d.getDate();
tblNP.rows.cells[3].childNodes[1].nodeValue = newValue;
var di = document.createElement("div");
var tn = document.createTextNode(getClockTime(d));
di.appendChild(tn);
tblNP.rows.cells[3].appendChild(di);
}
if (document.getElementById('suggest')) {
var tblSu = document.getElementById('suggest');
for (i = 0; i < tblSu.rows.length; i++) {
var hexDate = tblSu.rows.cells[2].childNodes
[1].nodeValue;
var d=new Date((parseInt(hexDate, 16))*1000+2000);
var weekday=new Array
("Sun","Mon","Tue","Wed","Thu","Fri","Sat");
var newValue =weekday[d.getDay()]+' '+(d.getMonth()+1)
+'/'+d.getDate();
tblSu.rows.cells[2].childNodes[1].nodeValue = newValue;
var di = document.createElement("div");
var tn = document.createTextNode(getClockTime(d));
di.appendChild(tn);
tblSu.rows.cells[2].appendChild(di);
}
}
}
function getClockTime(d)
{
var hour = d.getHours();
var minute = d.getMinutes();
var ap = "A";
if (hour > 11) { ap = "P";}
if (hour > 12) { hour = hour - 12; }
if (hour == 0) { hour = 12; }
if (minute < 10) { minute = "0" + minute; }
var timeString = hour + ':' + minute +ap;
return timeString;
}
function calcTimeLeft(){
var used = document.body.getElementsByTagName('i')[0].childNodes
[0].nodeValue;
if (totalGB>used) {
var leftGB = totalGB - used;
var hoursLeft = leftGB * 1073741824/475354/3600;
var ho = Math.floor(hoursLeft);
var min = Math.round((hoursLeft - ho)*60);
var h2 = document.createElement("h2");
var tn = document.createTextNode('~ '+ho+'hr '+min+'min TimeLeft
(@High)');
h2.appendChild(tn);
document.body.getElementsByTagName('h1')[0].appendChild(h2);
}
}

function sortTable(col, tableBody) {
var tblEl = document.getElementById(tableBody);

if (tblEl.reverseSort == null) tblEl.reverseSort = new Array();
if (col == tblEl.lastColumn) tblEl.reverseSort[col] = !
tblEl.reverseSort[col];
tblEl.lastColumn = col;

var oldDsply = tblEl.style.display;
tblEl.style.display = "none";

var tmpEl, i, j, minVal, minIdx, testVal, cmp;
for (i = 0; i < tblEl.rows.length - 1; i++) {
minIdx = i;
minVal = tblEl.rows.cells[col].childNodes[0].childNodes
[0].nodeValue;
for (j = i + 1; j < tblEl.rows.length; j++) {
testVal = tblEl.rows[j].cells[col].childNodes[0].childNodes
[0].nodeValue;
cmp = compareValues(minVal, testVal);
if (tblEl.reverseSort[col])
cmp = -cmp;
if (cmp > 0) {
minIdx = j;
minVal = testVal;
}
}
if (minIdx > i) {
tmpEl = tblEl.removeChild(tblEl.rows[minIdx]);
tblEl.insertBefore(tmpEl, tblEl.rows);
}
}
tblEl.style.display = oldDsply;
}

function compareValues(v1, v2) {
var f1, f2;
if (v1.substring(0,4)=='The ') v1=v1.substring(4);
if (v1.substring(0,2)=='A ') v1=v1.substring(2);
if (v1.substring(0,2)=='0x'){
f1 = parseInt(v1,16);
f2 = parseInt(v2,16);
} else {
f1= parseInt(v1);
f2=parseInt(v2);
}
if (!isNaN(f1) && !isNaN(f2)) {
v1 = f1;
v2 = f2;
}

if (v1 == v2) return 0;
if (v1 > v2) return 1
return -1;
}

function showNowRecordingDetails(urlend){
var tivo_ip = tivo[0][1];
if (document.getElementById("selTiVos")){
var tivo_list = document.getElementById("selTiVos");
tivo_ip = tivo_list.options[tivo_list.selectedIndex].value;
}

if (document.getElementById("nowRec").childNodes
[0].nodeValue=="show"){
document.getElementById("nowRec").childNodes
[0].nodeValue="hide";
var xsltProcessor = new XSLTProcessor();
var xsltSheet = document.getElementsByTagNameNS
('http://www.w3.org/1999/XSL/Transform', 'stylesheet')[1];
xsltProcessor.importStylesheet(xsltSheet);
var myXMLHTTPRequest = new XMLHttpRequest();
netscape.security.PrivilegeManager.enablePrivilege
('UniversalBrowserRead');
myXMLHTTPRequest.open("GET", 'https://'+tivo_ip+urlend,
false,'tivo',mak);
myXMLHTTPRequest.send(null);
xmlDoc = myXMLHTTPRequest.responseXML;
var fragment = xsltProcessor.transformToFragment(xmlDoc,
document);
var nr=document.getElementById("recDesc");
nr.appendChild(fragment);

} else {
var nr=document.getElementById("recDesc");
nr.removeChild(nr.lastChild);
document.getElementById("nowRec").childNodes
[0].nodeValue="show";
}
}
function showDetails(showNum){
var tivo_ip = tivo[0][1];
if (document.getElementById("selTiVos")){
var tivo_list = document.getElementById("selTiVos");
tivo_ip = tivo_list.options[tivo_list.selectedIndex].value;
}

if (document.getElementById('SH'+showNum).childNodes
[0].nodeValue=="show"){
var xsltProcessor = new XSLTProcessor();
var xsltSheet = document.getElementsByTagNameNS
('http://www.w3.org/1999/XSL/Transform', 'stylesheet')[1];
xsltProcessor.importStylesheet(xsltSheet);
var myXMLHTTPRequest = new XMLHttpRequest();
netscape.security.PrivilegeManager.enablePrivilege
('UniversalBrowserRead');
myXMLHTTPRequest.open("GET",
'https://'+tivo_ip+'/TiVoVideoDetails?id='+showNum, false,'tivo',mak);
myXMLHTTPRequest.send(null);
xmlDoc = myXMLHTTPRequest.responseXML;
var fragment = xsltProcessor.transformToFragment(xmlDoc,
document);
var row=document.getElementById(showNum);
row.childNodes[1].appendChild(fragment);
document.getElementById('SH'+showNum).childNodes
[0].nodeValue="hide";

} else {
var row=document.getElementById(showNum);
row.childNodes[1].removeChild(row.childNodes[1].lastChild);
document.getElementById('SH'+showNum).childNodes
[0].nodeValue="show";
}
}
function showSuggTable() {
if (document.getElementById("suggShowHide").childNodes
[0].nodeValue=="show"){
document.getElementById("suggTable").style.display="block";
document.getElementById("suggShowHide").childNodes
[0].nodeValue="hide"
} else {
document.getElementById("suggTable").style.display="none";
document.getElementById("suggShowHide").childNodes
[0].nodeValue="show"
}
}

]]>
</script>

<style type="text/css">
body { font-family: sans-serif }
a.sh { cursor: pointer; color:#0000ff }
a.search{ text-decoration:none;color:#000000}
a.search:hover { color:#0000ff;text-decoration:underline}
a.sort { cursor: pointer; color:#000000 }
a.sort:hover { color:#790619}
.sortBy {display:none}
.cantSortYet { color:#ffffff }
.cantSelectYet { display:blur }
h1 { font-size: large }
h2 { font-size: medium }
tr { font-size: small }
th { font-size: small; padding: 7px }
td { font-size: small; padding: 7px }
</style>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:t="http://www.tivo.com/developer/calypso-protocol-1.5/">
<xsl:eek:utput method="html"/>

<xsl:template match="/">
<xsl:for-each select="t:TiVoContainer/t:Item[t:Details/t:InProgress]">
<xsl:variable name="vd" select="t:Links/t:TiVoVideoDetails/t:Url"/>

<b>Now Recording</b>
<xsl:choose>
<xsl:when test="../t:Item[1]/t:Details/t:InProgress"> (Planned)
</xsl:when>
<xsl:eek:therwise> (Suggestion)</xsl:eek:therwise>
</xsl:choose>
<br/>
<xsl:value-of select="t:Details/t:SourceStation"/> Ch. 
<xsl:value-of select="substring-before(t:Details/t:SourceChannel,'-
0')"/>
<b> 
<xsl:value-of select="t:Details/t:Title"/>
<xsl:if test="t:Details/t:EpisodeTitle">: "<xsl:value-of
select="t:Details/t:EpisodeTitle"/>"</xsl:if>
</b>
 
<span style="font-family:courier">[<b>details:</b>
<a class='sh' onclick="showNowRecordingDetails('{$vd}')">
<xsl:attribute name="id">nowRec</xsl:attribute>show</a>]
</span>
<br/>
<span>
<xsl:attribute name="id">recDesc</xsl:attribute>
<xsl:value-of select="t:Details/t:Description"/></span>
<hr></hr>
</xsl:for-each>
<h1>Now Playing -
<xsl:value-of select="count(t:TiVoContainer/t:Item[not
(t:Details/t:InProgress
or t:Links/t:CustomIcon/t:Url=
'urn:tivo:image:suggestion-recording')])"/>
 Shows
<xsl:variable name="hr" select="floor(sum(//t:Duration[not
(../t:InProgress
or ../../t:Links/t:CustomIcon/t:Url=
'urn:tivo:image:suggestion-recording')])
div 3600000)"/>
<xsl:variable name="min" select="(sum(//t:Duration[not(../t:InProgress
or ../../t:Links/t:CustomIcon/t:Url=
'urn:tivo:image:suggestion-
recording')])
div 3600000)-$hr"/>
(<xsl:value-of select="$hr"/>hr
<xsl:value-of select="round($min*6000 div 100)"/>min using
<b><i>
<xsl:value-of select="round(sum(//t:SourceSize[not(../t:InProgress
or ../../t:Links/t:CustomIcon/t:Url=
'urn:tivo:image:suggestion-
recording')])
div 1073741824 * 100) div 100"/>
</i></b><b>GB</b>)
</h1>

<table id='tab' style="width:100%;">
<thead>
<tr style="background-color:#E5E5C5;">
<th style="width:1%"><a class='sort' onclick="sortTable(0, 'nowPlay')">
Source</a></th>
<th><a class='sort' onclick="sortTable(1, 'nowPlay')">Description</a>
</th>
<th style="width:5%"><a class='cantSortYet' onclick="sortTable(2,
'nowPlay')">
<xsl:attribute name="id">exp</xsl:attribute>Expires</a></th>
<th style="width:5%"><a class='sort' onclick="sortTable(3, 'nowPlay')">
Captured</a></th>
<th style="width:5%"><a class='sort' onclick="sortTable(4, 'nowPlay')">
Size</a></th>
<th style="width:5%"><a class='sort' onclick="sortTable(5, 'nowPlay')">
Quality</a></th>
</tr>
</thead>
<tbody>
<xsl:attribute name="id">nowPlay</xsl:attribute>
<xsl:for-each select="t:TiVoContainer/t:Item[not(t:Details/t:InProgress
or t:Links/t:CustomIcon/t:Url='urn:tivo:image:suggestion-
recording')]">
<xsl:variable name="showUrl" select="t:Links/t:TiVoVideoDetails/t:Url"/>
<xsl:variable name="showNum" select="substring-after($showUrl,'id=')"/>
<tr id="{$showNum}">
<td style="background-color:#fc0000;vertical-align:top;text-
align:center;">
<span class="sortBy"><xsl:value-of select="t:Details/t:SourceStation"/>
</span>
<xsl:value-of select="t:Details/t:SourceStation"/><br/>
<xsl:value-of select="substring-before(t:Details/t:SourceChannel,'-
0')"/>
</td>

<td style="background-color:#F5F595;vertical-align:top;text-
align:left;">
<span class="sortBy"><xsl:value-of select="t:Details/t:Title"/></span>
<span style="float:right;font-family:courier">[<b>details:</b>
<a class='sh' id="SH{$showNum}" onclick="showDetails('{$showNum}')">show
</a>]</span>
<xsl:choose>
<xsl:when test="t:Links/t:CustomIcon/t:Url=
'urn:tivo:image:save-until-i-delete-recording'">
<span style="background-color:#00ff00">
<b>
<xsl:value-of select="t:Details/t:Title"/>
<xsl:if test="t:Details/t:EpisodeTitle">: "<xsl:value-of
select="t:Details/t:EpisodeTitle"/>"</xsl:if>
</b>
</span>
</xsl:when>
<xsl:eek:therwise>
<span style="color:#000000">
<b>
<xsl:value-of select="t:Details/t:Title"/>
<xsl:if test="t:Details/t:EpisodeTitle">: "<xsl:value-of
select="t:Details/t:EpisodeTitle"/>"</xsl:if>
</b>
</span>
</xsl:eek:therwise>
</xsl:choose>

<br/>
<xsl:value-of select="t:Details/t:Description"/>
</td>
<td>
<xsl:attribute name="style">
background-color:#32c864;vertical-align:top;text-align:center
</xsl:attribute>
<span class="sortBy"><xsl:value-of select="$showNum"/></span>
</td>
<td>
<xsl:attribute name="style">
background-color:#32c864;vertical-align:top;text-align:center
</xsl:attribute>
<span class="sortBy"><xsl:value-of select="t:Details/t:CaptureDate"/>
</span>
<xsl:value-of select="t:Details/t:CaptureDate"/>
</td>



<xsl:variable name="dur" select="t:Details/t:Duration div 3600000"/>
<xsl:variable name="hr" select="floor($dur)"/>
<xsl:variable name="min" select="round((($dur)-($hr))*60)"/>

<td style="background-color:#fe9900;vertical-align:top;text-
align:center;">
<span class="sortBy"><xsl:value-of select="t:Details/t:SourceSize"/>
</span>
<xsl:choose>
<xsl:when test="$min = 60">
<xsl:value-of select="$hr+1"/>:00</xsl:when>
<xsl:eek:therwise>
<xsl:value-of select="$hr"/>:<xsl:if test="$min < 10">0
</xsl:if><xsl:value-of select="$min"/>
</xsl:eek:therwise>
</xsl:choose>
<br/>
<xsl:variable name="download" select="t:Links/t:Content/t:Url"/>
<a href='{$download}'>
<xsl:value-of select="round(t:Details/t:SourceSize div 1024 div 1024)"/>
</a> MB
</td>

<td style="background-color:#6565ca;vertical-align:top;text-
align:center;">
<xsl:variable name="bs" select="t:Details/t:SourceSize div
(t:Details/t:Duration div 1000)"/>
<xsl:variable name="qual">
<xsl:choose>
<xsl:when test="$bs > 600000">Best</xsl:when>
<xsl:when test="$bs > 400000 and $bs < 600000">High
</xsl:when>
<xsl:when test="$bs > 300000 and $bs < 400000">Medium
</xsl:when>
<xsl:eek:therwise>Basic</xsl:eek:therwise>
</xsl:choose>
</xsl:variable>
<span class="sortBy"><xsl:value-of select="$qual"/></span>
<b><xsl:value-of select="$qual"/></b>
</td>

</tr>
</xsl:for-each>
</tbody>
</table>


<xsl:variable name="numSugg" select="count(t:TiVoContainer/t:Item
[t:Links/t:CustomIcon/t:Url='urn:tivo:image:suggestion-
recording'])"/>
<xsl:if test="$numSugg > 0">
<hr></hr>
<b id="ts">TiVo Suggestions: </b>
<xsl:value-of select="$numSugg"/>
 Shows  
<span style="font-family:courier">[<a class='sh' onclick="showSuggTable
()">
<xsl:attribute name="id">suggShowHide</xsl:attribute>show</a>]</span>
<br/>
<table style="display:none;width:100%">
<xsl:attribute name="id">suggTable</xsl:attribute>
<thead>
<tr style="background-color:#E5E5C5;">
<th style="width:1%"><a class='sort' onclick="sortTable(0, 'suggest')">
Source</a></th>
<th><a class='sort' onclick="sortTable(1, 'suggest')">Description</a>
</th>
<th style="width:5%"><a class='sort' onclick="sortTable(2, 'suggest')">
Captured</a></th>
<th style="width:5%"><a class='sort' onclick="sortTable(3, 'suggest')">
Size</a></th>
<th style="width:5%"><a class='sort' onclick="sortTable(4, 'suggest')">
Quality</a></th>
</tr>
</thead>
<tbody>
<xsl:attribute name="id">suggest</xsl:attribute>
<xsl:variable name="numNowPlay" select="count(t:TiVoContainer/t:Item[not
(t:Details/t:InProgress
or t:Links/t:CustomIcon/t:Url=
'urn:tivo:image:suggestion-recording')])"/>
<xsl:for-each select="t:TiVoContainer/t:Item
[t:Links/t:CustomIcon/t:Url='urn:tivo:image:suggestion-
recording']">
<xsl:sort select="t:Details/t:Title"/>
<xsl:variable name="showUrl" select="t:Links/t:TiVoVideoDetails/t:Url"/>
<xsl:variable name="showNum" select="substring-after($showUrl,'id=')"/>
<tr id="{$showNum}">
<td style="width:1%;background-color:#fc0000;vertical-align:top;text-
align:center;">
<span class="sortBy"><xsl:value-of select="t:Details/t:SourceStation"/>
</span>
<xsl:value-of select="t:Details/t:SourceStation"/>
<br/>
<xsl:value-of select="substring-before(t:Details/t:SourceChannel,'-
0')"/>
</td>

<td style="background-color:#F5F595;vertical-align:top;text-
align:left;">
<span class="sortBy"><xsl:value-of select="t:Details/t:Title"/></span>
<xsl:variable name="vd" select="t:Links/t:TiVoVideoDetails/t:Url"/>
<span style="float:right;font-family:courier">[<b>details:</b>
<a class='sh' id="SH{$showNum}" onclick="showDetails('{$showNum}')">show
</a>]</span>
<xsl:choose>
<xsl:when test="t:Links/t:CustomIcon/t:Url=
'urn:tivo:image:save-until-i-delete-recording'">
<span style="background-color:#00ff00">
<b><xsl:value-of select="t:Details/t:Title"/>
<xsl:if test="t:Details/t:EpisodeTitle">: "<xsl:value-of
select="t:Details/t:EpisodeTitle"/>"</xsl:if>
</b>
</span>
</xsl:when>
<xsl:eek:therwise>
<span style="color:#000000">
<b>
<xsl:value-of select="t:Details/t:Title"/>
<xsl:if test="t:Details/t:EpisodeTitle">: "<xsl:value-of
select="t:Details/t:EpisodeTitle"/>"</xsl:if>
</b>
</span>
</xsl:eek:therwise>
</xsl:choose>

<br/>
<xsl:value-of select="t:Details/t:Description"/>
</td>

<td >
<xsl:attribute name="style">
width:5%;background-color:#32c864;vertical-align:top;text-align:center
</xsl:attribute>
<span class="sortBy"><xsl:value-of select="t:Details/t:CaptureDate"/>
</span>
<xsl:value-of select="t:Details/t:CaptureDate"/>
</td>


<xsl:variable name="dur" select="t:Details/t:Duration div 3600000"/>
<xsl:variable name="hr" select="floor($dur)"/>
<xsl:variable name="min" select="round((($dur)-($hr))*60)"/>

<td style="width:5%;background-color:#fe9900;vertical-align:top;text-
align:center;">
<span class="sortBy"><xsl:value-of select="t:Details/t:SourceSize"/>
</span>
<xsl:choose>
<xsl:when test="$min = 60">
1:00
</xsl:when>
<xsl:eek:therwise>
<xsl:value-of select="$hr"/>:<xsl:if test="$min < 10">0
</xsl:if>
<xsl:value-of select="$min"/>
</xsl:eek:therwise>
</xsl:choose>
<br/>
<xsl:variable name="download" select="t:Links/t:Content/t:Url"/>
<a href='{$download}'>
<xsl:value-of select="round(t:Details/t:SourceSize div 1024 div 1024)"/>
</a> MB
</td>

<td style="width:5%;background-color:#6565ca;vertical-align:top;text-
align:center;">
<xsl:variable name="bs" select="t:Details/t:SourceSize div
(t:Details/t:Duration div 1000)"/>
<xsl:variable name="qual">
<xsl:choose>
<xsl:when test="$bs > 600000">Best</xsl:when>
<xsl:when test="$bs > 400000 and $bs < 600000">High
</xsl:when>
<xsl:when test="$bs > 300000 and $bs < 400000">Medium
</xsl:when>
<xsl:eek:therwise>Basic</xsl:eek:therwise>
</xsl:choose>
</xsl:variable>
<span class="sortBy"><xsl:value-of select="$qual"/></span>
<b><xsl:value-of select="$qual"/></b>
</td>
</tr>
</xsl:for-each>
</tbody>
</table>
</xsl:if>

</xsl:template>
</xsl:stylesheet>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

xmlns:TvBusMarshalledStruct="http://tivo.com/developer/xml/idl/TvBusMars
halledStruct">
<xsl:eek:utput method="html"/>
<xsl:template match="/TvBusMarshalledStruct:TvBusEnvelope">
<xsl:variable name="oAD" select="showing/program/originalAirDate"/>
<xsl:variable name="expD" select="expirationTime"/>
<xsl:variable name="bkMk" select="vBookmark/element/time"/>
<table style="background-color:#FFFF7E;border-top: 2px solid #
000000;border-left: 2px solid #000000;width:100%;">
<tr>

<td style="padding: 2px;width:200px;vertical-align: top;text-
align:left">
Watched so far: <xsl:choose>
<xsl:when test="vBookmark/element">
<b>
<xsl:variable name="wsf" select="translate(substring-after
(substring-before($bkMk,'M'),'PT'),'H','h')"/>
<xsl:choose>
<xsl:when test="$wsf"><xsl:value-of select="$wsf"/></xsl:when>
<xsl:eek:therwise><1</xsl:eek:therwise>
</xsl:choose>min</b>
</xsl:when>
<xsl:eek:therwise>(None)</xsl:eek:therwise>
</xsl:choose><br/>

<xsl:if test="showing/program/originalAirDate">
Original Air Date: <b>
<xsl:value-of select="translate(concat(substring($oAD,6,5),'-',substring
($oAD,1,4)),'-','/')"/>
</b>
</xsl:if>
<br/>
<xsl:if test="showing/program/episodeNumber">
Episode Number: 
<xsl:value-of select="showing/program/episodeNumber"/>
<br/>
</xsl:if>
</td>

<td style="padding: 2px;vertical-align: top">
<xsl:if test="showing/program/vProgramGenre">
Genre: 
<xsl:for-each select="showing/program/vProgramGenre/element">
<xsl:value-of select="."/>
<xsl:if test="position()!=last()">, </xsl:if>
</xsl:for-each>
<br/>
</xsl:if>
<xsl:if test="showing/program/movieYear">
Year: 
<xsl:value-of select="showing/program/movieYear"/>
<br/>
</xsl:if>
<xsl:if test="showing/program/mpaaRating">
Rated: 
<xsl:value-of select="showing/program/mpaaRating"/>
</xsl:if>
</td>
</tr>

<xsl:if test="showing/program/vActor/element">
<tr><td colspan="2" style="padding: 2px">
<u>Actors</u>: 
<xsl:for-each select="showing/program/vActor/element">
<xsl:variable name="fname" select="substring-after(.,'|')"/>
<xsl:variable name="lname" select="substring-before(.,'|')"/>
<xsl:variable name="nam">
<xsl:value-of select="concat($fname,' ',$lname)"/>
</xsl:variable>
<a class='search' href="http://www.imdb.com/Find?for={$fname}%20{$lname}
&select=People">
<xsl:value-of select="$nam"/></a>
<xsl:if test="position()!=last()">, </xsl:if>
</xsl:for-each>
</td></tr>
</xsl:if>

<xsl:if test="showing/program/vGuestStar/element">
<tr><td colspan="2" style="padding: 2px">
<u>Guest Stars</u>: 
<xsl:for-each select="showing/program/vGuestStar/element">
<xsl:variable name="fname" select="substring-after(.,'|')"/>
<xsl:variable name="lname" select="substring-before(.,'|')"/>
<xsl:variable name="nam">
<xsl:value-of select="concat($fname,' ',$lname)"/>
</xsl:variable>
<a class='search' href="http://www.imdb.com/Find?for={$fname}%20{$lname}
&select=People">
<xsl:value-of select="$nam"/></a>
<xsl:if test="position()!=last()">, </xsl:if>
</xsl:for-each>
</td></tr>
</xsl:if>

<xsl:if test="showing/program/vHost/element">
<tr><td colspan="2" style="padding: 2px">
<u>Host</u>: 
<xsl:for-each select="showing/program/vHost/element">
<xsl:variable name="fname" select="substring-after(.,'|')"/>
<xsl:variable name="lname" select="substring-before(.,'|')"/>
<xsl:variable name="nam">
<xsl:value-of select="concat($fname,' ',$lname)"/>
</xsl:variable>
<a class='search' href="http://www.imdb.com/Find?for={$fname}%20{$lname}
&select=People">
<xsl:value-of select="$nam"/></a>
<xsl:if test="position()!=last()">, </xsl:if>
</xsl:for-each>
</td></tr>
</xsl:if>

<xsl:if test="showing/program/vDirector/element">
<tr><td colspan="2" style="padding: 2px">
<u>Directed by</u>: 
<xsl:for-each select="showing/program/vDirector/element">
<xsl:variable name="fname" select="substring-after(.,'|')"/>
<xsl:variable name="lname" select="substring-before(.,'|')"/>
<xsl:variable name="nam">
<xsl:value-of select="concat($fname,' ',$lname)"/>
</xsl:variable>
<a class='search' href="http://www.imdb.com/Find?for={$fname}%20{$lname}
&select=People">
<xsl:value-of select="$nam"/></a>
<xsl:if test="position()!=last()">, </xsl:if>
</xsl:for-each>
</td></tr>
</xsl:if>

<xsl:if test="showing/program/vWriter/element">
<tr><td colspan="2" style="padding: 2px">
<u>Written by</u>: 
<xsl:for-each select="showing/program/vWriter/element">
<xsl:variable name="fname" select="substring-after(.,'|')"/>
<xsl:variable name="lname" select="substring-before(.,'|')"/>
<xsl:variable name="nam">
<xsl:value-of select="concat($fname,' ',$lname)"/>
</xsl:variable>
<a class='search' href="http://www.imdb.com/Find?for={$fname}%20{$lname}
&select=People">
<xsl:value-of select="$nam"/></a>
<xsl:if test="position()!=last()">, </xsl:if>
</xsl:for-each>
</td></tr>
</xsl:if>

<xsl:if test="showing/program/vExecProducer/element">
<tr><td colspan="2" style="padding: 2px">
<u>Exec. Produced by</u>: 
<xsl:for-each select="showing/program/vExecProducer/element">
<xsl:variable name="fname" select="substring-after(.,'|')"/>
<xsl:variable name="lname" select="substring-before(.,'|')"/>
<xsl:variable name="nam">
<xsl:value-of select="concat($fname,' ',$lname)"/>
</xsl:variable>
<a class='search' href="http://www.imdb.com/Find?for={$fname}%20{$lname}
&select=People">
<xsl:value-of select="$nam"/></a>
<xsl:if test="position()!=last()">, </xsl:if>
</xsl:for-each>
</td></tr>
</xsl:if>

</table>
</xsl:template>
</xsl:stylesheet>

</head>
<body>
</body>
</html>
 
G

Guest

Guest
Archived from groups: alt.video.ptv.tivo (More info?)

ya first gotta concatenate lines (72+73),(113+114),(215+216)

and use FIREFOX