TV_TMDB(1p)

πŸ“¦
version 1.4.0 Β· 4 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

✨ NAME ✨

tv_tmdb β€” bestie, this is the lil tool that goes and augments your XMLTV listings files with data from themoviedb.org πŸ’–

It's a Perl manual page (that's the 1p vibe, iykyk) and it's about to make your TV listings so much cuter.


🌈 SYNOPSIS 🌈

okay so here's the whole shape of it, look:

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...]

yes she takes FILE... at the end, plural, multiple, greedy little icon πŸ’…


πŸŽ€ PURPOSE πŸŽ€

tv_tmdb reads your xml file of tv programmes and literally goes hunting for a matching entry for the programme title in The Movie Database β€” that's the community-built movie and TV database, not some corporate thing, a community effort 🫢

Access to the TMDB system uses their API interface to access data in realtime. So no cap: you must be online to be able to augment your listings using tv_tmdb. Offline? Girl, nothing's happening 😭

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. Like, before. Not during. Before. πŸ’€

πŸ’… PARAMETERS πŸ’…

every single flag, no skips, we don't do that here:

  • --apikey KEY β€” your TMDB API key. the golden ticket, the main character πŸ”‘
  • --output FILE β€” write to FILE rather than standard output. redirect queen πŸ‘‘
  • --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). shhh 🀫
  • --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, in which case, not all of them, obviously.

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). so like, "exact" is doing a lot of heavy lifting there but we move πŸ’…

if the program has a 4 digit 'date' field πŸ“…

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.

if it doesn't πŸ“Ί

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 πŸ”₯

When a match is found in the themoviedb.org data the following is applied β€” all eleven of them, count 'em:

  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 🌸

step by step bestie, we got you:

  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. fr fr, they wanna hear it 🫢


⭐ 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. it's giving crowd-sourced cinema πŸ’–

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. be the change you want to see in the database 🌈


πŸ’€ BUGS πŸ’€

okay listen, the caveats:

  • 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. 😭 so close yet so far

πŸ™ˆ 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. (caps lock is on purpose bestie, this one matters πŸ‘‘)

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. that's not a vibe check you can skip πŸ’€

πŸ”₯ SEE ALSO πŸ”₯

  • xmltv(5)

πŸ’œ AUTHOR πŸ’œ

Geoff Westcott, Jerry Veldhuis


and that's the whole page, bestie πŸŽ€ this was TV_TMDB(1p) from the User Contributed Perl Documentation, running under perl v5.40.1 and dated 2025-04-19. go get that API key and slay your listings βœ¨πŸ¦‹πŸ’–

πŸ“¦ where this page comes from