[mythtv-users] how to disable the delete recording option ?

Pietralla, Siegfried P siegfried.pietralla at eds.com
Wed Apr 11 00:17:11 UTC 2007


________________________________

From: mythtv-users-bounces at mythtv.org
[mailto:mythtv-users-bounces at mythtv.org] On Behalf Of Roo
Sent: Tuesday, 10 April 2007 18:46
To: Discussion about mythtv
Subject: Re: [mythtv-users] how to disable the delete recording option ?

On 10/04/07, F Peeters (MythTV) <francesco at fampeeters.com> wrote: 

	On Tue, April 10, 2007 09:30, Roo wrote:
	> On 10/04/07, Pietralla, Siegfried P
<siegfried.pietralla at eds.com> wrote:
	>>
	>>  but how can you run a user job after a program has been
recorded ? ( so 
	>> that you can protect existing recordings and then also later
turn of the
	>> 'chattr +i' e.g. the same way you can run comm. flagging and
transcoding
	>> against any already recorded file ). 
	>>
	>>
	> This is all from memory, so someone correct me if I am
wrong...
	>
	> - Write the script/s to do the un/protect of the recordings
	> - Define the user job/s in myth-setup that call the
appropriate script/s 
	> - Enable user jobs in myth-setup,  don't think they are
enabled by default
	> - Edit your recording schedule for the relevant shows to
enable the
	> userjobs
	> to run after recording is complete (in myth-web there is a
check box for 
	> this)
	>
	What the OP wants is to be able to en/disable the chattr +i from
a menu
	*after* a show has already been recorded...
	
	He already indicates he knows how to do this in the schedules...
	
	So basically: Can he call the userjobs 1-4 from the GUI
somewhere *other*
	than the recording schedules?..
	
	--
	F Peeters
	  PC-Chips M863G Geode - NVidia 440 - Hauppauge PVR250
	  Ubuntu 6.10 (Edgy Eft) - XFCE - MythTV 0.20 - Xine
	  Panasonic NV-VHD1 VCR/DVD player case modded to fit it all
in...
	_______________________________________________
	mythtv-users mailing list
	mythtv-users at mythtv.org 
	http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
	


Sure, I guess I should have read what I was quoting a bit more carefully
:) 

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.

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.

Cheers,

Roo
 
 
 
 
 
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 ( that's why i didn't see a way to run them ).
 
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 find a front
end for creating user jobs - but i now see from the above response that
you can use 'mythtv-setup' -> 'general' ) :
 
update settings set data='sudo /usr/bin/chattr +i %DIR%/%FILE%' where
value='userjob1';
update settings set data='prevent deletion' where value='userjobdesc1';
update settings set data='1' where value='joballowuserjob1';
 
and of course a job to allow deletion :
 
update settings set data='sudo /usr/bin/chattr -i %DIR%/%FILE%' where
value='userjob2';
update settings set data='allow deletion' where value='userjobdesc2';
update settings set data='1' where value='joballowuserjob2';
 
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'.
 
 
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.
 
 
thank you all.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-users/attachments/20070411/b6adb7ca/attachment-0001.htm 


More information about the mythtv-users mailing list