[mythtv-users] Script to remove all old recordings prior a given date

Jean-Yves Avenard jyavenard at gmail.com
Sun Nov 27 11:08:05 UTC 2016


On 26 November 2016 at 08:59, Michael T. Dean <mtdean at thirdcontact.com> wrote:
> On 11/23/2016 10:49 PM, Jean-Yves Avenard wrote:
>>
>> Having a 32TB backend, the amount of recordings kept has become insane.
>>
>> How could I remove in one go all the recording that are older than two
>> years old?
>>
>> I guess after that, I can use the find_orphans script to clean up the
>> storage space.
>
>
> https://www.mythtv.org/wiki/Delete_recordings.py
>
> Lets you delete recording by most any search criteria.  Will ask you before
> doing the actual delete, so don't worry about trial and error to get the
> right search.  That said, I think the wiki page will give you exactly what
> you need.  (Oh, and it should be fine with current MythTV, too--the 0.24 on
> the page means that it was verified to work on that version (someone
> actually used it then) and no one has updated the page to say it works on
> other, newer versions.)

It seems to have trouble handling more than 999 recordings.

On first go, I didn't see any recordings having been deleted,

so I ran it again and got:
Traceback (most recent call last):
  File "./delete_recordings.py", line 81, in <module>
    rec.delete()
  File "/usr/lib/python2.7/dist-packages/MythTV/dataheap.py", line
367, in delete
    raise MythError("Program could not be found")
MythTV.exceptions.MythError: Program could not be found


More information about the mythtv-users mailing list