On Sun, 17 Oct 2021 09:37:33 +1100, you wrote:
>I've been looking at my recordings and noticed that I have news programs
>going back as far as December last year. I wondered why they hadn't
>expired. Then I noticed that none of my programs seem to have the
>auto-expire setting. I've come to this conclusion because none of them show
>the auto-expire "RIP" icon when viewing the list of recorded programs in
>MythFrontend.
>
>So I have 2 questions:
>
> 1. I don't want to have to edit each recording and set it to auto-expire
> as there are hundreds. So is there something I can do to easily enable
> auto-expire on my existing recordings?
On the All Programmes item at the top of the recordings list, do
M(enu) > Add this group to the playlist, then M(enu) > Playlist
Options > Storage Options > Enable Auto Expire.
> 2. What do I need to do to make sure all future recordings are set to
> auto-expire?
The autoexpire setting comes originally from the recording template
rule that is used when you create a new recording rule. If you do not
manually select a template, the default template is used.
Then each recording which occurs gets its autoexpire setting from the
recording rule that created it. To find your template rules, go to
Manage Recordings > Recording Rules then do Ctrl-S to bring up a
search box, then type:
template
The default template is named "Default (template)" and any other
template rules you may have created yourself will be named with
whatever name you chose, but will have "(template)" at the end of the
name. Use the <Esc> key or the remote's Back button to exit from the
search box and then Enter to edit the template rule. Go to Storage
Options > Allow recordings to expire? and use the space bar to toggle
the option. It is enabled when it shows an X in the box.
Unfortunately, there is nothing like the Playlists that you can use on
recording rules. So if you have lots of them that you need to change
to enable the autoexpire option, then the only GUI way of doing it is
to manually go to each rule and change the option. To set the
autoexpire option on all recording rules, you would need to do that
directly in the database, or write a script using the services API.
To do it directly in the database, do this get a MySQL or MariaDB
command line:
sudo mysql mythconverg
Then this will show all your recording rules:
select recordid,type,chanid,starttime,startdate,title,autoexpire from
record;
or this will display the recording rules that will autoexpire:
select recordid,type,chanid,starttime,startdate,title,autoexpire from
record where autoexpire!=0;
and this will display the recording rules that will not autoexpire:
select recordid,type,chanid,starttime,startdate,title,autoexpire from
record where autoexpire=0;
To change all recording rules to have autoexpire enabled:
update record set autoexpire=1;
That command will also update the template rules as they are just
rules in the record table with a different type field value (11). So
if you do not want to set autoexpire on the template rules, do this:
update record set autoexpire=1 where type!=11;
To exit from the MySQL or MariaDB command line:
quit
If you have made any changes to the database that can affect
scheduling, then after you exit from the MySQL or MariaDB prompt, run
this to tell the scheduler to run immediately:
mythutil --resched
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users http://wiki.mythtv.org/Mailing_List_etiquette MythTV Forums:
https://forum.mythtv.org