[mythtv-users] Database corruption

Stephen Worthington stephen_agent at jsw.gen.nz
Sun Oct 3 06:03:43 UTC 2021


On Sun, 3 Oct 2021 12:22:20 +0800, you wrote:

>
>
>> On 3 Oct 2021, at 12:14 pm, Stephen Worthington <stephen_agent at jsw.gen.nz> wrote:
>> 
>> On Sun, 3 Oct 2021 11:46:05 +0800, you wrote:
>> 
>>> I added a movie, Allied.mp4, to videos, scanned and there is was not.
>>> 
>>> I spelunked the DB and got this:
>>> 
>>> 
>>> (10347,'L\'allieva','',NULL,'Unknown','Rai 1','Alice Allevi is a student of undecided medicine on her own future. After the death of the minding one of her grandmother it discovers her road: the legal medicine. Frequenting the institute of legal medicine she comes upon in the charismatic and arrogant doctor Claudio Conforti, of which him infatua and with which a strong agreement is created. But she is also fascinated by the young, sincere and nice Arthur, child of the manager of her institute, while it is being to the takings in love as in the life with choices and binding situations','NR','ttvdb.py_316861',-1,'',2016,'2016-09-27',9,50,0,0,0,1,'Myth-A/Allied.mp4','38759a58e8f65a24','ttvdb.py_316861_coverart.jpg',-1,1,0,1,NULL,0,'','sandypit','','ttvdb.py_316861_banner.jpg','ttvdb.py_316861_fanart.jpg','2021-09-29 08:07:02','MOVIE'),
>>> 
>>> (10348,'Terminator: Dark Fate','',NULL,'Unknown',NULL,'None','NR','00000000',-1,'',1895,'0000-00-00',0,0,0,0,0,1,'Myth-T/Terminator: Dark Fate.mp4','c70b079479259a09','TerminatorDarkFate.jpg',0,1,0,1,NULL,0,'','sandypit','','','','2021-09-29 08:07:02','MOVIE’)
>>> 
>>> Clearly the DB is broken.
>>> I’d rather NOT scan an empty DB and rebuild the meta data (an awefull task)
>>> 
>>> Do the mysql gods think I can restore a DB with the corrupted section removed, rescan and recover?
>>> 
>>> Thanks
>>> James
>> 
>> I am not sure what you are seeing here that indicates database
>> corruption.  Just having a video file not scan into the database does
>> not necessarily indicate corruption.  Video files have the start of
>> the file hashed by the scanning process, and if that hash happens to
>> match an existing hash on another file, it thinks they are the same
>> file.  I have always thought the hash should include the file name and
>> size to help prevent this sort of thing, but I do not remember that
>> being done.
>> _______________________________________________
>
>
>A) Allied does not appear after scan
>
>[sandypit] /home/jam [1000]% ls /store/Movies/Myth-A/Allied*
>/store/Movies/Myth-A/Allied.mp4  /store/Movies/Myth-A/Allied.mp4.map
>
>[sandypit] /home/jam [1001]% hashDups /store/Movies
>----------------------
>now doing names
>----------------------
>[number of files] 1434
>--------------------------------
>now doing hash on files
>--------------------------------
>--------------------------------
>now doing hash check
>--------------------------------
>[sandypit] /home/jam [1002]%
>
>B) Allied.mp4 is wrapped up in ‘allivia’
>
>James

So Allied4.mp4 has had the wrong metadata associated with it.  That is
not database corruption, it is just the wrong metadata being matched
to the file.  There is not much information for the metadata lookup to
work with - just one word, "Allied4".  So it is not unexpected that it
might find the wrong thing.  Manually look up the correct metadata,
then edit the details yourself, or rename the file to give the
metadata lookup more to work with.  Usually, for a movie, you want to
at least have the year of release.  I have no idea what Allied4 is,
but renaming it like this: "Allied 4 (2019)" might help.  Once you
have done that, you can scan again and then go to the file in the
Videos listings and do:

I > Change Video Details

From there, you can reset the existing details and try Retrieve
Details to do another metadata lookup, or you can just manually edit
the details.


More information about the mythtv-users mailing list