]> git.ipfire.org Git - thirdparty/tvheadend.git/commit
python: Support multiple grabber modules for movies and tv artwork.
authorE.Smith <31170571+azlm8t@users.noreply.github.com>
Thu, 27 Sep 2018 21:04:26 +0000 (22:04 +0100)
committerperexg <perex@perex.cz>
Tue, 2 Oct 2018 14:05:03 +0000 (16:05 +0200)
commit2feb12ea49bf1a29006fc08dcea1dff500ea745e
treebef51bd8907196430aeb9ff0fc559d9bde6e57af
parente13cad7bc6bd549c7ea167dcac6d85f271dfe8d2
python: Support multiple grabber modules for movies and tv artwork.

The "--modules-movie=a,b,c" command line option will load each of
these modules in turn and ask them to provide artwork. TV modules are
selected via "--modules-tv" option.

The default (if no --modules-movies is provided) is to search the
Python path for python files that are named "tv_meta_*py" and then
call the module's "get_capabilities" to determine if the grabber
supports tv, movie, or both.

Each grabber module is called in turn until all artwork is
retrieved. So, if the first module only provides a fanart, then the
next module can supply the poster image.

Modules can be passed command line options from tvhmeta by prefixing
them with the shortened module name.

So, for a grabber module such as "tv_grab_tmdb", we pass through
command line arguments from tvhmeta to it. So if the tvhmeta is called
with an option of "--tmdb-key" then we pass through "key" as an option
to the tv_grab_tmdb (stripping the "--tmdb").

This allows third parties to produce grabber modules that
automatically integrate.

Also switched from deprecated OptionParser to argparse.
lib/py/tvh/tv_meta_tmdb.py
support/tvhmeta