[mythtv-users] Best way to copy to windows and delete after recording?

Michael T. Dean mtdean at thirdcontact.com
Sun Mar 17 23:15:32 UTC 2013


On 03/17/2013 05:02 PM, Roger Siddons wrote:
> Couldn't you use http://www.mythtv.org/wiki/Delete_recordings.py as a basis for
> your script ? You could even modify it to mark the recordings as watched rather
> than delete them, for safety.

Exactly.  This would be the best approach.  Note, also, that you don't 
even need the script to rename the videos--just copy the symlink created 
by MythTV while dereferencing and you'll create a file on the new system 
with the same name as the link, but the content of the file.

Something like rsync -L or cp -L or whatever Python uses to say the same.

So, you could just take delete_recordings.py, simplify it to work with a 
specific show, as specified by the user job (similar to how is done for 
http://www.mythtv.org/wiki/Mythvidexport.py ), then copies the file 
(either by running a system command, like rsync -L or cp -L), then 
deletes the file (and, note, you can have it delete the file to the 
Deleted recording group, so it's not actually gone until your expiry 
says to remove it from disk).

See, also, http://www.mythtv.org/wiki/Category:Python_Scripts for more 
Python script examples.

Mike


More information about the mythtv-users mailing list