tv_tmdb - Man Page

Augment XMLTV listings files with themoviedb.org data.

Synopsis

tv_tmdb
      [--help] [--quiet]
      [--configure] [--config-file FILE]
      [--apikey KEY]
      [--with-keywords] [--with-plot]
      [--movies-only] [--actors NUMBER] [--reviews NUMBER]
      [--stats] [--debug NUMBER]
      [--output FILE] [FILE...]

Purpose

tv_tmdb reads your xml file of tv programmes and attempts to find a matching entry for the  programme title in The Movie Database community-built movie and TV database.

Access to the TMDB system uses their API interface to access data in realtime.  Therefore you must be online to be able to augment your listings using tv_tmdb.

Using the TMDB system requires an API key which you can get from The Movie Database website (https://www.themoviedb.org/). The key is free for non-commercial use.

You will need to get this API key before you can start using tv_tmdb.

Parameters

--apikey KEY your TMDB API key.

--output FILE write to FILE rather than standard output.

--with-keywords include tmdb keywords in the output file.

--with-plot include tmdb plot summary in the output file.

--actors NUMBER number of actors from tmdb to add (default=3).

--reviews NUMBER number of reviews from tmdb to add (default=0).

--movies-only only augment programs that look like movie listings (have a  4 digit 'date' field).

--quiet disable all status messages (that normally appear on stderr).

--stats output grab stats (stats output disabled in --quiet mode).

--configure store frequent parameters in a config file (apikey, actors).

--config-file FILE specify your own file location instead of XMLTV default.

--debug NUMBER output info from movie matching (optional value to increase debug level:  2 is probably the max you will find useful).

Description

All programs are checked against themoviedb.org (TMDB) data (unless --movies-only is used).

For the purposes of tv_tmdb, an "exact" match is defined as a case insensitive match against themoviedb.org 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:

1. an "exact" title/year match against movie titles is done

2. an "exact" title match against tv series

3. 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:

1. an "exact" title match against tv series

When a match is found in the themoviedb.org data the following is applied:

1. the 'title' field is set to match exactly the title from the themoviedb.org data. This includes modification of the case to match and any transformations mentioned above.

2. if the match is a movie, the 'date' field is set to themoviedb.org 4 digit year of production.

3. the type of match found (Movie, or TV Series) is placed in the 'categories' field.

4. a url to the program on www.imdb.com is added.

5. the director is added if the match was a movie or if only one director is listed in the themoviedb.org data (because some tv series have. 30 directors).

6. the top 3 billing actors are added (use --actors [num] to adjust).

7. genres are added to 'categories' field.

8. TMDB user-ratings added to 'star-ratings' field.

9. TMDB keywords are added to 'keyword' fields (if --with-keywords used).

10. TMDB plot summary is added (if --with-plot used).

11. The top TMDB reviews are added (use --reviews [num] to adjust).

Howto

1. In order to use tv_tmdb, you need an API key from themoviedb.org.  These are free for Personal use. You need to create a log-in with themoviedb.org and then click on the API link on the Settings page. (See https://www.themoviedb.org/documentation/api )

2. run 'tv_tmdb --apikey <key> --output myxmlout.xml myxmlin.xml' or  'cat tv.xml | tv_tmdb --apikey <key> tv1.xml'  or etc.

3. To use a config file to avoid entering your apikey on the commandline, run 'tv_tmdb --configure' and follow the prompts.

Feel free to report any problems with these steps at https://github.com/XMLTV/xmltv/issues.

Background

Like the original (pre Amazon) IMDb, "The Movie Database" (TMDB)  (https://www.themoviedb.org/) is a community effort, and relies on people  adding the movies.

Note TMDB is not IMDB...but it's getting there! As at December 2021, TMDB  has over 700,000 movies and 123,000 TV shows while IMDB has approx 770,000 movies  and 217,000 TV series. However there are bound to be some films/TV programmes  on IMDb which are not on TMDB. So if you can't find a film that you can find  manually on IMDb then you might consider signing up to TMDB and adding it yourself.

Bugs

We only add movie information to programmes that have a 'date' element defined  (since we need a year to work with when verifing we got the correct hit in the TMDB data).

A date is required for a movie to be augmented.  (If no date is found in the incoming data then it is assumed the program  is a tv series/episode.)

For movies we look for matches on title plus release-year within two years of the program date. We could check other data such as director or top 3 actors  to help identify the correct match.

Headshots of the actors are possible with the TMDB data, but the XMLTV.dtd does not currently support them.

Disclaimer

This product uses the TMDB API but is not endorsed or certified by TMDB.

It is YOUR responsibility to comply with TMDB's Terms of Use of their API.

In particular your attention is drawn to TMDB's restrictions on Commercial Use. Your use is deemed to be Commercial if any of:

1. Users are charged a fee for your product or a 3rd party's product or service  or a 3rd party's service that includes some sort of integration using the TMDB APIs.

2. You sell services using TMDb's APIs to bring users' TMDB content into your service.

3. Your site is a "destination" site that uses TMDB content to drive traffic  and generate revenue.

4. Your site generates revenue by charging users for access to content related  to TMDB content such as movies, television shows and music.

If any of these events are true then you cannot use TMDB data in any part of your  product or service without a commercial license.

See Also

xmltv(5)

Author

Geoff Westcott,  Jerry Veldhuis

Info

2024-02-24 perl v5.38.2 User Contributed Perl Documentation