Mailing List Archive

adding recordings to the database?
I don’t have this problem, but I’m thinking ahead. Suppose you have a bunch of TV recordings but you’ve lost the database and your backup. Is there a way to add the recordings to a new database and fresh install?

Second situation. You have a lot of recordings, but your database backup is a few years old and missing a few of the recordings. Is there a way to run a script to find recordings that are present but not in the database and then add them back in?

Jim Abernathy
jfabernathy@gmail.com
Re: adding recordings to the database? [ In reply to ]
On Sun, 28 Jan 2018 18:42:36 -0500, you wrote:

>I don?t have this problem, but I?m thinking ahead. Suppose you have a bunch of TV recordings but you?ve lost the database and your backup. Is there a way to add the recordings to a new database and fresh install?

No. It would be possible to write a script to do it, but it would be
a fair bit of work and is not necessary. Just put the recordings in a
videos directory and change the names on the files to represent what
they are. If you use a name format that the metadata download
understands, then you can normally get the same sort of information
you would have had in the EPG data.

>Second situation. You have a lot of recordings, but your database backup is a few years old and missing a few of the recordings. Is there a way to run a script to find recordings that are present but not in the database and then add them back in?

The find_orphans.py script does this, or at least it will tell you
about recordings that have database and no recording file and vice
versus. But it will not be able to recover database entries for
recordings missing that data - again, just move the files to videos
and rename them.

>Jim Abernathy
>jfabernathy@gmail.com
_______________________________________________
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
Re: adding recordings to the database? [ In reply to ]
Jim Abernathy
jfabernathy@gmail.com



> On Jan 28, 2018, at 10:47 PM, Stephen Worthington <stephen_agent@jsw.gen.nz> wrote:
>
> On Sun, 28 Jan 2018 18:42:36 -0500, you wrote:
>
>> I don? have this problem, but I? thinking ahead. Suppose you have a bunch of TV recordings but you?e lost the database and your backup. Is there a way to add the recordings to a new database and fresh install?
>
> No. It would be possible to write a script to do it, but it would be
> a fair bit of work and is not necessary. Just put the recordings in a
> videos directory and change the names on the files to represent what
> they are. If you use a name format that the metadata download
> understands, then you can normally get the same sort of information
> you would have had in the EPG data.
>
>> Second situation. You have a lot of recordings, but your database backup is a few years old and missing a few of the recordings. Is there a way to run a script to find recordings that are present but not in the database and then add them back in?
>
> The find_orphans.py script does this, or at least it will tell you
> about recordings that have database and no recording file and vice
> versus. But it will not be able to recover database entries for
> recordings missing that data - again, just move the files to videos
> and rename them.

So I ran the find_orphans.py script just to see what it would find, expecting nothing and I found a good bit of stuff.

Let me see if I have this right. Ophaned video files are file that are in the directories but not in the database, right?

Orphaned snapshots are the thumbnail files that exist in the directories, but not in the databased, right?

Some of the orphaned video files were programs I watched last week and then deleted. Not sure how they end up as orphaned.

Jim A

>
>> Jim Abernathy
>> jfabernathy@gmail.com
> _______________________________________________
> 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
Re: adding recordings to the database? [ In reply to ]
On Mon, 29 Jan 2018 10:14:11 -0500, you wrote:

>
>Jim Abernathy
>jfabernathy@gmail.com
>
>
>
>> On Jan 28, 2018, at 10:47 PM, Stephen Worthington <stephen_agent@jsw.gen.nz> wrote:
>>
>> On Sun, 28 Jan 2018 18:42:36 -0500, you wrote:
>>
>>> I don? have this problem, but I? thinking ahead. Suppose you have a bunch of TV recordings but you?e lost the database and your backup. Is there a way to add the recordings to a new database and fresh install?
>>
>> No. It would be possible to write a script to do it, but it would be
>> a fair bit of work and is not necessary. Just put the recordings in a
>> videos directory and change the names on the files to represent what
>> they are. If you use a name format that the metadata download
>> understands, then you can normally get the same sort of information
>> you would have had in the EPG data.
>>
>>> Second situation. You have a lot of recordings, but your database backup is a few years old and missing a few of the recordings. Is there a way to run a script to find recordings that are present but not in the database and then add them back in?
>>
>> The find_orphans.py script does this, or at least it will tell you
>> about recordings that have database and no recording file and vice
>> versus. But it will not be able to recover database entries for
>> recordings missing that data - again, just move the files to videos
>> and rename them.
>
>So I ran the find_orphans.py script just to see what it would find, expecting nothing and I found a good bit of stuff.
>
>Let me see if I have this right. Ophaned video files are file that are in the directories but not in the database, right?
>
>Orphaned snapshots are the thumbnail files that exist in the directories, but not in the databased, right?
>
>Some of the orphaned video files were programs I watched last week and then deleted. Not sure how they end up as orphaned.
>
>Jim A

Correct. The normal way that recording files get orphaned is if you
have a database crash bad enough that you have to restore a earlier
database backup. Any recordings made since the backup happened will
no longer have any database entries.
_______________________________________________
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
Re: adding recordings to the database? [ In reply to ]
James Abernathy <jfabernathy@gmail.com> says:
> So I ran the find_orphans.py script just to see what it would find,
> expecting nothing and I found a good bit of stuff.

It's surprising what scripts can turn up. A while ago I had a problem
with drives running out of room for recordings despite the "Extra disk
space (GB)" setting not being changed; increasing this setting to
enlarge the safety margin made no difference. One day I ran the
flush_deleted_recgroup.pl script for a different reason and found many
more entries being deleted than I expected.

What happened was that a bunch of old, leftover recording entries and
associated recording files were present in the Deleted recording
group, although not visible when manually visiting it from Watch
Recordings. Whatever caused them to be invisible also made them not
get swept up by the "Time to retain deleted recordings (days)" setting
(8 days in my case), and find_orphans.py did not find them either.

(A symptom of this problem is the total number of recordings the
frontend lists in the Change Filter popup for each individual
recording group?"Default", "Deleted" (if existing), and any others you
have created?differing from the number of entries in the 'recorded'
database schema. (Don't use the number of recordings in "All
Programs"; that excludes those in "Deleted".)

flush_deleted_recgroup.pl almost entirely solved the problem, but
there were a couple of garbage recording entries lacking associated
recording files that the script ignored. I used 'touch' to create
dummy recording files, then reran the script.

--
Frontend: Apple MacBook Pro 2012 2.6GHz with 1TB SSD
Backend: HP Microserver N40L 1.5GHz with 4x3TB HDDs
Video inputs: Three from CableCARD plus two over-the-air
_______________________________________________
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
Re: adding recordings to the database? [ In reply to ]
On Wed, 31 Jan 2018 03:47:01 -0800, you wrote:

>James Abernathy <jfabernathy@gmail.com> says:
>> So I ran the find_orphans.py script just to see what it would find,
>> expecting nothing and I found a good bit of stuff.
>
>It's surprising what scripts can turn up. A while ago I had a problem
>with drives running out of room for recordings despite the "Extra disk
>space (GB)" setting not being changed; increasing this setting to
>enlarge the safety margin made no difference. One day I ran the
>flush_deleted_recgroup.pl script for a different reason and found many
>more entries being deleted than I expected.
>
>What happened was that a bunch of old, leftover recording entries and
>associated recording files were present in the Deleted recording
>group, although not visible when manually visiting it from Watch
>Recordings. Whatever caused them to be invisible also made them not
>get swept up by the "Time to retain deleted recordings (days)" setting
>(8 days in my case), and find_orphans.py did not find them either.
>
>(A symptom of this problem is the total number of recordings the
>frontend lists in the Change Filter popup for each individual
>recording group?"Default", "Deleted" (if existing), and any others you
>have created?differing from the number of entries in the 'recorded'
>database schema. (Don't use the number of recordings in "All
>Programs"; that excludes those in "Deleted".)
>
>flush_deleted_recgroup.pl almost entirely solved the problem, but
>there were a couple of garbage recording entries lacking associated
>recording files that the script ignored. I used 'touch' to create
>dummy recording files, then reran the script.

Yes, I also had quite a few of those old leftover recordings in the
deleted list. It was being caused by a bug that has since been fixed.
I believe that once the fix for that bug got installed on your system,
mythbackend would have cleaned up the deleted list properly, but I had
manually already done that.
_______________________________________________
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
Re: adding recordings to the database? [ In reply to ]
Stephen Worthington <stephen_agent@jsw.gen.nz> says:
> Yes, I also had quite a few of those old leftover recordings in the
> deleted list. It was being caused by a bug that has since been
> fixed.

Do you know when the bug was fixed? I'm still on 0.26.1-fixes. If
necessary, maybe I could backport the patch to avoid having this
happen in the future.

--
Frontend: Apple MacBook Pro 2012 2.6GHz with 1TB SSD
Backend: HP Microserver N40L 1.5GHz with 4x3TB HDDs
Video inputs: Three from CableCARD plus two over-the-air
_______________________________________________
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
Re: adding recordings to the database? [ In reply to ]
On Thu, 1 Feb 2018 08:14:08 -0800, you wrote:

>Stephen Worthington <stephen_agent@jsw.gen.nz> says:
>> Yes, I also had quite a few of those old leftover recordings in the
>> deleted list. It was being caused by a bug that has since been
>> fixed.
>
>Do you know when the bug was fixed? I'm still on 0.26.1-fixes. If
>necessary, maybe I could backport the patch to avoid having this
>happen in the future.

The fix happened shortly after the bug was noticed and reported here
on the mailing list. But exactly when that was, I am afraid it is too
long ago for me to remember.

If you want bug fixes, what is wrong with upgrading to v29?
_______________________________________________
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