par control settings added
[pyTivo.git] / plugins / admin / templates / settings.tmpl
blob50a2c3e5fdecc027fb13c7420414dedcba14ab02
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\r
2 <html>\r
3 <head>\r
4         <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\r
5         <title>pyTivo Web Configuration</title>\r
6         <script language="javascript" type="text/javascript">\r
7                 function fillBlank(){\r
8                         var texts=document.getElementsByTagName('input');\r
9                         for (var i_tem = 0; i_tem < texts.length; i_tem++){\r
10                                 if (texts[i_tem].value==''){\r
11                                         texts[i_tem].value=' ';\r
12                                 }\r
13                         }\r
14                 }\r
15                 function switchDiv(pass, type){ \r
16                         hideallids(type);\r
17                         showDiv(pass);\r
18                 }\r
19                 function hideallids(type){\r
20                         //loop through the array and hide each element by id\r
21                         var divs = document.getElementsByTagName('div');\r
22                         for (var i=0;i<divs.length;i++){\r
23                                 if(divs[i].id.match(type)){\r
24                                         hideDiv(divs[i].id);\r
25                                 }\r
26                         } \r
27                 }\r
28                 function hideDiv(pass) {\r
29                         var divs = document.getElementsByTagName('div');\r
30                         for(i=0;i<divs.length;i++){\r
31                                 if(divs[i].id.match(pass)){//if they are 'see' divs\r
32                                         if (document.getElementById){// DOM3 = IE5, NS6\r
33                                                 divs[i].style.visibility="hidden";// show/hide\r
34                                         }\r
35                                         else{\r
36                                                 if (document.layers){ // Netscape 4\r
37                                                         document.layers[divs[i]].display = 'hidden';\r
38                                                 }\r
39                                                 else{ // IE 4\r
40                                                         document.all.hideshow.divs[i].visibility = 'hidden';\r
41                                                 }\r
42                                         }\r
43                                 }\r
44                         }\r
45                 }\r
46                 function showDiv(pass) {\r
47                         var divs = document.getElementsByTagName('div');\r
48                         for(i=0;i<divs.length;i++){\r
49                                 if(divs[i].id == pass){\r
50                                         if (document.getElementById){\r
51                                                 divs[i].style.visibility="";\r
52                                         }\r
53                                         else {\r
54                                                 if (document.layers){ // Netscape 4\r
55                                                         document.layers[divs[i]].display = '';\r
56                                                 }\r
57                                                 else{ // IE 4\r
58                                                         document.all.hideshow.divs[i].visibility = '';\r
59                                                 }\r
60                                         }\r
61                                 }\r
62                         }\r
63                 }\r
64                 function deleteSection(id){\r
65                         if (select_section.section.options[id].text == 'Global Server Settings'){\r
66                                 alert('Delete Error:\n\nSorry the Global Server Settings Section is required for pyTivo to run and cannot be deleted');\r
67                                 return true;\r
68                         }\r
69                         var name = select_section.section.options[id].text;\r
70                         var answer = confirm("Are you sure you wish to delete the '" + name + "' Section?")\r
71                         if (answer){\r
72                                 switchDiv('set-delete', 'set-');\r
73                                 select_section.section.options[id] = null;\r
74                                 var field = document.getElementById(name).value;\r
75                                 document.getElementById(field).value = 'Delete_Me';\r
76                                 saveNotify();\r
77                                 return true;\r
78                         }               \r
79                 }\r
80                 function resetpyTivo(){\r
81                         var answer = confirm("Are you sure you wish to reset the pyTivo Server? Any unsaved changes will be lost!")\r
82                         if (answer){\r
83                                 window.location="/TiVoConnect?Command=Reset&Container=$container"\r
84                         }\r
85                 }\r
86                 function showData(form) {\r
87                         var section = ""\r
88                         var setting = ""\r
89                         re=/[\[\]<>|]/;\r
90                         inputs = form.getElementsByTagName("input");\r
91                         for (i = 0; i < inputs.length; i++){\r
92                                 if (inputs[i].type == 'text' && re.exec(inputs[i].value)){\r
93                                         setting = inputs[i].name;\r
94                                         break;\r
95                                 }\r
96                         }\r
97                         if (setting != ""){\r
98                                 var map = document.getElementById('Section_Map').value.split(']');\r
99                                 map.pop();\r
100                                 splitSetting = setting.split('.');\r
101                                 for(i=0;i<map.length;i++){\r
102                                         key = map[i].split('|');\r
103                                         //buffer += key[0] + "---" + key[1] + "===" + splitSetting[0] + "\n";\r
104                                         if (splitSetting[0] == 'Server'){\r
105                                                 section = 'server';\r
106                                                 break;\r
107                                         }\r
108                                         if (key[0] == splitSetting[0]){\r
109                                                 section = key[1];\r
110                                                 break;\r
111                                         }\r
112                                 }\r
113                                 alert("Invalid Entry:\nSorry these are not allowed \n[]<>|");\r
114                                 switchDiv('set-' + section, 'set-');\r
115                                 document.getElementById(setting).select();\r
116                                 return false;\r
117                         }\r
118                         fillBlank();\r
119                         document.config.submit();\r
120                 }\r
121                 function saveNotify(){\r
122                         document.getElementById('B1').style.fontWeight= 'bold';\r
123                         document.getElementById('B2').disabled = true;\r
124                 }\r
125         </script>\r
126 </head>\r
127 <body style="background-color: rgb(250, 250, 250);">\r
129 <p align="center"><font size="6">pyTivo Web\r
130 Configuration</font> <a href="javascript:switchDiv('help-instructions', 'help-');">help</a></p>\r
131 <center>\r
132 <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
134   <tbody>\r
136     <tr>\r
138       <td style="border-right: 1px dotted rgb(153, 153, 153); vertical-align: top;">\r
139       <div id="leftframe" style="position: relative; text-align: center; width: 200px;">\r
140       <form name="select_section">Sections\r
141         <select name="section" size="7">\r
142         <option value="set-server">Global Server Settings</option>\r
143 #for $name, $data in $shares_data\r
144         <option value="set-$name">$name</option>\r
145 #end for\r
146 #for $name, $data in $tivos_data\r
147         <option value="set-$name">$name</option>\r
148 #end for\r
149         </select>\r
151         <input name="B3" value="Edit Section" type="button" onclick="switchDiv(select_section.section.options[select_section.section.selectedIndex].value, 'set-');return true;"> \r
152         <input name="B4" value="Delete Section" type="button" onclick="deleteSection(select_section.section.selectedIndex)">\r
153         <input name="B5" value="Add Section" type="button" onclick="switchDiv('set-add', 'set-');return true;"></form>\r
155       <hr>Administration\r
156       <form method="post">\r
157         <p align="center"><input name="B1" id="B1" value="Save Changes" type="button" onclick="showData(document.config);return true;">\r
158         <input id="B2" name="B2" value="Soft Reset pyTivo" type="button" onclick="resetpyTivo();"></p>\r
160       </form>\r
162 <a href="javascript:alert('This feature is not available yet');">View Raw File</a> </div>\r
164       </td>\r
166       <td style="vertical-align: top;">\r
167       <div id="settings" style="width: 300px; overflow: scroll; height: 450px; position: relative;">\r
168       <form name="config" method="GET" action="TiVoConnect" onsubmit="fillBlank();showData(this);">\r
169       <input type="hidden" name="Command" value="UpdateSettings">\r
170       <input type="hidden" name="Container" value="$container">\r
171 <div id="set-server" style="width: 280px; text-align: center;position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
172         <b>Global Server Settings</b><br>\r
173         <hr style="width: 100%; height: 2px;"> \r
174         <table align="center">\r
175 #set $i = 0\r
176 #for $key in $server_known\r
177 #set $i += 1\r
178 #if $i%2\r
179 <tr style="background-color: rgb(250, 250, 250);">\r
180 #else\r
181 <tr>\r
182 #end if\r
183 <td>\r
184 #if $key in $server_data\r
185         $key :</td><td><input size="20" id="Server.$key" name="Server.$key" value="$server_data[$key]" onChange="saveNotify();" onfocus="switchDiv('help-$key', 'help-');return true;" type="text">\r
187 #else\r
188         $key :</td><td><input size="20" id="Server.$key" name="Server.$key" value="" onChange="saveNotify();" onfocus="switchDiv('help-$key', 'help-');return true;" type="text">\r
190 #end if\r
191 </td></tr>\r
192 #end for\r
193 <tr><td colspan="2" align="center" style="border-bottom: 1px solid rgb(153, 153, 153);">User Defined Settings:</td></tr>        \r
194 #set $i = 0\r
195 #for $key in $server_data \r
196         #if not $key in $server_known\r
197                 #set $i += 1\r
198                 #if $i%2\r
199                         <tr style="background-color: rgb(250, 250, 250);">\r
200                 #else\r
201                         <tr>\r
202                 #end if\r
203                 <td>         $key :</td><td>\r
204                 <input size="20" id="Server.$key" name="Server.$key" value="$server_data[$key]" onChange="saveNotify();" onfocus="switchDiv('help-$key', 'help-');return true;" type="text">\r
205                 </td></tr>\r
206         #end if \r
207 #end for \r
208         </table>\r
209         <div style="width: 280px; position: relative;">\r
210                 <div id="add-server-button" style="width: 280px; position: absolute; position: absolute; left: 0px; top: 0px;">\r
211                         <br>\r
212                         <center>\r
213                         <input type="button" value="Add Setting" onclick="switchDiv('add-server-field', 'add-server-');return true;">\r
214                         </center>\r
215                 </div>\r
216                 <div id="add-server-field" style="position: absolute; position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
217                         <table style="width: 265px;">\r
218                         <tr><td colspan="2" align="center" style="border-bottom: 1px solid rgb(153, 153, 153);">Add a Setting</td></tr>\r
219                         <tr><td>Setting Name:</td><td>Setting Value:</td></tr>\r
220                         <tr><td><input size="16" id="Server.new_settting" name="Server.new__setting" onChange="saveNotify();" type="text" value=""></td><td><input size="16" type="text" onChange="saveNotify();" id="Server.new_value"  name="Server.new__value" value=""></td></tr>\r
221                         </table>\r
222                 </div>\r
223         </div>\r
224 </div>\r
225 #set $section_count = 0\r
226 #set $section_map = ''\r
227 #for $name, $data in $shares_data\r
228         #set $section_count += 1\r
229         #set $section_number = 'section-' + str($section_count)\r
230         <input type="hidden" name="$name" id="$name" value="$section_number">\r
231         #set $section_map += $section_number + '|' + $name + ']'\r
232         <div id="set-$name" style="text-align: center;position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
233         [<input size="20" onChange="saveNotify();" id="$section_number" name="$section_number" value="$name">]<br>\r
234         <hr style="width: 100%; height: 2px;"><table align="center">\r
235         #set $i = 0\r
236         #for $key in $shares_known\r
237                 #set $i += 1\r
238                 #if $i%2\r
239                         <tr style="background-color: rgb(250, 250, 250);">\r
240                 #else\r
241                         <tr>\r
242                 #end if\r
243                 #if $key in $data\r
244                         <td>$key :</td><td><input onChange="saveNotify();" size="20" id="$section_number.$key" name="$section_number.$key" value="$data[$key]" onfocus="switchDiv('help-$key', 'help-');return true;" type="text">\r
245                         </td>\r
246                 #else\r
247                         <td>$key : </td><td><input onChange="saveNotify();" size="20" id="$section_number.$key" name="$section_number.$key" value="" onfocus="switchDiv('help-$key', 'help-');return true;" type="text">\r
248                         </td>\r
249                 #end if\r
250                 </tr>\r
251         #end for\r
253         <tr><td colspan="2" align="center" style="border-bottom: 1px solid rgb(153, 153, 153);">User Defined Settings:</td></tr> \r
254         #set $i = 0\r
255         #for $key in $data \r
256                 #if not $key in $shares_known\r
257                         #set $i += 1\r
258                         #if $i%2\r
259                                 <tr style="background-color: rgb(250, 250, 250);">\r
260                         #else\r
261                                 <tr>\r
262                         #end if\r
263                         <td> $key : </td><td>\r
264                         <input size="20" onChange="saveNotify();" id="$section_number.$key" name="$section_number.$key" value="$data[$key]" onfocus="switchDiv('help-$key', 'help-');return true;" type="text">\r
265                         </td></tr>\r
266                 #end if \r
267         #end for\r
268         </table>\r
269                 <div style="position: relative;">\r
270                         <div id="add-$name-button" style="width: 280px; position: absolute; position: absolute; left: 0px; top: 0px;">\r
271                                 <br>\r
272                                 <center>\r
273                                 <input type="button" value="Add Setting" onclick="switchDiv('add-$name-field', 'add-$name-');return true;">\r
274                                 </center>\r
275                         </div>\r
276                         <div id="add-$name-field" style="position: absolute; position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
277                                 <table style="width: 265px;">\r
278                                 <tr><td colspan="2" align="center" style="border-bottom: 1px solid rgb(153, 153, 153);">Add a Setting</td></tr>\r
279                                 <tr><td>Setting Name:</td><td>Setting Value:</td></tr>\r
280                                 <tr><td><input onChange="saveNotify();" size="16" id="$(section_number).new__setting" name="$(section_number).new__setting" type="text" value=""></td><td><input onChange="saveNotify();" size="16" type="text" id="$(section_number).new__value" name="$(section_number).new__value" value=""></td></tr>\r
281                                 </table>\r
282                         </div>\r
283                 </div>\r
284         </div>\r
285 #end for\r
287 #for $name, $data in $tivos_data\r
288         #set $section_count += 1\r
289         #set $section_number = 'section-' + str($section_count)\r
290         <input type="hidden" name="$name" id="$name" value="$section_number">\r
291         #set $section_map += $section_number + '|' + $name + ']'\r
292         <div id="set-$name" style="text-align: center;position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
293         [<input size="20" onChange="saveNotify();" id="$section_number" name="$section_number" value="$name">]<br>\r
294         <hr style="width: 100%; height: 2px;"><table align="center">\r
295         #set $i = 0\r
296         #for $key in $tivos_known\r
297                 #set $i += 1\r
298                 #if $i%2\r
299                         <tr style="background-color: rgb(250, 250, 250);">\r
300                 #else\r
301                         <tr>\r
302                 #end if\r
303                 #if $key in $data\r
304                         <td>$key :</td><td><input onChange="saveNotify();" size="20" id="$section_number.$key" name="$section_number.$key" value="$data[$key]" onfocus="switchDiv('help-$key', 'help-');return true;" type="text">\r
305                         </td>\r
306                 #else\r
307                         <td>$key :</td><td><input onChange="saveNotify();" size="20" id="$section_number.$key" name="$section_number.$key" value="" onfocus="switchDiv('help-$key', 'help-');return true;" type="text">\r
308                         </td>\r
309                 #end if\r
310                 </tr>\r
311         #end for\r
313         <tr><td colspan="2" align="center" style="border-bottom: 1px solid rgb(153, 153, 153);">User Defined Settings:</td></tr> \r
314         #set $i = 0\r
315         #for $key in $data \r
316                 #if not $key in $tivos_known\r
317                         #set $i += 1\r
318                         #if $i%2\r
319                                 <tr style="background-color: rgb(250, 250, 250);">\r
320                         #else\r
321                                 <tr>\r
322                         #end if\r
323                         <td> $key :</td><td> \r
324                         <input size="20" onChange="saveNotify();" id="$section_number.$key" name="$section_number.$key" value="$data[$key]" onfocus="switchDiv('help-$key', 'help-');return true;" type="text">\r
325                         </td></tr>\r
326                 #end if \r
327         #end for\r
328         </table>\r
329                 <div style="position: relative;">\r
330                         <div id="add-$name-button" style="width: 280px; position: absolute; position: absolute; left: 0px; top: 0px;">\r
331                                 <br>\r
332                                 <center>\r
333                                 <input type="button" value="Add Setting" onclick="switchDiv('add-$name-field', 'add-$name-');return true;">\r
334                                 </center>\r
335                         </div>\r
336                         <div id="add-$name-field" style="position: absolute; position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
337                                 <table style="width: 265px;">\r
338                                 <tr><td colspan="2" align="center" style="border-bottom: 1px solid rgb(153, 153, 153);">Add a Setting</td></tr>\r
339                                 <tr><td>Setting Name:</td><td>Setting Value:</td></tr>\r
340                                 <tr><td><input onChange="saveNotify();" size="16" id="$(section_number).new__setting" name="$(section_number).new__setting" type="text" value=""></td><td><input onChange="saveNotify();" size="16" type="text" id="$(section_number).new__value" name="$(section_number).new__value" value=""></td></tr>\r
341                                 </table>\r
342                         </div>\r
343                 </div>\r
344         </div>\r
345 #end for\r
346 <div id="set-add" style="text-align: center;position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
347         Add a New Section\r
348         <hr>\r
349         <table>\r
350         <tr>\r
351         <td> Section Name :</td><td> \r
352                 <input onChange="saveNotify();" type="text" size="20" name="new_Section" value="" onfocus="switchDiv('help-add', 'help-');return true;">\r
353         </td></tr></table>\r
354         The new section name will be added to the pyTivo.conf file when you click <b>Save Changes</b>.\r
355 </div>\r
356 <div id="set-delete" style="text-align: center;position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
357         Delete a Section\r
358         <hr>\r
359         <br>\r
360         The Section has been marked for deletion. However it will not be actually deleted until you click the <b>Save Changes</b> button.\r
361 </div>\r
362 <input type="hidden" id="Section_Map" name="Section_Map" value="$section_map">\r
363       </form>\r
365       </div>\r
367       </td>\r
369       <td style="border-left: 1px dotted rgb(153, 153, 153); vertical-align: top;">\r
370       <div id="sidesections" style="width: 400px; position: relative;"><!-- HELP SECTIONS -->\r
371       <div id="help-instructions" style="visibility: visible; width: 400px; overflow: scroll; height: 450px; position: absolute; left: 0px; top: 0px;">\r
372       <p align="center"><strong>Instructions</strong>\r
373       </p>\r
374       <b>To Edit a Share:</b><br>\r
375       Select the share in the left hand menu and click edit.<br><br>\r
376       \r
377       <b>To Delete a Share</b><br>\r
378       Select the share in the left hand menu and click delete.<br><br>\r
379       \r
380       <b>To Add a Section</b><br>\r
381       Click the add share button.  Then provide the name of the share or TiVo. You must save your \r
382       changes before you can edit settings in the new share.<br><br>\r
383       \r
384       <b>To Add a Setting</b><br>\r
385       Select you share first.  If the setting is a known setting simply add the value to the appropriate setting.\r
386       If the setting is not listed you can add a "User Defined Setting".  Simple click add setting and provide\r
387       the name and value of this new setting.<br><br>\r
388       \r
389       <b>To Delete a Setting</b><br>\r
390       Delete the value of the setting so that it is blank.  If this is a known share the name will remain after a save.\r
391       If the setting is a user defined setting the name will be deleted after the save.<br><br>\r
392       \r
393       <b>Save Settings</b><br>\r
394       Clicking Save Settings will write your changes to the pyTivo.conf file.  These settings will not have an effect on\r
395       your pyTivo server until it is Soft Reset or restarted.<br><br>\r
396       \r
397       <b>Soft Reset</b><br>\r
398       Soft Reset allows your new settings to take effect without manually restarting the TiVo.  The Soft Reset will cause\r
399       a re-read of the pyTivo.conf file so your changes must be saved to the file before the reset.  <b>Note:</b> The only\r
400       setting that will not take effect until a hard restart is the Port setting.  Changing the Port setting requires a full\r
401       restart.      \r
402       </div>\r
404         <div id="help-add" style="position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
405       <p align="center"><strong>Add a New Section</strong> </p>\r
407       <p> Add the name of a new section.<br>\r
409       Remember if you want to add TiVo section remember it must start with _tivo_<br>\r
411       You must save your settings before the new section will be editable.<br>\r
412         </p>\r
414       </div>\r
416       <div id="help-port" style="position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
417       <p align="center"><strong>port</strong> </p>\r
419       <p> <strong>Default Setting:</strong> None,\r
420 must be entered. Distributed conf file uses 9032<br>\r
422       <strong>Valid Entries:</strong> Valid port number<br>\r
424       <strong>Required:</strong> Yes, without a port\r
425 setting in the conf file pyTivo will not start.<br>\r
427       <strong>Skill:</strong> Basic<br>\r
429       <strong>Description:</strong> The port which pyTivo\r
430 uses to serve your files. Can be changed if it conflicts with another\r
431 program. It is reported on Ubuntu that this port is already used so you\r
432 may need to change it to something like port=9254.<br>\r
434       <strong>Example Settings:</strong> 9032 </p>\r
436       </div>\r
438       <div id="help-guid" style="position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
439       <p align="center"><strong>guid</strong> </p>\r
441       <p> <strong>Default Setting:</strong> 123456<br>\r
443       <strong>Valid Entries:</strong> Any 6 digit number<br>\r
445       <strong>Required:</strong> Generally NO, will default\r
446 to '123456' if left blank. If you use more than one pyTivo server on\r
447 the same network a different random number is required here.<br>\r
449       <strong>Skill:</strong> Advanced<br>\r
451       <strong>Description:</strong> A unique identifier\r
452 used in the beacon to identify this server. If you have 2 or more\r
453 pyTivo servers on one network each server must use its own unique\r
454 identifier.<br>\r
456       <strong>Example Settings:</strong> Any 6 digit\r
457 number. </p>\r
459       </div>\r
461       <div id="help-ffmpeg" style="position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
462       <p align="center"><strong>ffmpeg</strong>\r
463       </p>\r
465       <p> <strong>Default Setting:</strong> There is\r
466 none.<br>\r
468       <strong>Valid Entries:</strong> Operating system path<br>\r
470       <strong>Required:</strong> Yes! <br>\r
472       <strong>Skill:</strong> Basic<br>\r
474       <strong>Description:</strong> This is the full path\r
475 to your ffmpeg binary. For windows users ffmpeg is distributed with\r
476 pyTivo and is in the plugins/video folder<br>\r
478       <strong>Example Settings:</strong> <span class="underline">Linux</span> = /usr/bin/ffmpeg | <span class="underline">Windows</span> = c:\Program\r
479 Files\pyTivo\plugins\video\ffmpeg_mp2.exe </p>\r
481       </div>\r
483       <div id="help-beacon" style="position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
484       <p align="center"><strong>beacon</strong>\r
485       </p>\r
487       <p> <strong>Default Setting:</strong>\r
488 255.255.255.255<br>\r
490       <strong>Valid Entries:</strong> A Subnet or Listen<br>\r
492       <strong>Required:</strong> No, defaults to\r
493 255.255.255.255<br>\r
495       <strong>Skill:</strong> Advanced<br>\r
497       <strong>Description:</strong> The subnet which the\r
498 beacon should broadcast on. Most people can leave this at the default\r
499 setting. If set to listen will accept incoming TCP requests.<br>\r
501       <strong>Example Settings:</strong> 255.255.255.255 </p>\r
503       </div>\r
505       <div id="help-hack83" style="position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
506       <p align="center"><strong>hack83</strong>\r
507       </p>\r
509       <p> <strong>Default Setting:</strong> False<br>\r
511       <strong>Valid Entries:</strong> True/False<br>\r
513       <strong>Required:</strong> No<br>\r
515       <strong>Skill:</strong> Moderate<br>\r
517       <strong>Description:</strong> Available in the <a class="wiki" href="/wiki/SubFoldersBranch">SubFoldersBranch</a>.\r
518 Allows TiVos with software 8.3 and above to display subfolders as users\r
519 are accustomed too prior to the 8.3Software glitch. If you use this\r
520 then you don't need to use <a href="http://pytivo.armooo.net/wiki/ConfigurepyTivo#auto_subshares">auto_subshares</a>.\r
521       <strong>Warning:</strong> navigating folders too fast\r
522 with this setting enabled may cause <a class="wiki" href="/wiki/TiVo">TiVo</a> to reboot. <br>\r
524       <strong>Example Settings:</strong> True/False </p>\r
526       </div>\r
528       <div id="help-debug" style="position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
529       <p align="center"><strong>debug</strong>\r
530       </p>\r
532       <p> <strong>Default Setting:</strong> False<br>\r
534       <strong>Valid Entries:</strong> True/False<br>\r
536       <strong>Required:</strong> No<br>\r
538       <strong>Skill:</strong> Advanced<br>\r
540       <strong>Description:</strong> Will create a file\r
541 named debug.txt in the base folder of pyTivo. This file will contain\r
542 debug information helpful in diagnosing problems. Generally only\r
543 necessary if you are having a problem and the information is requested\r
544 by support staff.<br>\r
546       <strong>Example Settings:</strong> True/False </p>\r
548       </div>\r
550       <div id="help-optres" style="position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
551       <p align="center"><strong>optres</strong>\r
552       </p>\r
554       <p> <strong>Default Setting:</strong> False<br>\r
556       <strong>Valid Entries:</strong> True/False<br>\r
558       <strong>Required:</strong> No<br>\r
560       <strong>Skill:</strong> Moderate<br>\r
562       <strong>Description:</strong> Allows for the use of\r
563 the Optimal Resolution in transcoding. By setting optes = true pyTivo\r
564 will treat the <a href="http://pytivo.armooo.net/wiki/ConfigurepyTivo#height">height</a>\r
565 and <a href="http://pytivo.armooo.net/wiki/ConfigurepyTivo#width">width</a>\r
566 settings in the conf file as a maximum. If the video to be transcoded\r
567 has smaller dimensions that are closer to other acceptable TiVo\r
568 dimensions then pyTivo will use these dimensions. This allows for\r
569 faster transcoding and small files when the initial video is a lower\r
570 quality.  pyTivo uses the same resolution as the source file on\r
571 HD Tivos for optimal transcoding efficiency.  It is not necessay to\r
572 to set this option with HD TiVos unles you wish to force pyTivo to change\r
573 the resolution to an "S2 compatible" resolution.<br>\r
575       <strong>Example Settings:</strong> True/False </p>\r
577       </div>\r
579       <div id="help-audio_br" style="position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
580       <p align="center"><strong>audio_br</strong>\r
581       </p>\r
583       <p> <strong>Default Setting:</strong> 384K<br>\r
585       <strong>Valid Entries:</strong> Any valid Bit rate up to 448k.<br>\r
587       <strong>Required:</strong> No<br>\r
589       <strong>Skill:</strong> Advanced<br>\r
591       <strong>Description:</strong> This allows you to\r
592 choose the default audio bit rate used for transcoding. The\r
593 default is likely fine for most users.  384k is the minimum\r
594 recommended for ac3 audio. For S2 Tivos, you may want to lower\r
595 this setting to 192k and set audio_ch=2 to slightly reduce the\r
596 file size.  See audio_codec for more info.<br>\r
598       <strong>Example Settings:</strong> 192K, 384K, 448K. </p>\r
600       </div>\r
602       <div id="help-max_audio_br" style="position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
603       <p align="center"><strong>max_audio_br</strong>\r
604       </p>\r
606       <p> <strong>Default Setting:</strong> 448K<br>\r
608       <strong>Valid Entries:</strong> Any valid Bit rate. <br>\r
610       <strong>Required:</strong> No<br>\r
612       <strong>Skill:</strong> Advanced<br>\r
614       <strong>Description:</strong> This sets the maximum\r
615 audio bit rate that can be sent to the <a class="wiki" href="/wiki/TiVo">TiVo</a>. Files having a higher bit\r
616 rate will be transcoded to ensure <a class="wiki" href="/wiki/TiVo">TiVo</a> compatibilty. <br>\r
618       <strong>Example Settings:</strong> 384K, 448K. </p>\r
620       </div>\r
622       <div id="help-video_br" style="position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
623       <p align="center"><strong>video_br</strong>\r
624       </p>\r
626       <p> <strong>Default Setting:</strong> 4096K\r
627 for SD <a class="wiki" href="/wiki/TiVo">TiVo</a>'s,\r
628 8192K for HD <a class="wiki" href="/wiki/TiVo">TiVo</a>'s<br>\r
630       <strong>Valid Entries:</strong> Any valid Bit rate.\r
631 1024K = 1Mi<br>\r
633       <strong>Required:</strong> No<br>\r
635       <strong>Skill:</strong> Advanced<br>\r
637       <strong>Description:</strong> This allows you to\r
638 choose the default server video bit rate used in transcoding. FFmpeg\r
639 does not strictly follow this bit rate, there is a certain level of\r
640 tolerance that is allowed. Also a low quality file will always have a\r
641 low bit rate. The default is likely fine for most users. Higher values\r
642 may slow down transcoding and will increase the file size. Increased\r
643 file sizes take up more room on the <a class="wiki" href="/wiki/TiVo">TiVo</a> and take longer to transfer\r
644 over the network.<br>\r
646       <strong>Example Settings:</strong> 4096K, 8Mi, 12Mi </p>\r
648       </div>\r
650       <div id="help-max_video_br" style="position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
651       <p align="center"><strong>max_video_br</strong>\r
652       </p>\r
654       <p> <strong>Default Setting:</strong> 17408k<br>\r
656       <strong>Valid Entries:</strong> Any valid Bit rate.\r
657 1024K = 1Mi<br>\r
659       <strong>Required:</strong> No<br>\r
661       <strong>Skill:</strong> Advanced<br>\r
663       <strong>Description:</strong> This allows you to\r
664 choose the maximum bit rate and is more strict than the <a href="http://pytivo.armooo.net/wiki/ConfigurepyTivo#video_br">video_br</a>\r
665 setting above. However setting this can cause buffer overflows and can\r
666 cause issues with ffmpeg. In addition to setting the ffmpeg maxrate\r
667 option, this setting is used to determine if the video bitrate of the\r
668 source video file is too high for the <a class="wiki" href="/wiki/TiVo">TiVo</a>. Otherwise compatible\r
669 mpeg's with a video bitrate above this setting will be transcoded\r
670 rather than sent to the <a class="wiki" href="/wiki/TiVo">TiVo</a>\r
671 untouched. Raising this setting much higher than the default will likly\r
672 result in pixelation during playback. Recommended only for skilled\r
673 users. <strong>Note:</strong> there is a report that\r
674 ffmpeg throws an error with 17Mi but accepts 17408K just fine. <br>\r
676       <strong>Example Settings: 17408k</strong> </p>\r
678       </div>\r
680       <div id="help-width" style="position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
681       <p align="center"><strong>width</strong>\r
682       </p>\r
684       <p> <strong>Default Setting:</strong> 544<br>\r
686       <strong>Valid Entries:</strong> Any valid pixel\r
687 dimension. Setting will be rounded to nearest acceptable <a class="wiki" href="/wiki/TiVo">TiVo</a>\r
688 dimension<br>\r
690       <strong>Required:</strong> No<br>\r
692       <strong>Skill:</strong> Moderate<br>\r
694       <strong>Description:</strong> Allows you to choose\r
695 the output dimension of the transcoded videos. SD units are limited to\r
696 544 and below. Likely HD users will want to choose a higher value.\r
697 Higher values may slow down transcoding and will increase the file\r
698 size. Increased file sizes take up more room on the TiVo and take\r
699 longer to transfer over the network.<br>\r
701       <strong>Example Settings:</strong> 1920, 1440, 1280,\r
702 720, 704, 544, 480, 352. </p>\r
704       </div>\r
706       <div id="help-height" style="position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
707       <p align="center"><strong>height</strong>\r
708       </p>\r
710       <p> <strong>Default Setting:</strong> 480<br>\r
712       <strong>Valid Entries:</strong> Any valid pixel\r
713 dimension. Setting will be rounded to nearest acceptable <a class="wiki" href="/wiki/TiVo">TiVo</a>\r
714 dimension<br>\r
716       <strong>Required:</strong> No<br>\r
718       <strong>Skill:</strong> Moderate<br>\r
720       <strong>Description:</strong> Allows you to choose\r
721 the output dimension of the transcoded videos. SD units are limited to\r
722 480 and below. Likely HD users will want to choose a higher value.\r
723 Higher values may slow down transcoding and will increase the file\r
724 size. Increased file sizes take up more room on the TiVo and take\r
725 longer to transfer over the network.<br>\r
727       <strong>Example Settings:</strong> 1080, 720, 480 </p>\r
729       </div>\r
731       <div id="help-ffmpeg_pram" style="position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
732       <p align="center"><strong>ffmpeg_pram</strong>\r
733       </p>\r
735       <p> <strong>Default Setting: </strong> blank<br>\r
737       <strong>Valid Entries:</strong> A valid ffmpeg command<br>\r
739       <strong>Required:</strong> No<br>\r
741       <strong>Skill:</strong> Very Advanced<br>\r
743       <strong>Description:</strong> This allows you to append\r
744 additional raw ffmpeg commands to the ffmpeg template.  For example,\r
745 you would enter '-threads 2' here if you have multiple processors\r
746 and want ffmpeg to use both processors to speed up transcoding.<br>\r
748       <strong>Example Settings:</strong> -threads 2</p>\r
750       </div>\r
752       <div id="help-ffmpeg_tmpl" style="position: absolute; overflow: scroll; left: 0px; top: 0px; visibility: hidden;">\r
753       <p align="center"><strong>ffmpeg_tmpl</strong>\r
754       </p>\r
756       <p> <strong>Default Setting:</strong> "%(video_codec)s %(video_fps)s\r
757 %(video_br)s %(max_video_br)s %(buff_size)s %(aspect_ratio)s -comment\r
758 pyTivo.py %(audio_br)s %(audio_fr)s %(audio_ch)s %(audio_codec)s\r
759 %(fmpeg_pram)s %(format)s<br>\r
761       <strong>Valid Entries:</strong> A valid ffmpeg command<br>\r
763       <strong>Required:</strong> No<br>\r
765       <strong>Skill:</strong> Very Advanced<br>\r
767       <strong>Description:</strong> This is a template used by pyTivo\r
768 to control the parameters passed to ffmpeg.  It should\r
769 not be necessary to modify this template unless there is a particular\r
770 parameter you do not wish ffmpeg to use and it cannot be overridden\r
771 by specifying that parameter in the pyTivo.conf file.<br>\r
772       <strong>Example Settings:</strong> See Above and the forum. </p>\r
774       </div>\r
776       <div id="help-bufsize" style="position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
777       <p align="center"><strong>bufsize</strong>\r
778       </p>\r
780       <p> <strong>Default Setting:</strong> 1024k<br>\r
782       <strong>Valid Entries:</strong> Any valid byte size<br>\r
784       <strong>Required:</strong> No<br>\r
786       <strong>Skill:</strong> Very Advanced<br>\r
788       <strong>Description:</strong> Allows you to set the\r
789 buffer size used by ffmpeg. I don't know much about this setting, but\r
790 from what I can tell it is rather touchy and should only be edited by\r
791 advanced users.<br>\r
793       <strong>Example Settings:</strong> 1024k<br>\r
795       </p>\r
797       </div>\r
799       <div id="help-type" style="position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
800       <p align="center"><strong>type</strong> </p>\r
802       <p> <strong>Default Setting:</strong> None<br>\r
804       <strong>Valid Entries:</strong> Video, Music, or any\r
805 other valid plugin name.<br>\r
807       <strong>Required:</strong> Yes<br>\r
809       <strong>Skill:</strong> Basic<br>\r
811       <strong>Description:</strong> Sets the type of share\r
812 that this will be. This must be set to something otherwise pyTivo will\r
813 not start.<br>\r
815       <strong>Example Settings:</strong> Video or Music </p>\r
817       </div>\r
819       <div id="help-path" style="position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
820       <p align="center"><strong>path</strong> </p>\r
822       <p> <strong>Default Setting:</strong> None<br>\r
824       <strong>Valid Entries:</strong> Any operating system\r
825 path<br>\r
827       <strong>Required:</strong> Yes<br>\r
829       <strong>Skill:</strong> Basic<br>\r
831       <strong>Description:</strong> Sets the base path to\r
832 your media content. While pyTivo will start with an invalid path your\r
833 shares will not work at all.<br>\r
835       <strong>Example Settings:</strong> <span class="underline">Windows</span> = C:\videos | <span class="underline">Linux</span> = /home/user/media </p>\r
837       </div>\r
839       <div id="help-auto_subshares" style="position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
840       <p align="center"><strong>auto_subshares</strong>\r
841       </p>\r
843       <p> <strong>Default Setting:</strong> false<br>\r
845       <strong>Valid Entries:</strong> True/False<br>\r
847       <strong>Required:</strong> No<br>\r
849       <strong>Skill:</strong> Moderate<br>\r
851       <strong>Description:</strong> Subfolders of the share\r
852 paths you define will be seen by pyTivo and displayed as subfolders in\r
853 the Now Playing List. This is an alternative to the <a href="http://pytivo.armooo.net/wiki/ConfigurepyTivo#hack83">hack83</a>\r
854 setting which enables the <a class="wiki" href="/wiki/SubFoldersBranch">SubFoldersBranch</a><br>\r
856       <strong>Example Settings:</strong> True/False </p>\r
858       </div>\r
860       <div id="help-precache" style="position: absolute; overflow: scroll; left: 0px; top: 0px; visibility: hidden;">\r
861       <p align="center"><strong>precache</strong>\r
862       </p>\r
864       <p> <strong>Default Setting:</strong> false<br>\r
866       <strong>Valid Entries:</strong> True/False<br>\r
868       <strong>Required:</strong> No<br>\r
870       <strong>Skill:</strong> Moderate<br>\r
872       <strong>Description:</strong> In order to verify that\r
873 the video files present on your computer were compatible with ffmpeg in\r
874 older versions pyTivo would query ffmpeg for each file. While this\r
875 information was cached it still caused a delay in the initial loading\r
876 of a list of files. This precache setting forced pyTivo to inspect each\r
877 video prior to starting the pyTivo server. However, this had two\r
878 drawbacks. 1. It took time as much as two minutes before pyTivo was\r
879 ready to accept requests. 2. It did not update the cache if new files\r
880 were added while the pyTivo server was running. <br>\r
882 In the more recent releases, anything after Feb 16, 2008, pyTivo no\r
883 longer needs to query ffmpeg when creating a file list. Instead pyTivo\r
884 has a list of accepted video format extensions. If the file extension\r
885 falls within this list it is displayed on the TiVo. This achieves the\r
886 same speed increase as the precache method without the delay in loading\r
887 the pyTivo server. <br>\r
889 There are still two drawbacks to this method. 1. The video file must\r
890 have an extension that is in the list. There is a possibility that a\r
891 new video file extension could come out before pyTivo is updated. 2.\r
892 Incomplete or video files with errors will still appear in the TiVo\r
893 listing if they have the correct extension, even though they are not\r
894 valid files. Both of these concerns are minimal. 1. Very few new\r
895 formats of video files come out very often. And all extensions are\r
896 stored in the video.ext file which is easily edited. 2. When viewing\r
897 the file details before transferring the pyTivo server queries ffmpeg\r
898 to make sure it is valid. If the file is not valid it will show up as a\r
899 copyrighted file and transferring it will be prevented by TiVo. <br>\r
901 It is recommended that you leave precaching turned off as it is no\r
902 longer needed.<br>\r
904       <strong>Example Settings:</strong> True/False </p>\r
906       </div>\r
908       <div id="help-aspect169" style="position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
909       <p align="center"><strong>aspect169</strong>\r
910       </p>\r
912       <p> <strong>Default Setting:</strong> True<br>\r
914       <strong>Valid Entries:</strong> True/False<br>\r
916       <strong>Required:</strong> No<br>\r
918       <strong>Skill:</strong> Moderate<br>\r
920       <strong>Description:</strong> Most TiVos, even S2,\r
921 can handle 16:9 videos perfectly. Some S2s are known not to handle 16:9\r
922 and will default to false in this setting. If you are experiencing\r
923 major distortion you can try setting this to false. Likely most users\r
924 will not have to mess with this.<br>\r
926       <strong>Example Settings:</strong> True/False </p>\r
927       </div>\r
929       <div id="help-video_fps" style="position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
930       <p align="center"><strong>video_fps</strong>\r
931       </p>\r
933       <p> <strong>Default Setting:</strong> 29.97 for S2 Tivo, blank for S3/HD TiVo<br>\r
935       <strong>Valid Entries:</strong> 29.97, 23.98, 25, 59.94<br>\r
937       <strong>Required:</strong> No<br>\r
939       <strong>Skill:</strong> Advanced<br>\r
941       <strong>Description:</strong> Sets the frame rate used by ffmpeg.\r
942 pyTivo uses 29.97 for S2's, and uses the same frame rate as the source\r
943 on HD TiVos. The default setting should work fine for most transfers.<br>\r
945       <strong>Example Settings:</strong> 29.97, 23.98, 25, 59.94 </p>\r
947       </div>\r
949       <div id="help-audio_fr" style="position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
950       <p align="center"><strong>audio_fr</strong>\r
951       </p>\r
953       <p> <strong>Default Setting:</strong> 48000<br>\r
955       <strong>Valid Entries:</strong> 44100, 48000<br>\r
957       <strong>Required:</strong> No<br>\r
959       <strong>Skill:</strong> Advanced<br>\r
961       <strong>Description:</strong> Sets the audio sampling frequency.\r
962 Defaults to frequency of the source file for better audio sync if\r
963 it is 44100 or 48000. Otherwise 48000 is used.<br>\r
965       <strong>Example Settings:</strong> 44100, 48000 </p>\r
967       </div>\r
969       <div id="help-audio_ch" style="position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
970       <p align="center"><strong>audio_ch</strong>\r
971       </p>\r
973       <p> <strong>Default Setting:</strong> blank (same as source)<br>\r
975       <strong>Valid Entries:</strong> any number compatible with ffmpeg and the audio codec selected<br>\r
977       <strong>Required:</strong> No<br>\r
979       <strong>Skill:</strong> Advanced<br>\r
981       <strong>Description:</strong> Sets the number of audio channels\r
982 used by ffmpeg.  ffmpeg will retain the same number of\r
983 channels as the source file by default.  The default setting should\r
984 work fine for most transfers unless the default audio_codec is changed.\r
985 Change this setting to 2 if you do not want to retain 5.1 audio.  A bug\r
986 in ffmpeg will sometimes move the center audio channel to the left or\r
987 right speaker.  Setting this option to 2, on an as needed basis, or\r
988 permanently, will correct this at the loss of 5.1 audio.  But this\r
989 should only be necessary on rare occasions where the source file is an\r
990 mkv or xvid with ac3 5.1 audio bitrate above 448k.<br>\r
992       <strong>Example Settings:</strong> 2, 6 </p>\r
994       </div>\r
996       <div id="help-audio_codec" style="position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
997       <p align="center"><strong>audio_codec</strong>\r
998       </p>\r
1000       <p> <strong>Default Setting:</strong> ac3<br>\r
1002       <strong>Valid Entries:</strong> mp2, ac3<br>\r
1004       <strong>Required:</strong> No<br>\r
1006       <strong>Skill:</strong> Advanced<br>\r
1008       <strong>Description:</strong> Sets the audio codec used by\r
1009 ffmpeg during transcoding.\r
1010 pyTivo defaults to ac3 in order to retain 5.1 audio should the\r
1011 source contain it.  pyTivo also checks the audio codec and bitrate\r
1012 of the source and uses '-acodec copy' if it is compatible. Otherwise\r
1013 the Default Setting is used.  Specifying an audio codec will disable\r
1014 these features and pyTivo will re-encode all audio using the codec\r
1015 specified.<br>\r
1016   \r
1017 Allowing pyTivo to select '-acodec copy' whenever possible will \r
1018 generally produce the best results. This is meant to eliminate \r
1019 garbled audio during transcoding when the source contains audio\r
1020 glitches that cause ffmpeg to lose synchronization.  This will also \r
1021 prevent the center audio channel from being moved to the right\r
1022 front speaker by ffmpeg when transferring mkv's and xvid's with audio\r
1023 bitrate of 448k or less.<br>\r
1024   \r
1025 You may want to change this setting to mp2 if you only have an S2,\r
1026 or have specified a per tivo section for an S2, and do not wish to\r
1027 retain 5.1 audio for possible transfer to an S3 Tivo or back to the\r
1028 PC should the need arise.  This will slightly reduce the amount of\r
1029 disk space used and allow for more recordings on an S2 Tivo. \r
1030 In this case, you will want to specify audio_codec=mp2, audio_ch=2,\r
1031 and audio_br=192k.  These are the settings normally used by the S2\r
1032 for recordings.<br>\r
1034       <strong>Example Settings:</strong> mp2, ac3 </p>\r
1036       </div>\r
1038       <div id="help-par" style="position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
1039       <p align="center"><strong>par</strong>\r
1040       </p>\r
1042       <p> <strong>Default Setting:</strong> blank<br>\r
1044       <strong>Valid Entries:</strong> any valid par<br>\r
1046       <strong>Required:</strong> No<br>\r
1048       <strong>Skill:</strong> Very Advanced<br>\r
1050       <strong>Description:</strong> Set pixel aspect ratio.\r
1051 Applies to S3 Tivos only. OPTRES must be false to use PAR. For some\r
1052 videofiles (e.g., AVC files), ffmpeg cannot determine the pixel aspect\r
1053 ratio correctly and assumes 1:1 which leads to a distorted image\r
1054 on anamorphically encoded video files.  This setting allows you to \r
1055 override this default. If you do not understand this setting, and you\r
1056 observe no distortions, you can ignore it.  Set par=1.0 to tell pyTivo\r
1057 to automatically adjust the pixel aspect ratio whenever possible.<br>\r
1058 par=1.18518519 (32:27, usually the correct setting for wide-screen\r
1059 anamorphically encoded DVD content)<br>\r
1060 par=0.88888889 (8:9, usually the correct setting for anamorphically\r
1061 encoded DVDs from TV shows)<br>\r
1063       <strong>Example Settings:</strong> 1.0, 1.18518519, 0.88888889 </p>\r
1066       </div>\r
1068       <div id="help-shares" style="position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
1069       <p align="center"><strong>shares</strong>\r
1070       </p>\r
1072       <p> <strong>Default Setting:</strong> Blank,\r
1073 which is equivalent to allow all shares on this TiVo.<br>\r
1075       <strong>Valid Entries:</strong> The name of any share\r
1076 in your pyTivo.conf file. A comma separated list.<br>\r
1078       <strong>Required:</strong> No<br>\r
1080       <strong>Skill:</strong> Easy<br>\r
1082       <strong>Description:</strong> Only the shares listed\r
1083 in this setting will be visible on this TiVo. Will ignore invalid\r
1084 shares. If no valid shares are listed or the setting does not exist,\r
1085 all shares will be visible on this TiVo.<br>\r
1087       <strong>Example Settings:</strong> Movies, Kids Stuff\r
1088       </p>\r
1090       </div>\r
1091 <!-- END HELP SECTIONS --> </div>\r
1093       </td>\r
1095     </tr>\r
1097   </tbody>\r
1098 </table>\r
1099 </center>\r
1100 </body>\r
1101 </html>\r