Browse files

Add support for IMDB based lookups

I'm giving greg credit for this, but the method is significantly
differnet. This includes an explicit regular expression check to ensure
only zero-padded seven digit numbers are queried as IMDB IDs. This is to
prevent any risk of potential overlap with TMDB IDs, once their database
grows that large. This also does not bother applying the IMDB IDs to the
temporary VideoMetadata object as MythTV does not attempt to do anything
with it.

Fixes #11345

Signed-off-by: Raymond Wagner <>
  • Loading branch information...
gergnz authored and wagnerrp committed Jan 8, 2013
1 parent 7d9bf31 commit c68e784d32192f69a066169b02a2135b0d1f101a
Showing with 9 additions and 2 deletions.
  1. +9 −2 mythtv/programs/scripts/metadata/Movie/
@@ -11,14 +11,15 @@
__title__ = " V3"
__author__ = "Raymond Wagner"
__version__ = "0.3.3"
__version__ = "0.3.4"
# 0.1.0 Initial version
# 0.2.0 Add language support, move cache to home directory
# 0.3.0 Enable version detection to allow use in MythTV
# 0.3.1 Add --test parameter for proper compatibility with mythmetadatalookup
# 0.3.2 Add --area parameter to allow country selection for release date and
# parental ratings
# 0.3.3 Use translated title if available
# 0.3.4 Add support for finding by IMDB under -D (simulate previous version)
from optparse import OptionParser
import sys
@@ -27,7 +28,13 @@ def buildSingle(inetref, opts):
from MythTV.tmdb3 import Movie
from MythTV import VideoMetadata
from lxml import etree
movie = Movie(inetref)
import re
if re.match('^0[0-9]{6}$', inetref):
movie = Movie.fromIMDB(inetref)
movie = Movie(inetref)
tree = etree.XML(u'<metadata></metadata>')
mapping = [['runtime', 'runtime'], ['title', 'originaltitle'],
['releasedate', 'releasedate'], ['tagline', 'tagline'],

0 comments on commit c68e784

Please sign in to comment.