Better alignment.
[pyTivo/wmcbrine.git] / plugins / togo / templates / npl.tmpl
blobe27dab8635f70630a1c3db62889c26fe779d1084
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"\r
2 "http://www.w3.org/TR/html4/strict.dtd">\r
3 <html>\r
4 <head>\r
5 <title>pyTivo - ToGo</title>\r
6 <link rel="stylesheet" type="text/css" href="/main.css">\r
7 </head>\r
8 <body>\r
9 <form action="/TiVoConnect" method="POST">\r
10 <p id="titlep"><span id="title">\r
11 <a href="/">pyTivo</a> /\r
12   #if $folder != ''\r
13 <a href="/TiVoConnect?Command=NPL&amp;Container=$quote($container)&amp;TiVo=$tivoIP">\r
14   #end if\r
15 Pull from $escape($tname)\r
16   #if $folder != ''\r
17 </a> / $escape($title)\r
18   #end if\r
19 </span></p>\r
20 <table id="main">\r
21   #if $ItemStart > 0\r
22         <tr><td colspan="5">\r
23         #set $Offset = -($ItemStart + 1)\r
24         #if $Offset < -($shows_per_page+1)\r
25            #set $Offset = -($shows_per_page+1)\r
26         #end if\r
27         <a href="/TiVoConnect?Command=NPL&amp;Container=$quote($container)&amp;TiVo=$tivoIP&amp;AnchorItem=$FirstAnchor&amp;AnchorOffset=$Offset&amp;Folder=$folder">Previous Page</a>\r
28         </td></tr>\r
29   #end if\r
30   #set $i = 0\r
31   ## i variable is used to alternate colors of row\r
32   ## loop through passed data printing row for each show or folder\r
33   #for $row in $data\r
34           #set $i += 1\r
35           #set $j = $i%2\r
36           <tr class="row$(j)">\r
37           #if $row['ContentType'] == 'x-tivo-container/folder'\r
38             ## This is a folder\r
39                 <td></td>\r
40                 <td><img src="/folder.png" alt=""></td>\r
41                 <td class="progmain"><a href='/TiVoConnect?Command=NPL&amp;Container=$quote($container)&amp;Folder=$(row["UniqueId"])&amp;TiVo=$tivoIP'>$row['Title'] </a></td>\r
42                 <td class="progsize">$(row["TotalItems"]) Items</td>\r
43                 <td class="progdate">$row["LastChangeDate"]</td>\r
44           #else\r
45             ## This is a show\r
46                 <td>\r
47                 #if 'Url' in $row and not ($row['Url'] in $status and ($status[$row['Url']]['running'] or $status[$row['Url']]['queued'])) and not ('CopyProtected' in $row and $row['CopyProtected'] == 'Yes') and not ('Icon' in $row and $row['Icon'] == 'urn:tivo:image:in-progress-recording')\r
48                         <input type="checkbox" name="Url" value="$escape($row['Url'])">\r
49                 #end if\r
50                 </td>\r
51                 <td>\r
52                 #if 'CopyProtected' in $row and $row['CopyProtected'] == 'Yes'\r
53                         <img src="/nocopy.png" alt="">\r
54                 #elif 'Icon' in $row\r
55                     <!-- Display icons similar to TiVo colored circles -->\r
56                         #if $row['Icon'] == 'urn:tivo:image:expires-soon-recording'\r
57                                 <img src="/soon.png" alt="">\r
58                         #else if $row['Icon'] == 'urn:tivo:image:expired-recording'\r
59                                 <img src="/expired.png" alt="">\r
60                         #else if $row['Icon'] == 'urn:tivo:image:save-until-i-delete-recording'\r
61                                 <img src="/kuid.png" alt="">\r
62                         #else if $row['Icon'] == 'urn:tivo:image:in-progress-recording'\r
63                                 <img src="/recording.png" alt="">\r
64                         #end if\r
65                 #end if\r
66                 </td>\r
67                 <td class="progmain">\r
68                         #if 'episodeTitle' in $row\r
69                         <span class="progtitle">$escape($row['title']): $escape($row['episodeTitle'])</span>\r
70                         #else\r
71                         <span class="progtitle">$escape($row['title'])</span>\r
72                         #end if\r
73                         <span class="progdesc">#if 'description' in $row\r
74                         $escape($row['description'])\r
75                         #end if\r
76                         #if 'displayMajorNumber' in $row and 'callsign' in $row\r
77                         $row['displayMajorNumber'] $row['callsign']\r
78                         #end if\r
79                         </span>\r
80                         #if 'Url' in $row and row['Url'] in $status\r
81                                 #set $this_status = $status[$row['Url']]\r
82                                 #if $this_status['running'] and $this_status['rate'] != ""\r
83                                         <div class="transferring">\r
84                                         #set $gb = '%.3f GB' % (float($this_status['size']) / (1024 ** 3))\r
85                                         Transfering - $this_status['rate']<br>$gb\r
86                                         <a href="/TiVoConnect?Command=ToGoStop&amp;Container=$quote($container)&amp;Url=$quote($row['Url'])">Stop Transfer</a>\r
87                                         </div>\r
88                                 #elif $this_status['running'] and $this_status['rate'] == ""\r
89                                         <div class="transferring">\r
90                                         Initiating Transfer<br>\r
91                                         Please Wait\r
92                                         </div>\r
93                                 #elif $this_status['error']\r
94                                         <div class="failed">\r
95                                         Error - $this_status['error']<br>\r
96                                         </div>\r
97                                 #elif $this_status['finished']\r
98                                         <div>\r
99                                         Transfer Complete\r
100                                         </div>\r
101                                 #elif $this_status['queued']\r
102                                         <div class="queued">\r
103                                         Queued: $queue.index($row['Url'])<br>\r
104                                         <a href="/TiVoConnect?Command=Unqueue&amp;Container=$quote($container)&amp;Url=$quote($row['Url'])&amp;TiVo=$tivoIP">Unqueue</a>\r
105                                         </div>\r
106                                 #end if\r
107                         #end if\r
108                 </td>\r
109                 <td class="progsize">$row['SourceSize'] <br>\r
110                 $row['Duration']\r
111                 </td>\r
112                 <td class="progdate">$row['CaptureDate']</td>\r
113           #end if\r
114           </tr>\r
115   #end for\r
116   #if ($TotalItems - $ItemCount) > ($ItemStart + 1)\r
117      <tr><td colspan="5">\r
118      #set $Offset = $shows_per_page - 1\r
119      <a href="/TiVoConnect?Command=NPL&amp;Container=$quote($container)&amp;TiVo=$tivoIP&amp;AnchorItem=$FirstAnchor&amp;AnchorOffset=$Offset&amp;Folder=$folder">Next Page</a>\r
120      </td></tr>\r
121   #end if\r
122 </table>\r
123 <p>\r
124  <input type="hidden" name="Command" value="ToGo">\r
125  <input type="hidden" name="Container" value="$container">\r
126  <input type="hidden" name="TiVo" value="$tivoIP">\r
127 #if $has_tivodecode\r
128  <input type="checkbox" name="decode">Decrypt with tivodecode<br>\r
129 #end if\r
130  <input type="checkbox" name="save">Save metadata to .txt<br>\r
131 </p>\r
132 <p>\r
133  <input value="Transfer Selected" type="submit">\r
134 </p>\r
135 </form>\r
136 </body>\r
137 </html>\r