[mythtv-users] Cleaning up orphan database records
Michael T. Dean
mtdean at thirdcontact.com
Thu Apr 19 17:24:52 UTC 2007
On 04/19/2007 12:40 PM, Astie, Sebastien wrote:
> I had the same issue.
>
> I wanted to delete all my items in the LiveTV group.
> In order to do so, you can login in MySQL and do
> DELETE from record where group = 'LiveTV';
>
And people wonder how they get orphaned records/orphaned files...
> If I remember correctly that this is the appropriate table and column
> name.
>
Nope.
Besides, if you used, "the appropriate table and column" you would have
orphan files. And, if you delete the files and the data from "the
appropriate table and column", you're still leaving orphaned records
(potentially > 7200 per hour of recording) in various other tables.
So, let Myth clean it up for you. The LiveTV recordings are expired in
one day (by default, so you'd have to explicitly make them last longer),
so don't worry about them. They'll go away on their own.
If you're impatient and you can't wait 'til tomorrow, go into Watch
Recordings or Delete Recordings and change the recording group to
LiveTV, then while on the left hand side, use the menu button to add all
the shows to the playlist, then Menu|Playlist Options|Delete to delete
them all.
This approach--letting Myth delete the recordings--will delete the
files, the recording information, the markup information, the seektable
information, etc. Any other approach is flat out wrong.
These "magical" scripts are a last resort that should not be required.
Mike
More information about the mythtv-users
mailing list