TV_IMDB(1)
π TV_IMDB(1) β tv_imdb π
okay so this is the User Contributed Perl Documentation page for TV_IMDB(1), aka tv_imdb, and it's here to make your XMLTV listings file glow up with imdb.com data. bestie, let's go. π
β¨
πΈ NAME πΈ
tv_imdb β Augment XMLTV listings files with imdb.com data.
π¦ SYNOPSIS π¦
tv_imdb --imdbdir <dir> [--help] [--quiet] [--download]
[--movies-only] [--filesort] [--nosystemsort]
[--prepStage (1-9,all)]
tv_imdb --imdbdir <dir> [--help] [--quiet]
[--with-keywords] [--with-plot]
[--movies-only] [--actors NUMBER]
[--stats] [--debug]
[--output FILE] [FILE...]
tv_imdb --imdbdir <dir>
--validate-title 'movie title'
--validate-year 2004
[--with-keywords] [--with-plot]
[--debug]
π DESCRIPTION π
okay so picture tv_cat but make it makeover era: tv_imdb is very similar to tv_cat in semantics (see tv_cat), except whenever a programme appears with "date" entry the title and date are used to look up extra data using XMLTV::IMDB. iconic.
--output FILEβ write toFILErather than standard output.--with-keywordsβ include IMDb keywords in the output file.--with-plotβ include IMDb plot summary in the output file.--actors NUMBERβ number of actors from IMDb to add (default=3).--quietβ disable all status messages (that normally appear on stderr).--downloadβ try to download data files if they are missing (in--prepStage).--statsβ output grab stats (stats output disabled in--quietmode).--debugβ output info from movie matching.--movies-onlyβ only augment programs that look like movie listings (4 digit'date'field).
Also, yes: --imdbdir <dir> is the database directory from the synopsis, and --help is the help flag the prep-stage note tells you to check. The synopsis and HOWTO also carry --prepStage (1-9,all), --filesort, and --nosystemsort β those sorting/prep details live in the HOWTO note below.
All programs are checked against imdb.com data (unless --movies-only is used).
For the purposes of tv_imdb, an "exact" match is defined as a case insensitive match against imdb.com data (which may or may not include the transformation of '&' to 'and' and vice-versa).
If the program includes a 4 digit 'date' field the following matches are attempted, with the first successful match being used:
- an
"exact"title/year match against movie titles is done - an
"exact"title match against tv series (and tv mini series) - an
"exact"title match against movie titles with production dates within 2 years of the'date'value.
Unless --movies-only is used, if the program does not include a 4 digit 'date' field the following matches are attempted, the first succeeding match is used:
- an
"exact"title match against tv series (and tv mini series)
When a match is found in the imdb.com data the following is applied:
- the
'title'field is set to match exactly the title from the imdb.com data. This includes modification of the case to match and any transformations mentioned above. - if the match is a movie, the
'date'field is set to imdb.com 4 digit year of production. - the type of match found (Movie, TV Movie, Video Movie, TV Series, or TV Mini Series) is placed in the
'categories'field. - the url to the www.imdb.com page is added
- the director is added if the match was a movie or if only one director is listed in the imdb.com data (because some tv series have > 30 directors)
- the top 3 billing actors are added (use
-actors [num]to adjust). - genres added to
'categories'field (current list of genres areShort,Drama,Comedy,Documentary,Animation,Adult,Action,Family,Romance,Crime,Thriller,Musical,Adventure,Western,Horror,Sci-Fi,Fantasy,Mystery,War,Film-Noir,Music) - imdb user ratings added to
'star-ratings'field. - imdb keywords added to
'keyword'fields (if--with-keywordsused). - imdb plot summary is added (if
--with-plotused).
π§ HOWTO π§
In order to use tv_imdb, you need:
- choose a directory location to use for the
tv_imdbdatabase (you'll need about 1 GB of free space), 2a. runtv_imdb --imdbdir <dir> --prepStage all --downloadto download the list files from imdb.com. Or, 2b. If you have a slow network connection you may prefer to omit the--downloadflag and be prompted for what you need to download by hand. Seehttp://www.imdb.com/interfacesfor the download sites. Then once you have the files rerun without--download. - Once you have the database loaded try
cat tv.xml | tv_imdb --imdbdir <dir> > tv1.xml.
Note:--prepStagerequires up to 520MB of memory. This can be reduced a little by running each prepStage separately, using--prepStagewith each of the stages individually (see--helpfor details). Memory use can be reduced further by using--filesortoption when building the database. This will try to use the operating system to sort the interim data files rather than sorting in memory. If this system sort does not work for you then you can use theFile::Sortpackage if it is installed on your system, by also adding the option--nosystemsort(however this method of sorting is very slow). If you specify neither option then Perl will sort the files in memory.
If you are only interested in movies, you can reduce the memory required and the size of the database by passing the --movies-only option to the database build, which will exclude tv-series from the database.
Feel free to report any problems with these steps at https://github.com/XMLTV/xmltv/issues.
π§ͺ TESTING π§ͺ
The --validate-title and --validate-year flags can be used to validate the information in the tv_imdb database. For example:
tv_imdb --imdbdir . --validate-title 'Army of Darkness' --validate-year 1994
π BUGS π
Could use a --configure step just like the grabbers so you do not have to specify the --imdbdir on the command line every time. Also this could step you through the prep stages with more description of what is being done and what is required. Configure could also control the number of actors to add (since some movies have an awful lot), currently we are adding the top 3.
How and what to look up needs to be option driven.
Needs some more controls for fine tuning "close" matches. For instance, currently it looks like the North America grabber only has date entries for movies, but the imdb.com data contains made for video movies as well as real movies, so it's possible to get the wrong data to be inserted. In this case we may want to say "ignore tv series" and "ignore tv mini series". Along with this, we'd want to define what a "close" match is. For instance does a movie by the same title with a date out by 1 year or 2 years considered a match (currently we're using 2).
Nice to haves include: verification/addition of programme MPAA/VCHIP ratings, addition of imdb.com user ratings (by votes) to programmes. Potentially we could expand to include "country of origin", "description", "writer" and "producer" credits, maybe even "commentator".
Heh, if the XMLTV.dtd supported it, we could even include urls to head shots of the actors :)
π SEE ALSO π
xmltv(5)
π AUTHOR π
Jerry Veldhuis, jerry@matilda.com
π«Ά cute sign-off: this page is fromperl v5.42.2, dated2025-06-30, manual tagTV_IMDB(1). byeeee πβ¨
π¦ where this page comes from
- alpine 3.24: xmltv-doc 1.4.0-r1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms