New options for ts: on/off/auto (like zeroconf), default auto. Auto
[pyTivo/wmcbrine.git] / plugins / togo / templates / npl.tmpl
blobd34cba6e460a41f9f0e16ef56d2a685a9679c2b8
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 $tname\r
16   #if $folder != ''\r
17 </a> /\r
18     #if '/' in $title\r
19       #set $folders = $title.split('/')[1:]\r
20       #for $f in $folders[:-1]\r
21         $f /\r
22       #end for\r
23       $folders[-1]\r
24     #else\r
25       $title\r
26     #end if\r
27   #end if\r
28 </span></p>\r
29 <table id="main">\r
30   #if $ItemStart > 0\r
31         <tr><td colspan="5">\r
32         #set $Offset = -($ItemStart + 1)\r
33         #if $Offset < -($shows_per_page+1)\r
34            #set $Offset = -($shows_per_page+1)\r
35         #end if\r
36         <a href="/TiVoConnect?Command=NPL&amp;Container=$quote($container)&amp;TiVo=$tivoIP&amp;AnchorItem=$FirstAnchor&amp;AnchorOffset=$Offset&amp;Folder=$quote($folder)">Previous Page</a>\r
37         </td></tr>\r
38   #end if\r
39   #set $i = 0\r
40   ## i variable is used to alternate colors of row\r
41   ## loop through passed data printing row for each show or folder\r
42   #for $row in $data\r
43           #set $i += 1\r
44           #set $j = $i%2\r
45           <tr class="row$(j)">\r
46           #if $row['ContentType'].startswith('x-tivo-container')\r
47             ## This is a folder\r
48                 <td></td>\r
49                 <td><img src="/folder.png" alt=""></td>\r
50                 <td class="progmain"><a href='/TiVoConnect?Command=NPL&amp;Container=$quote($container)&amp;Folder=$quote(row["Url"])&amp;TiVo=$tivoIP'>$row['Title'] </a></td>\r
51                 <td class="progsize">$row["TotalItems"] Items</td>\r
52                 <td class="progdate">$row["LastChangeDate"]</td>\r
53           #else\r
54             ## This is a show\r
55                 <td>\r
56                 #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
57                         <input type="checkbox" name="Url" value="$row['Url']">\r
58                 #end if\r
59                 </td>\r
60                 <td>\r
61                 #if 'CopyProtected' in $row and $row['CopyProtected'] == 'Yes'\r
62                         <img src="/nocopy.png" alt="">\r
63                 #elif 'Icon' in $row\r
64                     <!-- Display icons similar to TiVo colored circles -->\r
65                         #if $row['Icon'] == 'urn:tivo:image:expires-soon-recording'\r
66                                 <img src="/soon.png" alt="">\r
67                         #else if $row['Icon'] == 'urn:tivo:image:expired-recording'\r
68                                 <img src="/expired.png" alt="">\r
69                         #else if $row['Icon'] == 'urn:tivo:image:save-until-i-delete-recording'\r
70                                 <img src="/kuid.png" alt="">\r
71                         #else if $row['Icon'] == 'urn:tivo:image:in-progress-recording'\r
72                                 <img src="/recording.png" alt="">\r
73                         #end if\r
74                 #end if\r
75                 </td>\r
76                 <td class="progmain">\r
77                         #if 'episodeTitle' in $row\r
78                         <span class="progtitle">$row['title']: $row['episodeTitle']</span>\r
79                         #else\r
80                         <span class="progtitle">$row['title']</span>\r
81                         #end if\r
82                         <span class="progdesc">#if 'description' in $row\r
83                         $row['description']\r
84                         #end if\r
85                         #if 'displayMajorNumber' in $row and 'callsign' in $row\r
86                         $row['displayMajorNumber'] $row['callsign']\r
87                         #end if\r
88                         </span>\r
89                         #if 'Url' in $row and row['Url'] in $status\r
90                                 #set $this_status = $status[$row['Url']]\r
91                                 #if $this_status['running'] and $this_status['rate'] != ""\r
92                                         <div class="transferring">\r
93                                         #set $gb = '%.3f GB' % (float($this_status['size']) / (1024 ** 3))\r
94                                         Transfering - $this_status['rate']<br>$gb\r
95                                         <a href="/TiVoConnect?Command=ToGoStop&amp;Container=$quote($container)&amp;Url=$quote($row['Url'])">Stop Transfer</a>\r
96                                         </div>\r
97                                 #elif $this_status['running'] and $this_status['rate'] == ""\r
98                                         <div class="transferring">\r
99                                         Initiating Transfer<br>\r
100                                         Please Wait\r
101                                         </div>\r
102                                 #elif $this_status['error']\r
103                                         <div class="failed">\r
104                                         Error - $this_status['error']<br>\r
105                                         </div>\r
106                                 #elif $this_status['finished']\r
107                                         <div>\r
108                                         Transfer Complete\r
109                                         </div>\r
110                                 #elif $this_status['queued']\r
111                                         <div class="queued">\r
112                                         Queued: $queue.index($row['Url'])<br>\r
113                                         <a href="/TiVoConnect?Command=Unqueue&amp;Container=$quote($container)&amp;Url=$quote($row['Url'])&amp;TiVo=$tivoIP">Unqueue</a>\r
114                                         </div>\r
115                                 #end if\r
116                         #end if\r
117                 </td>\r
118                 <td class="progsize">\r
119                 #if 'SourceSize' in $row\r
120                 $row['SourceSize']\r
121                 #end if\r
122                 <br>\r
123                 #if 'Duration' in $row\r
124                 $row['Duration']\r
125                 #end if\r
126                 </td>\r
127                 <td class="progdate">\r
128                 #if 'CaptureDate' in $row\r
129                 $row['CaptureDate']\r
130                 #end if\r
131                 </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=$quote($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\r
151  <input type="checkbox" name="ts_format">Transfer as mpeg-ts<br>\r
152 #end if\r
153 </p>\r
154 <p>\r
155  <input value="Transfer Selected" type="submit">\r
156 </p>\r
157 </form>\r
158 </body>\r
159 </html>\r