Initial Commit
[Projects.git] / pkgbuilds / pytivo / pkg / usr / share / pyTivo / plugins / togo / templates / npl.tmpl
blobf77988424c31c190a8762f5ce1076aac04f9091a
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\r
2 <html>\r
3 <head>\r
4   <meta content="text/html; charset=UTF-8" http-equiv="content-type">\r
5   <title>pyTivo - ToGo</title>\r
6 </head>\r
7 <body style="background-color: rgb(250, 250, 250);">\r
8 \r
9 #set $tname = $tivoIP\r
10 #for $tsn in $tivos\r
11     #if $tivoIP == $tivos[$tsn]\r
12         #set $tname = $tivo_names[$tsn]\r
13     #end if\r
14 #end for\r
15 <p align="center"><font size="6">pyTivo - ToGo - $tname</font></p>\r
16 <table style="border: 1px solid rgb(220, 220, 220);background-color: rgb(255, 255, 255);text-align: left;" border="0" cellpadding="0" cellspacing="4">\r
17   <tbody>\r
18     <tr>\r
19       <td>\r
20       <div>\r
21                   #if $ItemStart > 0\r
22                         #set $Offset = -($ItemStart + 1)\r
23                         #if $Offset < -($shows_per_page+1)\r
24                            #set $Offset = -($shows_per_page+1)\r
25                         #end if\r
26                         <a href="/TiVoConnect?Command=NPL&Container=$quote($container)&TiVo=$tivoIP&AnchorItem=$FirstAnchor&AnchorOffset=$Offset&Folder=$folder">Previous Page</a>\r
27                   #end if\r
28                   <table>\r
29                   #if $folder != ''\r
30                         <!-- We are in a subfolder, offer the option to return to NPL -->\r
31                         <tr><td colspan=5><a href="/TiVoConnect?Command=NPL&Container=$quote($container)&TiVo=$tivoIP">Back to Now Playing List</a></td></tr>\r
32                   #end if\r
33                   #set $i = 0\r
34                   <!-- i variable is used to alternate colors of row -->\r
35                   <!-- loop through passed data printing row for each show or folder -->\r
36                   #for $row in $data\r
37                           #set $i += 1\r
38                           #if $i%2\r
39                                 <tr style="background-color: rgb(240, 240, 240);">\r
40                           #else\r
41                                 <tr>\r
42                           #end if\r
43                           #if $row['ContentType'] == 'x-tivo-container/folder'\r
44                             <!-- This is a folder -->\r
45                                 <td></td>\r
46                                 <td><a href='/TiVoConnect?Command=NPL&Container=$quote($container)&Folder=$(row["UniqueId"])&TiVo=$tivoIP'>$row['Title'] </a></td>\r
47                                 <td NOWRAP align="center">$(row["TotalItems"]) Items</td>\r
48                                 <td NOWRAP align="center">$row["LastChangeDate"]</td>\r
49                                 <td></td>\r
50                           #else\r
51                             <!-- This is a show -->\r
52                                 #if 'Icon' in $row\r
53                                     <!-- Display small table with color similar to TiVo colored circles -->\r
54                                         #if $row['Icon'] == 'urn:tivo:image:expires-soon-recording'\r
55                                                 <td><table><tr><td height=18 width=8 bgcolor='yellow'> </td></tr></table></td>\r
56                                         #else if $row['Icon'] == 'urn:tivo:image:expired-recording'\r
57                                                 <td><table><tr><td height=18 width=8 bgcolor='yellow'><b> ! </b></td></tr></table></td>\r
58                                         #else if $row['Icon'] == 'urn:tivo:image:save-until-i-delete-recording'\r
59                                                 <td><table><tr><td height=18 width=8 bgcolor='green'></td></tr></table></td>                            \r
60                                         #else\r
61                                                 <td width=8></td>\r
62                                         #end if\r
63                                 #else\r
64                                     <!-- No Icon listed in XML sheet -->\r
65                                         <td width=4></td>\r
66                                 #end if\r
67                                 <td width=*>\r
68                                         #if 'episodeTitle' in $row\r
69                                         <b>$row['title']: $row['episodeTitle']</b><br>\r
70                                         #else\r
71                                         <b>$row['title']</b><br>\r
72                                         #end if\r
73                                         <small>#if 'description' in $row\r
74                                         $row['description']\r
75                                         #end if\r
76                                         #if 'displayMajorNumber' in $row and 'callsign' in $row\r
77                                         $row['displayMajorNumber'] $row['callsign']</small>\r
78                                         #end if\r
79                                 </td>\r
80                                 <td NOWRAP align="center">$row['SourceSize'] <br>\r
81                                 $row['Duration']\r
82                                 </td>\r
83                                 <td NOWRAP align="center">$row['CaptureDate']</td>\r
84                                 #if 'CopyProtected' in $row and $row['CopyProtected'] == 'Yes'\r
85                                         <td>CopyProtected</td>\r
86                                 #else if 'Url' in $row\r
87                                         <td NOWRAP>\r
88                                         #if $row['Url'] in $status\r
89                                                 #set $this_status = $status[$row['Url']]\r
90                                                 #if $this_status['running'] and $this_status['rate'] != ""\r
91                                                         #set $gb = '%.3f GB' % (float($this_status['size']) / (1024 ** 3))\r
92                                                         Transfering - $this_status['rate'] KB/s<br>$gb\r
93                                                         <a href="/TiVoConnect?Command=ToGoStop&Container=$quote($container)&Url=$quote($row['Url'])&TiVo=$tivoIP&Redirect=NPL">Stop Transfer</a>\r
94                                                 #elif $this_status['running'] and $this_status['rate'] == ""\r
95                                                         Initiating Transfer.<br>\r
96                                                         Please Wait\r
97                                                 #elif $this_status['error']\r
98                                                         Error - $this_status['error']<br>\r
99                                                         <a href="/TiVoConnect?Command=ToGo&Container=$quote($container)&Url=$quote($row['Url'])&TiVo=$tivoIP&Redirect=NPL">Try Transfer Again.</a>\r
100                                                 #elif $this_status['finished']\r
101                                                         Transfer Complete\r
102                                                 #else\r
103                                                         Transfer Stopped<br>\r
104                                                         <a href="/TiVoConnect?Command=ToGo&Container=$quote($container)&Url=$quote($row['Url'])&TiVo=$tivoIP&Redirect=NPL">Try Transfer Again.</a>\r
105                                                 #end if\r
106                                         #else\r
107                                                 <a href="/TiVoConnect?Command=ToGo&Container=$quote($container)&Url=$quote($row['Url'])&TiVo=$tivoIP&Redirect=NPL">Transfer This.</a>\r
108                                         #end if\r
109                                         </td>\r
110                                 #else\r
111                                     <!-- No URL was in links url in XML -->\r
112                                         <td></td>\r
113                                 #end if\r
114                           #end if\r
115                           </tr>\r
116                   #end for\r
117                   </table>\r
118                   #if ($TotalItems - $ItemCount) > ($ItemStart + 1)\r
119                      #set $Offset = $shows_per_page - 1\r
120                      <a href="/TiVoConnect?Command=NPL&Container=$quote($container)&TiVo=$tivoIP&AnchorItem=$FirstAnchor&AnchorOffset=$Offset&Folder=$folder">Next Page</a>\r
121                   #end if\r
122       </div>\r
123       </td>\r
124     </tr>\r
125   </tbody>\r
126 </table>\r
127 </body>\r
128 </html>\r