[mythtv-users] hash

jam at tigger.ws jam at tigger.ws
Sun Mar 15 23:44:16 UTC 2020


> On 15 Mar 2020, at 8:00 pm, mythtv-users-request at mythtv.org wrote:
> 
>> we have a feature that I think is silly, over the years has on many occasions caused me great grief. Not to list identical hash files more than once. (scan fails to find a file)
>> 
>> The chance of two unrelated files having the same hash is a million to one. Terry Pratchtte wrote
>> 'the chance of a million-to-one event happening is 9-in-10'
>> 
>> After yet another hour long session I decided to remove that 'feature;. Alas it is not so simple.
>> 
>> Someone put
>> 
>>        // I deleted the incorrect SQL select that was supposed to get
>>        // host name from ip address. Since it cannot work and has
>>        // been there 6 years I assume it is not important.
>> 
>> in the code right where the hash is gathered.
>> If they (or anybody else) can say a line or two I'd appreciate it lots. I want to totally disable the hash mechanism.
>> 
>> Please no kind words saying 'you really don't want to do that'
> 
> I can't answer your question, but agree that this is a problematic
> feature which has also caused me problems.
> 
> That, and it prevents me from organising my video library in more ways
> than one: I would for example like to create additional views using
> symlinks (e.g. recently added, or a split into box sets and movies, or a
> split by decade, etc).
> 
> Still: I see that the videometadata.hash field is a varchar(128) yet is
> populated with only 16 hex digits. So if you're only interested in
> further reducing the risk of collisions between unrelated files, what if
> you fire up your random number generator and put a much longer random
> string in that field? If we keep our fingers crossed perhaps that will
> do what you want without code changes (and hopefully also without
> crashes due to buffers being too small).

I had not thought of that (re-organize library)
I've just been going through this hell:
[sandypit] /store/Movies [1002]% hashDups
----------------------
now doing names
----------------------
[number of files] 1261
--------------------------------
now doing hash on files
--------------------------------
now doing hash check
--------------------------------

But two files *still* wont scan.
Recolved by:
* removing the files
* making an empty directory
* scanning
* put the files in the empty directory
* scanning
At last there they are. They were two slightly differant versions of the same movie (cutpoint changed)
* mv them where I want
* scanning

I will post a patch when I'm done, meanwhile you could have multiple slightly different copies in your library.

James


More information about the mythtv-users mailing list