<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3059" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> mythtv-users-bounces@mythtv.org 
[mailto:mythtv-users-bounces@mythtv.org] <B>On Behalf Of </B>Roo<BR><B>Sent:</B> 
Tuesday, 10 April 2007 18:46<BR><B>To:</B> Discussion about 
mythtv<BR><B>Subject:</B> Re: [mythtv-users] how to disable the delete recording 
option ?<BR></FONT></DIV>
<DIV style="MARGIN-RIGHT: 0px"><SPAN class=gmail_quote>On 10/04/07, <B 
class=gmail_sendername>F Peeters (MythTV)</B> &lt;<A 
href="mailto:francesco@fampeeters.com">francesco@fampeeters.com</A>&gt; 
wrote:</SPAN>
<BLOCKQUOTE class=gmail_quote 
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">On 
  Tue, April 10, 2007 09:30, Roo wrote:<BR>&gt; On 10/04/07, Pietralla, 
  Siegfried P &lt;<A 
  href="mailto:siegfried.pietralla@eds.com">siegfried.pietralla@eds.com</A>&gt; 
  wrote:<BR>&gt;&gt;<BR>&gt;&gt;&nbsp;&nbsp;but how can you run a user job after 
  a program has been recorded ? ( so <BR>&gt;&gt; that you can protect existing 
  recordings and then also later turn of the<BR>&gt;&gt; 'chattr +i' e.g. the 
  same way you can run comm. flagging and transcoding<BR>&gt;&gt; against any 
  already recorded file ). <BR>&gt;&gt;<BR>&gt;&gt;<BR>&gt; This is all from 
  memory, so someone correct me if I am wrong...<BR>&gt;<BR>&gt; - Write the 
  script/s to do the un/protect of the recordings<BR>&gt; - Define the user 
  job/s in myth-setup that call the appropriate script/s <BR>&gt; - Enable user 
  jobs in myth-setup,&nbsp;&nbsp;don't think they are enabled by default<BR>&gt; 
  - Edit your recording schedule for the relevant shows to enable the<BR>&gt; 
  userjobs<BR>&gt; to run after recording is complete (in myth-web there is a 
  check box for <BR>&gt; this)<BR>&gt;<BR>What the OP wants is to be able to 
  en/disable the chattr +i from a menu<BR>*after* a show has already been 
  recorded...<BR><BR>He already indicates he knows how to do this in the 
  schedules...<BR><BR>So basically: Can he call the userjobs 1-4 from the GUI 
  somewhere *other*<BR>than the recording schedules?..<BR><BR>--<BR>F 
  Peeters<BR>&nbsp;&nbsp;PC-Chips M863G Geode - NVidia 440 - Hauppauge 
  PVR250<BR>&nbsp;&nbsp;Ubuntu 6.10 (Edgy Eft) - XFCE - MythTV 0.20 - 
  Xine<BR>&nbsp;&nbsp;Panasonic NV-VHD1 VCR/DVD player case modded to fit it all 
  in...<BR>_______________________________________________<BR>mythtv-users 
  mailing list<BR><A 
  href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org </A><BR><A 
  href="http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users">http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users</A><BR></BLOCKQUOTE></DIV><FONT 
