Don't show CopyProtected shows in NPL
[pyTivo/krkeegan.git] / plugins / admin / templates / npl.tmpl
blob5900fca7c80541a013451e8c28a1b7c5330be325
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=$quote($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=$quote($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=$quote($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 'CopyProtected' in $row and $row['CopyProtected'] == 'Yes'\r
89                                         <td>CopyProtected</td>\r
90                                 #else if 'Url' in $row\r
91                                         <td NOWRAP>\r
92                                         #if $unquote($row['Url']) in $status\r
93                                                 #set $this_status = $status[$unquote($row['Url'])]\r
94                                                 #if $this_status['running'] and $this_status['rate'] != ""\r
95                                                         Transfering - $this_status['rate'] KB/s<br>\r
96                                                         <a href="/TiVoConnect?Command=ToGoStop&Container=$quote($container)&Url=$(row['Url'])&TiVo=$tivoIP&Redirect=NPL">Stop Transfer</a>\r
97                                                 #elif $this_status['running'] and $this_status['rate'] == ""\r
98                                                         Initiating Transfer.<br>\r
99                                                         Please Wait\r
100                                                 #elif $this_status['error']\r
101                                                         Error - $this_status['error']<br>\r
102                                                         <a href="/TiVoConnect?Command=ToGo&Container=$quote($container)&Url=$(row['Url'])&TiVo=$tivoIP&Redirect=NPL">Try Transfer Again.</a>\r
103                                                 #elif $this_status['finished']\r
104                                                         Transfer Complete!\r
105                                                 #else\r
106                                                         Transfer Stopped<br>\r
107                                                         <a href="/TiVoConnect?Command=ToGo&Container=$quote($container)&Url=$(row['Url'])&TiVo=$tivoIP&Redirect=NPL">Try Transfer Again.</a>\r
108                                                 #end if\r
109                                         #else\r
110                                                 <a href="/TiVoConnect?Command=ToGo&Container=$quote($container)&Url=$(row['Url'])&TiVo=$tivoIP&Redirect=NPL">Transfer This.</a>\r
111                                         #end if\r
112                                         </td>\r
113                                 #else\r
114                                     <!-- No URL was in links url in XML -->\r
115                                         <td></td>\r
116                                 #end if\r
117                           #end if\r
118                           </tr>\r
119                   #end for\r
120                   </table>\r
121                   #if ($TotalItems - $ItemCount) > ($ItemStart + 1)\r
122                      #set $Offset = $shows_per_page - 1\r
123                      <a href="/TiVoConnect?Command=NPL&Container=$quote($container)&TiVo=$tivoIP&AnchorItem=$FirstAnchor&AnchorOffset=$Offset&Folder=$folder">Next Page</a>\r
124                   #end if\r
125           #else\r
126                   <!-- No TiVo IP Provided so display instructions -->\r
127                   <form method="get" action="/TiVoConnect">\r
128                   <input type="hidden" name="Command" value="SaveNPL">\r
129                   <input type="hidden" name="Container" value="$container">\r
130                   <table align='right' style="border: 1px solid rgb(220, 220, 220);">\r
131                   <tr><td colspan=2 align='center'><b>ToGo Settings</b></td></tr>\r
132                   <tr><td>MAK:</td><td><input type='text' name="tivo_mak" value="$tivo_mak"></td></tr>\r
133                   <tr><td>Save Path:</td><td><input type='text' name="togo_path" value="$togo_path"></td></tr>\r
134                   <tr><td colspan=2 align="center"><input type="submit" value="Save Settings"></td></tr>\r
135                   </table></form>\r
136                   \r
137                   <h2>Instructions</h2>\r
138                   \r
139                   <b>Required Settings:</b><br>\r
140                   In order to view the shows on your TiVo, pyTivo needs to know your Media Access Key.  Enter this information above and \r
141                   click save.  This information is stored on your computer and is never passed outside of your network.<br><br>\r
142                   \r
143                   In order to download shows from your TiVo, pyTivo needs to know the destination directory to save the files to.  \r
144                   Enter this information above and click save.<br><br>\r
145                   \r
146                   <b>To View Your TiVo</b><br>\r
147                   Select the desired TiVo based on the TiVo Service Number and click "View Now Playing List"<br><br>\r
148                   \r
149                   <b>My TiVo is Not Listed</b><br>\r
150                   pyTivo builds a list of TiVos on the network based on the TiVos that contact pyTivo.  If pyTivo has been running less \r
151                   than 5 minutes your TiVo may not have contacted pyTivo yet.  To force a connection open your Now Playing List on your \r
152                   TiVo.  If your TiVo is still not listed in pyTivo - ToGo please confirm that your TiVo is able to connect to the pyTivo \r
153                   server.<br><br>\r
154                   \r
155                   <b>To Download a Show</b><br>\r
156                   Find your desired show in the list and click Transfer Now.  The transfer will begin momentarily.  Note: TiVo can only \r
157                   transfer 1 show at a time.<br><br>\r
158                   \r
159                   <b>I get an Error 503</b><br>\r
160                   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
161                   \r
162                   <b>What will the name of my transferred show be</b><br>\r
163                   The name will be the show title followed by a hyphen and a unique number.  This prevents accidental overwriting and may \r
164                   allow for resuming transfers in the future**. This is not yet supported<br><br>.\r
165           #end if\r
166       </div>\r
167       </td>\r
168     </tr>\r
169   </tbody>\r
170 </table>\r
171 </body>\r
172 </html>\r