180 lines
5.9 KiB
Plaintext
180 lines
5.9 KiB
Plaintext
# Add channel exclusion list and Crop - mymsman 150331
|
|
# Add Detect whilst recording - mymsman 150721
|
|
#source /mod/webif/lib/setup
|
|
#require settings.class
|
|
#set settings [settings]
|
|
|
|
source /mod/webif/plugin/detectads/timelist.jim
|
|
set ::detectads::auto [$settings _nval_setting "detectads_auto"]
|
|
set ::detectads::crop [$settings _nval_setting "detectads_crop"]
|
|
set ::detectads::detwrec [$settings _nval_setting "detectads_detwrec"]
|
|
set ::detectads::bmend [$settings _nval_setting "detectads_bmend"]
|
|
set ::detectads::delorig [$settings _nval_setting "detectads_delorig"]
|
|
set ::detectads::tgtchoice [$settings _nval_setting "detectads_tgtchoice"]
|
|
set ::detectads::tgtpath [$settings _tval_setting "detectads_tgtpath"]
|
|
if {$::detectads::tgtpath == 0} {set ::detectads::tgtpath ""}
|
|
set ::detectads::queue_time [$settings _tval_setting "detectads_queue_time"]
|
|
set ::detectads::cpulimit [$settings _nval_setting "detectads_cpulimit"]
|
|
|
|
set ::detectads::otheropts [$settings _tval_setting "detectads_otheropts"]
|
|
if {$::detectads::otheropts == 0} {set ::detectads::otheropts ""}
|
|
|
|
puts "
|
|
<fieldset style=\"display: inline\">
|
|
<legend>
|
|
<a href=\"http://wiki.hummy.tv/wiki/DetectAds\" target=\"_blank\"><img src=\"/plugin/detectads/img/detectads.png\" alt=\"DetectAds icon\"/> Detect Advert Breaks</a>
|
|
</legend>
|
|
<p>See <b><a href=\"http://wiki.hummy.tv/wiki/DetectAds\" target=\"_blank\">DetectAds user guide</a></b> for help</p>
|
|
<form class=auto id=detectads method=get
|
|
action=/plugin/detectads/save.jim>
|
|
<table>"
|
|
puts "
|
|
<tr>
|
|
<th class=key>Automatically process whilst
|
|
recording in progress? (chaserun)
|
|
</th>
|
|
<td><input id=detectads_detwrec name=detectads_auto
|
|
type=radio value=detwrec"
|
|
if {$::detectads::detwrec} { puts -nonewline " checked" }
|
|
puts ">
|
|
|
|
</td>
|
|
</tr>"
|
|
puts "
|
|
<tr>
|
|
<th class=key>Automatically process recording following
|
|
auto-decryption? (traditional)
|
|
</th>
|
|
<td><input id=detectads_auto name=detectads_auto
|
|
type=radio value=auto"
|
|
if {$::detectads::auto} { puts -nonewline " checked" }
|
|
puts ">
|
|
<tr>
|
|
<th class=key>Folder flag, Sweeper or No automatic processing of recordings
|
|
</th>
|
|
<td><input id=detectads_noauto name=detectads_auto
|
|
type=radio value=noauto"
|
|
if {!$::detectads::auto && !$::detectads::detwrec} { puts -nonewline " checked" }
|
|
puts ">
|
|
|
|
</td>
|
|
</tr>"
|
|
puts "
|
|
<!-- Channel exclusion based on ChannelDel package
|
|
-->
|
|
<tr>
|
|
<th class=key>Exclude channels from automatic processing
|
|
</th>
|
|
|
|
<td><button id=detectads_excl type=button>Edit list</button>
|
|
</td>
|
|
</tr>"
|
|
puts "
|
|
<tr id=detectads_queuestart >
|
|
<th class=key>Start processing recording queue
|
|
</th>
|
|
<td class=key>
|
|
<select id=detectads_queue_time name=detectads_queue_time
|
|
class=\"ui-widget-content ui-corner-all\" >"
|
|
timelist $::detectads::queue_time
|
|
puts " </select>
|
|
</td>
|
|
</tr>"
|
|
|
|
puts "
|
|
<tr>
|
|
<th class=key>Only Bookmark ends of ad breaks?
|
|
</th>
|
|
<td><input id=detectads_bmend name=detectads_bmend
|
|
type=checkbox value=yes"
|
|
if {$::detectads::bmend} { puts -nonewline " checked" }
|
|
puts ">
|
|
</td>
|
|
</tr>"
|
|
puts "
|
|
<tr>
|
|
<th class=key>Crop recording following ad detection?
|
|
</th>
|
|
<td><input id=detectads_crop name=detectads_crop
|
|
type=checkbox value=yes"
|
|
if {$::detectads::crop} { puts -nonewline " checked" }
|
|
puts ">
|
|
</td>
|
|
</tr>"
|
|
puts "
|
|
<tr class=dahide>
|
|
<th class=key>Delete (move to bin) original recording after processing?
|
|
</th>
|
|
<td><input id=detectads_delorig name=detectads_delorig
|
|
type=checkbox value=yes"
|
|
if {$::detectads::delorig} { puts -nonewline " checked" }
|
|
puts ">
|
|
</td>
|
|
</tr>"
|
|
puts "
|
|
<tr id=detectads_tgtchoice class=dahide>
|
|
<th class=key>Write output recording to folder
|
|
</th>
|
|
<td><input name=detectads_tgtchoice
|
|
type=radio value=1"
|
|
if {$::detectads::tgtchoice eq 1} { puts -nonewline " checked" }
|
|
puts "> Same as input
|
|
</td>
|
|
<td><input name=detectads_tgtchoice
|
|
type=radio value=2"
|
|
if {$::detectads::tgtchoice eq 2} { puts -nonewline " checked" }
|
|
puts "> [system mediaroot]
|
|
</td>
|
|
<td><input name=detectads_tgtchoice id=detectads_tgtother
|
|
type=radio value=3"
|
|
if {$::detectads::tgtchoice eq 3} { puts -nonewline " checked" }
|
|
puts "> Other
|
|
</td>
|
|
<td><input id=detectads_tgtpath name=detectads_tgtpath
|
|
class=\"ui-widget-content ui-corner-all\"
|
|
type=text size=60 value=\"$::detectads::tgtpath\">
|
|
</td>
|
|
</tr>"
|
|
# cpulimit if program exists
|
|
if {[file exists /mod/bin/cpulimit]} {
|
|
puts "
|
|
<tr id=detectads_tgtchoice class=dahide>
|
|
<th class=key>Limit cpu usage to
|
|
</th>
|
|
<td><input id=detectads_cpulimit name=detectads_cpulimit
|
|
class=\"ui-widget-content ui-corner-all\"
|
|
type=number value=\"$::detectads::cpulimit\" min=0 max=99 style=\"width: 3em\"> %
|
|
</td>
|
|
<td>(0 for nolimit)
|
|
</tr>"
|
|
}
|
|
puts "
|
|
<tr>
|
|
<th class=key><a href=\"http://wiki.hummy.tv/wiki/DetectAds#Options\" target=\"_blank\">Other options</a>
|
|
</th>
|
|
<td colspan=4><input id=detectads_otheropts name=detectads_otheropts
|
|
class=\"ui-widget-content ui-corner-all\"
|
|
type=text size=100 value=\"$::detectads::otheropts\">
|
|
</td>
|
|
</tr>"
|
|
puts "
|
|
<tr>
|
|
<td colspan=2><input type=submit value=\"Update settings\">
|
|
<div id=detectads_output></div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
</fieldset>
|
|
"
|
|
puts {
|
|
<!-- Channel exclusion based on ChannelDel package
|
|
-->
|
|
<script>
|
|
$('#detectads_excl').button().click(function() {
|
|
window.location.href = '/plugin/detectads/settings.jim';
|
|
})
|
|
</script>
|
|
}
|
|
|