face=Arial color=#0000ff size=2></FONT>
<DIV style="MARGIN-RIGHT: 0px"><FONT face=Arial color=#0000ff 
size=2></FONT><BR>Sure, I guess I should have read what I was quoting a bit more 
carefully :) <BR><BR>If you have userjobs setup properly, you can also go into 
watch recordings and hit "i" I think and then go into "Job Options" you can then 
select the user configued jobs to run from here.<BR><BR>Check the doco to see 
what the macros are that can be used for passing things like filename as an 
argument to the actual script being called.<BR><BR>Cheers,<BR><BR>Roo<BR><SPAN 
class=407591522-10042007><FONT face=Arial color=#0000ff 
size=2>&nbsp;</FONT></SPAN></DIV>
<DIV style="MARGIN-RIGHT: 0px"><SPAN class=407591522-10042007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV style="MARGIN-RIGHT: 0px"><SPAN class=407591522-10042007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV style="MARGIN-RIGHT: 0px"><SPAN class=407591522-10042007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV style="MARGIN-RIGHT: 0px"><SPAN class=407591522-10042007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV style="MARGIN-RIGHT: 0px"><SPAN class=407591522-10042007><FONT face=Arial 
color=#0000ff size=2>you're right - it seems the 'job options' menu is dynamic, 
so when you don't have any user jobs defined then they don't show up in the 'job 
options' menu (&nbsp;that's why&nbsp;i didn't see a way to run them 
).</FONT></SPAN></DIV>
<DIV style="MARGIN-RIGHT: 0px"><SPAN class=407591522-10042007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV style="MARGIN-RIGHT: 0px"><SPAN class=407591522-10042007><FONT face=Arial 
color=#0000ff size=2>as far as setting up the job goes, you don't even need to 
create a script. i just ran the following in the database ( i didn't&nbsp;find a 
front end for creating user jobs - but i now see from the above response that 
you can use 'mythtv-setup' -&gt; 'general' ) :</FONT></SPAN></DIV>
<DIV style="MARGIN-RIGHT: 0px"><SPAN class=407591522-10042007><FONT face=Arial 
color=#0000ff size=2><SPAN class=407591522-10042007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN></FONT></SPAN>&nbsp;</DIV>
<DIV style="MARGIN-RIGHT: 0px"><SPAN class=407591522-10042007><FONT face=Arial 
color=#0000ff size=2><SPAN class=407591522-10042007><FONT face=Arial 
color=#0000ff size=2>update settings set data='sudo /usr/bin/chattr +i 
%DIR%/%FILE%' where value='userjob1';</FONT></SPAN></DIV>
<DIV style="MARGIN-RIGHT: 0px"><SPAN class=407591522-10042007><FONT face=Arial 
color=#0000ff size=2>update settings set data='prevent deletion' where 
value='userjobdesc1';</FONT></SPAN></DIV>
<DIV style="MARGIN-RIGHT: 0px"><SPAN class=407591522-10042007><FONT face=Arial 
color=#0000ff size=2>update settings set data='1' where 
value='joballowuserjob1';</FONT></SPAN></DIV><SPAN class=407591522-10042007>
<DIV style="MARGIN-RIGHT: 0px"><SPAN class=407591522-10042007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV style="MARGIN-RIGHT: 0px"><SPAN class=407591522-10042007>and of course a 
job to allow deletion :</SPAN></DIV>
<DIV style="MARGIN-RIGHT: 0px"><SPAN 
class=407591522-10042007></SPAN>&nbsp;</DIV>
<DIV style="MARGIN-RIGHT: 0px"><SPAN class=407591522-10042007><FONT face=Arial 
color=#0000ff size=2>update settings set data='sudo /usr/bin/chattr -i 
%DIR%/%FILE%' where value='userjob2';</FONT></SPAN></DIV>
<DIV style="MARGIN-RIGHT: 0px"><SPAN class=407591522-10042007><FONT face=Arial 
color=#0000ff size=2>update settings set data='allow deletion' where 
value='userjobdesc2';</FONT></SPAN></DIV>
<DIV style="MARGIN-RIGHT: 0px"><SPAN class=407591522-10042007><FONT face=Arial 
color=#0000ff size=2>update settings set data='1' where 
value='joballowuserjob2';</FONT></SPAN></DIV>
<DIV style="MARGIN-RIGHT: 0px"><SPAN 
class=407591522-10042007></SPAN>&nbsp;</DIV></SPAN>
<DIV style="MARGIN-RIGHT: 0px"></FONT></SPAN><SPAN 
class=407591522-10042007><FONT face=Arial color=#0000ff size=2>note - it looks 
like you need special privileges to run 'chattr' as a non-root user. i am 
running knoppmyth, so i added ',/usr/bin/chattr' to the end of the 'mythtv' line 
in the file '/etc/sudoers'.</FONT></SPAN></DIV>
<DIV style="MARGIN-RIGHT: 0px"><SPAN class=407591522-10042007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV style="MARGIN-RIGHT: 0px"><SPAN class=407591522-10042007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV style="MARGIN-RIGHT: 0px"><SPAN class=407591522-10042007><FONT face=Arial 
color=#0000ff size=2>so now i'm done - i have a simple way to protect selected 
recordings from deletion, and all done through the standard interface without 
the need for any scripting or application changes. as a bonus, this also 
protects me from stupid mistakes when using the command 
line.</FONT></SPAN></DIV>
<DIV style="MARGIN-RIGHT: 0px"><SPAN class=407591522-10042007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV style="MARGIN-RIGHT: 0px"><SPAN class=407591522-10042007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV style="MARGIN-RIGHT: 0px"><SPAN class=407591522-10042007><FONT face=Arial 
color=#0000ff size=2>thank you all.</FONT></SPAN></DIV></BODY></HTML>