Check for new downloads every 15mins
[pyTivo.git] / plugins / admin / templates / npl.tmpl
blob230ce52114fde5645134a6a52afa1ba1b0bdc532
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\r
2 <html>\r
3 <head>\r
4   <meta content="text/html; charset=ISO-8859-1" 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 <p align="center"><font size="6">pyTivo - ToGo</font></p>\r
10 <table style="border: 1px solid rgb(220, 220, 220);background-color: rgb(255, 255, 255);text-align: left; margin-left: auto; margin-right: auto;" border="0" cellpadding="0" cellspacing="4">\r
11   <tbody>\r
12     <tr>\r
13       <td style="height: 48px; width: 483px;">\r
14       <form method="get" action="/TiVoConnect">\r
15       <input type="hidden" name="Command" value="NPL">\r
16       <input type="hidden" name="Container" value="$(container)">\r
17       <select name="TiVo">\r
18           #for $tsn in $tivos\r
19                   #if $tsn != ''\r
20                  <option value="$tivos[$tsn]">$tsn</option>\r
21               #end if\r
22           #end for\r
23       </select>\r
24           &nbsp;<input value="View Now Playing List" type="submit">\r
25           </form>\r
26           </td>\r
27     </tr>\r
28     <tr>\r
29       <td>\r
30       <div style="visibility: visible; width: 920px; overflow: scroll; height: 410px; position: relative;">\r
31       #if $tivoIP != ''\r
32           <!-- If TiVoIP is present then we should display a NPL -->\r
33                   #if $ItemStart > 0\r
34                         #set $Offset = -($ItemStart + 1)\r
35                         #if $Offset < -($shows_per_page+1)\r
36                            #set $Offset = -($shows_per_page+1)\r
37                         #end if\r
38                         <a href="/TiVoConnect?Command=NPL&Container=$container&TiVo=$tivoIP&AnchorItem=$FirstAnchor&AnchorOffset=$Offset&Folder=$folder">Previous Page</a>\r
39                   #end if\r
40                   <table>\r
41                   #if $folder != ''\r
42                         <!-- We are in a subfolder, offer the option to return to NPL -->\r
43                         <tr><td colspan=5><a href="/TiVoConnect?Command=NPL&Container=$container&TiVo=$tivoIP">Back to Now Playing List</a></td></tr>\r
44                   #end if\r
45                   #set $i = 0\r
46                   <!-- i variable is used to alternate colors of row -->\r
47                   <!-- loop through passed data printing row for each show or folder -->\r
48                   #for $row in $data\r
49                           #set $i += 1\r
50                           #if $i%2\r
51                                 <tr style="background-color: rgb(250, 250, 250);">\r
52                           #else\r
53                                 <tr>\r
54                           #end if\r
55                           #if $row['ContentType'] == 'x-tivo-container/folder'\r
56                             <!-- This is a folder -->\r
57                                 <td></td>\r
58                                 <td><a href='/TiVoConnect?Command=NPL&Container=$(container)&Folder=$(row["UniqueId"])&TiVo=$tivoIP'>$row['Title'] </a></td>\r
59                                 <td NOWRAP align="center">$(row["TotalItems"]) Items</td>\r
60                                 <td NOWRAP align="center">$row["LastChangeDate"]</td>\r
61                                 <td></td>\r
62                           #else\r
63                             <!-- This is a show -->\r
64                                 #if 'Icon' in $row\r
65                                     <!-- Display small table with color similar to TiVo colored circles -->\r
66                                         #if $row['Icon'] == 'urn:tivo:image:expires-soon-recording'\r
67                                                 <td><table><tr><td height=18 width=8 bgcolor='yellow'> </td></tr></table></td>\r
68                                         #else if $row['Icon'] == 'urn:tivo:image:expired-recording'\r
69                                                 <td><table><tr><td height=18 width=8 bgcolor='yellow'><b> ! </b></td></tr></table></td>\r
70                                         #else if $row['Icon'] == 'urn:tivo:image:save-until-i-delete-recording'\r
71                                                 <td><table><tr><td height=18 width=8 bgcolor='green'></td></tr></table></td>                            \r
72                                         #else\r
73                                                 <td width=8></td>\r
74                                         #end if\r
75                                 #else\r
76                                     <!-- No Icon listed in XML sheet -->\r
77                                         <td width=4></td>\r
78                                 #end if\r
79                                 <td width=*>\r
80                                         <b>$row['Title']: $row['EpisodeTitle']</b><br>\r
81                                         <small>$row['Description']  \r
82                                         $row['SourceChannel'] $row['SourceStation']</small>\r
83                                 </td>\r
84                                 <td NOWRAP align="center">$row['SourceSize'] <br>\r
85                                 $row['Duration']\r
86                                 </td>\r
87                                 <td NOWRAP align="center">$row['CaptureDate']</td>\r
88                                 #if 'Url' in $row\r
89                                         <td NOWRAP>\r
90                                         #if $unquote($row['Url']) in $status\r
91                                                 #set $this_status = $status[$unquote($row['Url'])]\r
92                                                 #if $this_status['running'] and $this_status['rate'] != ""\r
93                                                         Transfering - $this_status['rate'] KB/s<br>\r
94                                                         <a href="/TiVoConnect?Command=ToGoStop&Container=$(container)&Url=$(row['Url'])&TiVo=$tivoIP&Redirect=$redirect">Stop Transfer</a>\r
95                                                 #elif $this_status['running'] and $this_status['rate'] == ""\r
96                                                         Initiating Transfer.<br>\r
97                                                         Please Wait\r
98                                                 #elif $this_status['error']\r
99                                                         Error - $this_status['error']<br>\r
100                                                         <a href="/TiVoConnect?Command=ToGo&Container=$(container)&Url=$(row['Url'])&TiVo=$tivoIP&Redirect=$redirect">Try Transfer Again.</a>\r
101                                                 #elif $this_status['finished']\r
102                                                         Transfer Complete!\r
103                                                 #else\r
104                                                         Transfer Stopped<br>\r
105                                                         <a href="/TiVoConnect?Command=ToGo&Container=$(container)&Url=$(row['Url'])&TiVo=$tivoIP&Redirect=$redirect">Try Transfer Again.</a>\r
106                                                 #end if\r
107                                         #else\r
108                                                 <a href="/TiVoConnect?Command=ToGo&Container=$(container)&Url=$(row['Url'])&TiVo=$tivoIP&Redirect=$redirect">Transfer This.</a>\r
109                                         #end if\r
110                                         </td>\r
111                                 #else\r
112                                     <!-- No URL was in links url in XML -->\r
113                                         <td></td>\r
114                                 #end if\r
115                           #end if\r
116                           </tr>\r
117                   #end for\r
118                   </table>\r
119                   #if ($TotalItems - $ItemCount) > ($ItemStart + 1)\r
120                      #set $Offset = $shows_per_page - 1\r
121                      <a href="/TiVoConnect?Command=NPL&Container=$container&TiVo=$tivoIP&AnchorItem=$FirstAnchor&AnchorOffset=$Offset&Folder=$folder">Next Page</a>\r
122                   #end if\r
123           #else\r
124                   <!-- No TiVo IP Provided so display instructions -->\r
125                   <form method="get" action="/TiVoConnect">\r
126                   <input type="hidden" name="Command" value="SaveNPL">\r
127                   <input type="hidden" name="Container" value="$container">\r
128                   <table align='right' style="border: 1px solid rgb(220, 220, 220);">\r
129                   <tr><td colspan=2 align='center'><b>ToGo Settings</b></td></tr>\r
130                   <tr><td>MAK:</td><td><input type='text' name="tivo_mak" value="$tivo_mak"></td></tr>\r
131                   <tr><td>Save Path:</td><td><input type='text' name="togo_path" value="$togo_path"></td></tr>\r
132                   <tr><td colspan=2 align="center"><input type="submit" value="Save Settings"></td></tr>\r
133                   </table></form>\r
134                   \r
135                   <h2>Instructions</h2>\r
136                   \r
137                   <b>Required Settings:</b><br>\r
138                   In order to view the shows on your TiVo, pyTivo needs to know your Media Access Key.  Enter this information above and \r
139                   click save.  This information is stored on your computer and is never passed outside of your network.<br><br>\r
140                   \r
141                   In order to download shows from your TiVo, pyTivo needs to know the destination directory to save the files to.  \r
142                   Enter this information above and click save.<br><br>\r
143                   \r
144                   <b>To View Your TiVo</b><br>\r
145                   Select the desired TiVo based on the TiVo Service Number and click "View Now Playing List"<br><br>\r
146                   \r
147                   <b>My TiVo is Not Listed</b><br>\r
148                   pyTivo builds a list of TiVos on the network based on the TiVos that contact pyTivo.  If pyTivo has been running less \r
149                   than 5 minutes your TiVo may not have contacted pyTivo yet.  To force a connection open your Now Playing List on your \r
150                   TiVo.  If your TiVo is still not listed in pyTivo - ToGo please confirm that your TiVo is able to connect to the pyTivo \r
151                   server.<br><br>\r
152                   \r
153                   <b>To Download a Show</b><br>\r
154                   Find your desired show in the list and click Transfer Now.  The transfer will begin momentarily.  Note: TiVo can only \r
155                   transfer 1 show at a time.<br><br>\r
156                   \r
157                   <b>I get an Error 503</b><br>\r
158                   TiVo can only tranfer one file at a time.  If you receive this error wait a few minutes and try the transfer again.<br><br>\r
159                   \r
160                   <b>What will the name of my transferred show be</b><br>\r
161                   The name will be the show title followed by a hyphen and a unique number.  This prevents accidental overwriting and may \r
162                   allow for resuming transfers in the future**. This is not yet supported<br><br>.\r
163           #end if\r
164       </div>\r
165       </td>\r
166     </tr>\r
167   </tbody>\r
168 </table>\r
169 </body>\r
170 </html>\r