[mythtv-users] Custom rule to allow re-record of transcoded recordings

Michael T. Dean mtdean at thirdcontact.com
Wed Dec 9 04:13:17 UTC 2015


On 12/08/2015 11:05 PM, Ian Evans wrote:
>
> A while back I recorded episodes of an SD series. I was tight on space 
> then and so after cutting the commercials out, I ran a user job that 
> converted it to an mp4. I have more space now and am wondering how to 
> set up a custom recording rule that would only allow a re-record if 
> the recording in question had a an mp4 extension. I know it'd be 
> program.title = 'My show' but how would you specify the extension part?
>

To do what you asked, you would use program.basename .  To do it right, 
you would use program.transcoded != 0 .  ;)

See, also, the example clause for "Re-record SDTV in HDTV (disable 
duplicate matching)" for the overall structure you'll need (and make 
sure you disable duplicate matching.  Note, too, that unless you get 
really fancy (a lot fancier than the example clause), it will keep 
re-recording until you delete the .mp4, so you could get 3, 4, 5... or 
more copies of it unless you notice the re-record and delete the old 
transcoded one.  You could actually handle this with a custom user job 
that runs a script that uses the Python bindings to ask the backend to 
delete the transcoded version and then enable that user job on your 
custom rule (but the specific implementation will be left as an exercise 
to the reader or someone else who feels like knocking such a script 
out--and if someone does, feel free to add it to the wiki).

Mike|
|


More information about the mythtv-users mailing list