It turns out that the new FFmpeg adds parenthetical comments to other
[pyTivo/wmcbrine/lucasnz.git] / plugins / togo / templates / npl.tmpl
blobae5d6836071fc8c544e7bdc2c07fef8c90601734
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 - $escape($tname)</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">pyTivo - ToGo - $escape($tname)</span></p>\r
11 <p><a href="/">Home</a></p>\r
12 <script language="JavaScript">\r
13 <!--\r
14 function toggle(source) {\r
15         var checkboxes = document.getElementsByName('Url');\r
16         for (var i = 0; i < checkboxes.length; i++) {\r
17                 if (typeof(checkboxes[i].checked) != "undefined") {\r
18                         checkboxes[i].checked = source.checked;\r
19                         }\r
20         }\r
21 }\r
22 -->\r
23 </script>\r
24 <table id="main" border="0" cellpadding="0" cellspacing="4">\r
25   #if $ItemStart > 0\r
26         <tr><td colspan="5">\r
27         #set $Offset = -($ItemStart + 1)\r
28         #if $Offset < -($shows_per_page+1)\r
29            #set $Offset = -($shows_per_page+1)\r
30         #end if\r
31         <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
32         </td></tr>\r
33   #end if\r
34   #if $folder != ''\r
35         ## We are in a subfolder, offer the option to return to NPL\r
36         <tr>\r
37                 <td><img src="/back.png" alt=""></td>\r
38                 <td colspan=4><a href="/TiVoConnect?Command=NPL&amp;Container=$quote($container)&amp;TiVo=$tivoIP">Back to Now Playing List</a></td>\r
39         </tr>\r
40   #end if\r
41   ## Header Row\r
42         <tr class="header">\r
43                 <td><input type="checkbox" name="selectAll" onClick="toggle(this)" Title="Select All" /></td>\r
44                 <td></td>\r
45                 <td>Title</td>\r
46                 <td>Size</td>\r
47                 <td>Capture Date</td>\r
48         </tr>\r
49   #set $i = 0\r
50   ## i variable is used to alternate colors of row\r
51   ## loop through passed data printing row for each show or folder\r
52   #for $row in $data\r
53           #set $i += 1\r
54           #set $j = $i%2\r
55           <tr class="row$(j)">\r
56           #if $row['ContentType'] == 'x-tivo-container/folder'\r
57             ## This is a folder\r
58                 <td></td>\r
59                 <td><img src="/folder.png" alt=""></td>\r
60                 <td><a href='/TiVoConnect?Command=NPL&amp;Container=$quote($container)&amp;Folder=$(row["UniqueId"])&amp;TiVo=$tivoIP'>$row['Title'] </a></td>\r
61                 <td class="unbreak">$(row["TotalItems"]) Items</td>\r
62                 <td class="unbreak">$row["LastChangeDate"]</td>\r
63           #else\r
64             ## This is a show\r
65                 <td>\r
66                 #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
67                         <input type="checkbox" name="Url" value="$escape($row['Url'])">\r
68                 #end if\r
69                 </td>\r
70                 <td>\r
71                 #if 'CopyProtected' in $row and $row['CopyProtected'] == 'Yes'\r
72                         <img src="/nocopy.png" alt="">\r
73                 #elif 'Icon' in $row\r
74                     <!-- Display icons similar to TiVo colored circles -->\r
75                         #if $row['Icon'] == 'urn:tivo:image:expires-soon-recording'\r
76                                 <img src="/soon.png" alt="">\r
77                         #else if $row['Icon'] == 'urn:tivo:image:expired-recording'\r
78                                 <img src="/expired.png" alt="">\r
79                         #else if $row['Icon'] == 'urn:tivo:image:save-until-i-delete-recording'\r
80                                 <img src="/kuid.png" alt="">\r
81                         #else if $row['Icon'] == 'urn:tivo:image:in-progress-recording'\r
82                                 <img src="/recording.png" alt="">\r
83                         #end if\r
84                 #end if\r
85                 </td>\r
86                 <td>\r
87                         #if 'episodeTitle' in $row\r
88                         <span class="progtitle">$escape($row['title']): $escape($row['episodeTitle'])</span>\r
89                         #else\r
90                         <span class="progtitle">$escape($row['title'])</span>\r
91                         #end if\r
92                         <span class="progdesc">#if 'description' in $row\r
93                         $escape($row['description'])\r
94                         #end if\r
95                         #if 'displayMajorNumber' in $row and 'callsign' in $row\r
96                         $row['displayMajorNumber'] $row['callsign']\r
97                         #end if\r
98                         </span>\r
99                         #if 'Url' in $row and row['Url'] in $status\r
100                                 #set $this_status = $status[$row['Url']]\r
101                                 #if $this_status['running'] and $this_status['rate'] != ""\r
102                                         <div class="transferring">\r
103                                         #set $gb = '%.3f GB' % (float($this_status['size']) / (1024 ** 3))\r
104                                         Transfering - $this_status['rate']<br>$gb\r
105                                         <a href="/TiVoConnect?Command=ToGoStop&amp;Container=$quote($container)&amp;Url=$quote($row['Url'])">Stop Transfer</a>\r
106                                         </div>\r
107                                 #elif $this_status['running'] and $this_status['rate'] == ""\r
108                                         <div class="transferring">\r
109                                         Initiating Transfer<br>\r
110                                         Please Wait\r
111                                         </div>\r
112                                 #elif $this_status['error']\r
113                                         <div class="failed">\r
114                                         Error - $this_status['error']<br>\r
115                                         </div>\r
116                                 #elif $this_status['finished']\r
117                                         <div>\r
118                                         Transfer Complete\r
119                                         </div>\r
120                                 #elif $this_status['queued']\r
121                                         <div class="queued">\r
122                                         Queued: $queue.index($row['Url'])<br>\r
123                                         <a href="/TiVoConnect?Command=Unqueue&amp;Container=$quote($container)&amp;Url=$quote($row['Url'])&amp;TiVo=$tivoIP">Unqueue</a>\r
124                                         </div>\r
125                                 #end if\r
126                         #end if\r
127                 </td>\r
128                 <td class="unbreak">$row['SourceSize'] <br>\r
129                 $row['Duration']\r
130                 </td>\r
131                 <td class="unbreak">$row['CaptureDate']</td>\r
132           #end if\r
133           </tr>\r
134   #end for\r
135   #if ($TotalItems - $ItemCount) > ($ItemStart + 1)\r
136      <tr><td colspan="5">\r
137      #set $Offset = $shows_per_page - 1\r
138      <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
139      </td></tr>\r
140   #end if\r
141 </table>\r
142 <p>\r
143  <input type="hidden" name="Command" value="ToGo">\r
144  <input type="hidden" name="Container" value="$container">\r
145  <input type="hidden" name="TiVo" value="$tivoIP">\r
146 #if $has_tivodecode\r
147  <input type="checkbox" name="decode">Decrypt with tivodecode<br>\r
148 #end if\r
149  <input type="checkbox" name="save">Save metadata to .txt<br>\r
150 #if $togo_mpegts == 'default'\r
151  <input type="checkbox" checked name="ts_format">Transfer as mpeg-ts<br>\r
152 #elif $togo_mpegts == 'enabled'\r
153  <input type="checkbox" name="ts_format">Transfer as mpeg-ts<br>\r
154 #end if\r
155 </p>\r
156 <p>\r
157  <input value="Transfer Selected" type="submit">\r
158 </p>\r
159 </form>\r
160 </body>\r
161 </html>\r