[mythtv-users] New Version: 1.4 Bulk Updater for Videometa(imdb) data

Ryan Pisani mythtv at frouse3.homelinux.com
Mon Sep 24 02:56:16 UTC 2007


>>>>
>>>>>
>>>>> I have noticed a few oddities with running the following command:
>>>>> /home/mythtv/imdbupdater/imdb-bulk-update.pl -N -Fileup -Exclude
>>>>> The .m2v files for some reason these are continually being marked as
>>>>> new
>>>>> files?
>>>>>
>>>>> Even though I can see them in the db.
>>>>
>>>>
>>>> Hmm. I can't see to find anything in the code that would cause this.
>>>>
>>>> Give me 2 things. One of the at fault filenames with the full path
>>>> /movies/etc/etc/filensame.m2v
>>>>
>>>> And then give me the output from this:
>>>>
>>>> echo select extension, f_ignore from videotypes\; | mysql -umythtv
>>>> -pmythtv mythconverg
>>>>
>>>> This assumes that your user/pass and db are the defaults of course.
>>>>
>>>> Ryan
>>>
>>> /storage/videos/movies/music videos/DVD/A Perfect Circle - Passive.m2v
>>>
>>>
>>> | extension | f_ignore |
>>> +-----------+----------+
>>> | txt       |        1 |
>>> | log       |        1 |
>>> | mpg       |        0 |
>>> | avi       |        0 |
>>> | vob       |        0 |
>>> | mpeg      |        0 |
>>> | VIDEO_TS  |        0 |
>>> | iso       |        0 |
>>> | img       |        0 |
>>> | rmvb      |        0 |
>>> | jpg       |        1 |
>>> | png       |        1 |
>>> | gif       |        1 |
>>> | cue       |        1 |
>>> | sub       |        1 |
>>> | srt       |        1 |
>>> | dat       |        1 |
>>> | mp4       |        0 |
>>> | m2v       |        0 |
>>> +-----------+----------+
>>> 19 rows in set (0.00 sec)
>>>
>>> Thanks Anthony
>>>
>>
>>
>> Ok. Nothing looks out of sorts there. Can you tell me what the output of
>> this is:
>>
>> select * from videometadata where filename like "%A Perfect Circle%"
>
> Ahhh its also inserting it into the Database multiple times
>
> +-------+--------------------------------+----------+---------+--------+----------+------+------------+--------+-----------+------------------------------------------------------------------------+-----------+---------+--------+-------------+----------+
> | intid | title                          | director | plot    | rating |
> inetref  | year | userrating | length | showlevel | filename
>                                                 | coverfile | childid |
> browse | playcommand | category |
> +-------+--------------------------------+----------+---------+--------+----------+------+------------+--------+-----------+------------------------------------------------------------------------+-----------+---------+--------+-------------+----------+
> |   816 | A Perfect Circle - Passive     | Unknown  | Unknown | NR     |
> 99999999 | 1895 |          0 |      0 |         0 |
> /storage/videos/movies/music videos/DVD/A Perfect Circle - Passive.m2v |
> No Cover  |      -1 |      1 | NULL        |        0 |
> |   706 | A Perfect Circle - Passive.m2v | Unknown  | Unknown | NR     |
> 99999999 | 1895 |          0 |      0 |         0 |
> /storage/videos/movies/music videos/DVD/A Perfect Circle - Passive.m2v |
> No Cover  |      -1 |      1 | NULL        |        0 |
> |   808 | A Perfect Circle - Passive.m2v | Unknown  | Unknown | NR     |
> 99999999 | 1895 |          0 |      0 |         0 |
> /storage/videos/movies/music videos/DVD/A Perfect Circle - Passive.m2v |
> No Cover  |      -1 |      1 | NULL        |        0 |
> |   821 | A Perfect Circle - Passive     | Unknown  | Unknown | NR     |
> 99999999 | 1895 |          0 |      0 |         0 |
> /storage/videos/movies/music videos/DVD/A Perfect Circle - Passive.m2v |
> No Cover  |      -1 |      1 | NULL        |        0 |
> |   853 | A Perfect Circle - Passive     | Unknown  | Unknown | NR     |
> 99999999 | 1895 |          0 |      0 |         0 |
> /storage/videos/movies/music videos/DVD/A Perfect Circle - Passive.m2v |
> No Cover  |      -1 |      1 | NULL        |        0 |
> |   963 | A Perfect Circle - Passive     | Unknown  | Unknown | NR     |
> 99999999 | 1895 |          0 |      0 |         0 |
> /storage/videos/movies/music videos/DVD/A Perfect Circle - Passive.m2v |
> No Cover  |      -1 |      1 | NULL        |        0 |
> |   968 | A Perfect Circle - Passive     | Unknown  | Unknown | NR     |
> 99999999 | 1895 |          0 |      0 |         0 |
> /storage/videos/movies/music videos/DVD/A Perfect Circle - Passive.m2v |
> No Cover  |      -1 |      1 | NULL        |        0 |
> |   980 | A Perfect Circle - Passive     | Unknown  | Unknown | NR     |
> 99999999 | 1895 |          0 |      0 |         0 |
> /storage/videos/movies/music videos/DVD/A Perfect Circle - Passive.m2v |
> No Cover  |      -1 |      1 | NULL        |        0 |
> |   975 | A Perfect Circle - Passive     | Unknown  | Unknown | NR     |
> 99999999 | 1895 |          0 |      0 |         0 |
> /storage/videos/movies/music videos/DVD/A Perfect Circle - Passive.m2v |
> No Cover  |      -1 |      1 | NULL        |        0 |
> |   987 | A Perfect Circle - Passive     | Unknown  | Unknown | NR     |
> 99999999 | 1895 |          0 |      0 |         0 |
> /storage/videos/movies/music videos/DVD/A Perfect Circle - Passive.m2v |
> No Cover  |      -1 |      1 | NULL        |        0 |
> |   992 | A Perfect Circle - Passive     | Unknown  | Unknown | NR     |
> 99999999 | 1895 |          0 |      0 |         0 |
> /storage/videos/movies/music videos/DVD/A Perfect Circle - Passive.m2v |
> No Cover  |      -1 |      1 | NULL        |        0 |
> |  1013 | A Perfect Circle - Passive     | Unknown  | Unknown | NR     |
> 99999999 | 1895 |          0 |      0 |         0 |
> /storage/videos/movies/music videos/DVD/A Perfect Circle - Passive.m2v |
> No Cover  |      -1 |      1 | NULL        |        0 |
> |  1028 | A Perfect Circle - Passive     | Unknown  | Unknown | NR     |
> 99999999 | 1895 |          0 |      0 |         0 |
> /storage/videos/movies/music videos/DVD/A Perfect Circle - Passive.m2v |
> No Cover  |      -1 |      1 | NULL        |        0 |
> |  1033 | A Perfect Circle - Passive     | Unknown  | Unknown | NR     |
> 99999999 | 1895 |          0 |      0 |         0 |
> /storage/videos/movies/music videos/DVD/A Perfect Circle - Passive.m2v |
> No Cover  |      -1 |      1 | NULL        |        0 |
> |  1038 | A Perfect Circle - Passive     | Unknown  | Unknown | NR     |
> 99999999 | 1895 |          0 |      0 |         0 |
> /storage/videos/movies/music videos/DVD/A Perfect Circle - Passive.m2v |
> No Cover  |      -1 |      1 | NULL        |        0 |
> |  1043 | A Perfect Circle - Passive     | Unknown  | Unknown | NR     |
> 99999999 | 1895 |          0 |      0 |         0 |
> /storage/videos/movies/music videos/DVD/A Perfect Circle - Passive.m2v |
> No Cover  |      -1 |      1 | NULL        |        0 |
> |  1048 | A Perfect Circle - Passive     | Unknown  | Unknown | NR     |
> 99999999 | 1895 |          0 |      0 |         0 |
> /storage/videos/movies/music videos/DVD/A Perfect Circle - Passive.m2v |
> No Cover  |      -1 |      1 | NULL        |        0 |
> |  1053 | A Perfect Circle - Passive     | Unknown  | Unknown | NR     |
> 99999999 | 1895 |          0 |      0 |         0 |
> /storage/videos/movies/music videos/DVD/A Perfect Circle - Passive.m2v |
> No Cover  |      -1 |      1 | NULL        |        0 |
> |  1058 | A Perfect Circle - Passive     | Unknown  | Unknown | NR     |
> 99999999 | 1895 |          0 |      0 |         0 |
> /storage/videos/movies/music videos/DVD/A Perfect Circle - Passive.m2v |
> No Cover  |      -1 |      1 | NULL        |        0 |
> |  1063 | A Perfect Circle - Passive     | Unknown  | Unknown | NR     |
> 99999999 | 1895 |          0 |      0 |         0 |
> /storage/videos/movies/music videos/DVD/A Perfect Circle - Passive.m2v |
> No Cover  |      -1 |      1 | NULL        |        0 |
> |  1068 | A Perfect Circle - Passive     | Unknown  | Unknown | NR     |
> 99999999 | 1895 |          0 |      0 |         0 |
> /storage/videos/movies/music videos/DVD/A Perfect Circle - Passive.m2v |
> No Cover  |      -1 |      1 | NULL        |        0 |
> |  1073 | A Perfect Circle - Passive     | Unknown  | Unknown | NR     |
> 99999999 | 1895 |          0 |      0 |         0 |
> /storage/videos/movies/music videos/DVD/A Perfect Circle - Passive.m2v |
> No Cover  |      -1 |      1 | NULL        |        0 |
> |  1078 | A Perfect Circle - Passive     | Unknown  | Unknown | NR     |
> 99999999 | 1895 |          0 |      0 |         0 |
> /storage/videos/movies/music videos/DVD/A Perfect Circle - Passive.m2v |
> No Cover  |      -1 |      1 | NULL        |        0 |
> +-------+--------------------------------+----------+---------+--------+----------+------+------------+--------+-----------+------------------------------------------------------------------------+-----------+---------+--------+-------------+----------+
> 23 rows in set (0.01 sec)
>
>

Anthony --
I think I found the issue. When I do the sort I use a hash to compare the
files already in the DB and those that are on the Filesystem. In doing so
the comparison I am making does a if the count is != 2, then we'll add it.
Here is my mistake, I made the assumption that for any given title only 1
entry would exist in the DB.

I expect that your videometadata table actually had more than 1 entry
listed for this particular file, so the comparison of the files was not
equal to 2, it may have been 3 or 4 or now 23..... so everytime this check
is true and again adds it to the DB.

I'm going to fix this check to make it >= instead which should prevent
this from happening for everyone. To get this entry out of your DB, I'd
say rename this file, and re-run the -Fileup for now. This should clean up
that particular entry.

I'll fix the script and post a new version shortly.

Ryan




More information about the mythtv-users mailing list