TV_TMDB(1p)
β¨ 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--quietmode).--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:
- an "exact" title/year match against movie titles is done
- an "exact" title match against tv series
- 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:
- 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:
- 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. - if the match is a movie, the
'date'field is set to themoviedb.org 4 digit year of production. - the type of match found (Movie, or TV Series) is placed in the
'categories'field. - a url to the program on
www.imdb.comis added. - 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).
- the top 3 billing actors are added (use
--actors [num]to adjust). - genres are added to
'categories'field. - TMDB user-ratings added to
'star-ratings'field. - TMDB keywords are added to
'keyword'fields (if--with-keywordsused). - TMDB plot summary is added (if
--with-plotused). - The top TMDB reviews are added (use
--reviews [num]to adjust).
πΈ HOWTO πΈ
step by step bestie, we got you:
- 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. (Seehttps://www.themoviedb.org/documentation/api) - run
'tv_tmdb --apikey <key> --output myxmlout.xml myxmlin.xml'or'cat tv.xml | tv_tmdb --apikey <key> tv1.xml'or etc. - 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:
- 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.
- You sell services using TMDb's APIs to bring users' TMDB content into your service.
- Your site is a "destination" site that uses TMDB content to drive traffic and generate revenue.
- 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
- debian trixie: xmltv-util 1.4.0-1 Β· GPL-2.0-only
- ubuntu resolute: xmltv-util 1.4.0-1 Β· GPL-2.0-only
- ubuntu stonking: xmltv-util 1.4.0-1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms