[mythtv] Update recording file name from command line?

Torbjorn Jansson torbjorn.jansson at mbox200.swipnet.se
Wed Dec 19 11:40:03 UTC 2018


On 2018-12-18 23:16, Richard Shaw wrote:
>   Tue, Dec 18, 2018 at 3:19 AM John Pilkington <johnpilk222 at gmail.com> wrote:
> 
>> On 18/12/2018 00:09, Richard Shaw wrote:
>>
>> I misunderstood your wish to rename your recording.  I use this in
>> mythDVBcut to rename after conversion from .ts to .mpg
>>
>> {{{
>>
>>      # tell mythDB about new filename and set the 'transcoded' flag
>>      echo "update recorded set basename='${OUTFILE}', transcoded = 1
>> where recordedid = '$recordedid' ; " |
>>      mysql -N -u${DBUserName} -p${DBPassword} -h${DBLocalHostName} ${DBName}
>>
>>
>>      # Update the container type, needed for uPnP playback.  Empty will
>> work too, if the transcoded flag is set.
>>      # This is a HACK pending 0.28 release, when mythutil should do it.
>> See Ticket #12388
>>
>>      echo "update recordedfile set basename = '${OUTFILE}', container =
>> 'MPEG2-PS' where recordedid = '$recordedid' ;" |
>>      mysql -N -u${DBUserName} -p${DBPassword} -h${DBLocalHostName} ${DBName}
>>
>> }}}
> 
> 
> I would rather not do direct DB manipulation but this looks pretty
> straightforward...
> 
> Thanks,
> Richard
> 
> 

i'm not exactly sure what your trying to do but regarding renaming recordings, 
why not leave them as is and just use mythlink.pl instead?

sure it can't easily be used as is since i want different filename and folder 
layout for movies and tv series.
so i made a small script that takes care of this for me by running a sql query 
that categorizes the recordings into a few different groups by looking at 
recording metadata and then for each of the categories it runs mythlink.pl with 
different options.

this is what i use to make my recordings more easily available under kodi.
plus another script i made so i can let tvheadend handle the tv card(s) instead 
of mythbackend directly.
this gives me option to also use kodi tv watching functions from same card(s) 
and fixes a few longstanding really annoying issues with mythtv recording code.







More information about the mythtv-dev mailing list