Difference between revisions of "Metadata Lookup Changes March 2021"

From MythTV Official Wiki
Jump to: navigation, search
(Fix typo)
(Add Manual install instructions from Hika van den Hoven)
 
Line 32: Line 32:
  
 
Build from git branch fixes/31 or master, depending on your version.
 
Build from git branch fixes/31 or master, depending on your version.
 +
 +
=== Manual Installation for older versions ===
 +
 +
The source code has only been updated for fixes/31 and master. If you are running version 30 or earlier, you can do a manual install. Thanks to Hika van den Hoven for these instructions. Note that this is not officially supported. Be prepared to back it out if necessary.
 +
 +
Get the latest version of mythtv from github:
 +
 +
Make directory where to place it and go there
 +
 +
run:
 +
    git clone https://github.com/MythTV/mythtv.git mythtv
 +
   
 +
If that does not work, first install git!
 +
   
 +
Next either install the pythonbindings from there into python3:
 +
 +
go inside the downloaded data to:
 +
 +
        ...mythtv/mythtv/bindings/python
 +
 +
(substitute ... with the location you downloaded it to)
 +
 +
run:
 +
 +
        sudo python3 ./setup.py install
 +
 +
install the following python modules if not jet there:
 +
 +
        https://pypi.org/project/mysqlclient/
 +
        https://pypi.org/project/requests/
 +
        https://pypi.org/project/requests-cache/
 +
        https://pypi.org/project/python-dateutil/
 +
        https://pypi.org/project/future
 +
 +
by either
 +
downloading the sourcefiles from above links,
 +
unpacking them
 +
and from the main directory within the unpacked files run:
 +
 +
        sudo python3 ./setup.py install
 +
 +
or by finding the appropriate modules for your distribution.
 +
 +
or update the apropriate bindingfiles in your python2.7 binding directory
 +
 +
on my system:
 +
 +
        /usr/lib64/python2.7/site-packages/MythTV
 +
 +
on others possibly:
 +
 +
        /usr/local/lib/python2.7/dist-packages/MythTV
 +
 +
or a variation of the above.
 +
   
 +
Go to that directory
 +
 +
first backup the tmdb3 directory in there by renaming it to tmdb3.bak:
 +
 +
        mv tmdb3 tmdb3.bak
 +
 +
copy from the above downloaded git files the tmdb3 and tvmaze directory into this MythTV directory:
 +
 +
        sudo cp -rp ...mythtv/mythtv/bindings/python/tmdb3/tmdb3/ .
 +
        sudo cp -rp ...mythtv/mythtv/bindings/python/tvmaze/ .
 +
(substitute ... with the location you downloaded mythtv into)
 +
 +
install the following python modules if not jet there:
 +
 +
        https://pypi.org/project/requests/
 +
        https://pypi.org/project/requests-cache/
 +
        https://pypi.org/project/python-dateutil/
 +
        https://pypi.org/project/future
 +
 +
by either
 +
downloading the sourcefiles from above links,
 +
unpacking them
 +
and from the main directory within the unpacked files run:
 +
 +
        sudo python2 ./setup.py install
 +
 +
or by finding the appropriate modules for your distribution.
 +
   
 +
Go to the location of the graberfiles in:
 +
    /usr/share/mythtv/metadata/Television/
 +
 +
        sudo cp -p ...mythtv/mythtv/programs/scripts/metadata/Television/tvmaze.py .
 +
        sudo cp -p ...mythtv/mythtv/programs/scripts/metadata/Television/tmdb3tv.py .
 +
 +
(substitute ... with the location you downloaded mythtv into)
 +
           
 +
if you installed the python3 bindings, ensure the first line of both files points to python3:
 +
 +
        #!/usr/bin/env python3
 +
       
 +
if you updated the python2 bindings,ensure the first line of both files points to python2:
 +
 +
        #!/usr/bin/env python2
 +
       
 +
if you updated the python2 bindings, you also have to update tmdb3.py in
 +
 +
    /usr/share/mythtv/metadata/Movie/
 +
 +
go there and run:
 +
 +
        sudo cp -p ...mythtv/mythtv/programs/scripts/metadata/Movie/tmdb3.py .
 +
 +
(substitute ... with the location you downloaded mythtv into)
 +
 +
I have not tested this tmdb3.py version with python2!
 +
       
 +
Tests:
 +
    /usr/share/mythtv/metadata/Television/tvmaze.py -t
 +
    /usr/share/mythtv/metadata/Television/tmdb3tv.py -l en -a US -M Monk
 +
    /usr/share/mythtv/metadata/Television/tvmaze.py -l en -a US -M Monk

Latest revision as of 20:16, 25 February 2021


Important.png Note: For TV series metadata lookup to continue working, you must update as described here.

MythTV metadata lookup uses thetvdb.com as source for TV show information and artwork. TheTVDB is changing their business model to require a subscription payment to use the API. The existing API will be shut down around March 2021.

MythTV fixes/31 and master (v32-Pre) have been updated to support two new sources. For metadata lookups on TV shows to continue working, you need to upgrade your system. To be able to make the new selection, both backend and frontend must be upgraded (if you use separate machines for backend and frontend).

You can select one of these options in mythfrontend -> setup -> Artwork and Data Sources -> Television Metadata Source. You need to change this for metadata lookup to continue working. Select one of the following two options.

  • TheMovieDB.org V3 television. TheMovieDB is used for Movie lookups. It can now be used for TV series lookups as well.
  • TVmaze.com.

If you have recording rules that have inetref specified as ttvdb.py_nnnnn these must be changed or metadata lookups for future recordings will fail. Appropriate values are as follows:

  • tmdb3tv.py_nnnnn for lookup of TV series using themoviedb.org.
  • tvmaze.py_nnnnn for lookup of TV series using tvmaze.com.
  • tmdb3.py_nnnnn for lookup of movies using themoviedb.org.

In each case, nnnnn is the inetref for the series or movie at the appropriate site. These numbers are different for each site, so you cannot just change the prefix.

You can update recording rules from mythfrontend by clearing out the inetref field and clicking the search button to search using the source that you selected in frontend setup. This does not work with mythfrontend on Android.

Note that it is perfectly acceptable to have some rules using tmdb3tv.py_nnnnn and some using tvmaze.py_nnnnn at the same time. They will be looked up using the appropriate service. If you have some that are still using ttvdb, they will continue to work until the old ttvdb service is shut down.

If you have Leanfront on Android or on an emulator on a PC, you can search both tvmaze and themoviedb without changing the frontend setup. That way you can check for each show which service will support it and set up accoringly.

Ubuntu and Xubuntu Focal (20.04)

If you installed using Ubuntu packages, you can add the ppa and perform an upgrade to get the latest version.

Other distributions

Build from git branch fixes/31 or master, depending on your version.

Manual Installation for older versions

The source code has only been updated for fixes/31 and master. If you are running version 30 or earlier, you can do a manual install. Thanks to Hika van den Hoven for these instructions. Note that this is not officially supported. Be prepared to back it out if necessary.

Get the latest version of mythtv from github:

Make directory where to place it and go there

run:

   git clone https://github.com/MythTV/mythtv.git mythtv
   

If that does not work, first install git!

Next either install the pythonbindings from there into python3:

go inside the downloaded data to:

       ...mythtv/mythtv/bindings/python

(substitute ... with the location you downloaded it to)

run:

       sudo python3 ./setup.py install

install the following python modules if not jet there:

       https://pypi.org/project/mysqlclient/
       https://pypi.org/project/requests/
       https://pypi.org/project/requests-cache/
       https://pypi.org/project/python-dateutil/
       https://pypi.org/project/future

by either downloading the sourcefiles from above links, unpacking them and from the main directory within the unpacked files run:

       sudo python3 ./setup.py install

or by finding the appropriate modules for your distribution.

or update the apropriate bindingfiles in your python2.7 binding directory

on my system:

       /usr/lib64/python2.7/site-packages/MythTV

on others possibly:

       /usr/local/lib/python2.7/dist-packages/MythTV

or a variation of the above.

Go to that directory

first backup the tmdb3 directory in there by renaming it to tmdb3.bak:

       mv tmdb3 tmdb3.bak

copy from the above downloaded git files the tmdb3 and tvmaze directory into this MythTV directory:

       sudo cp -rp ...mythtv/mythtv/bindings/python/tmdb3/tmdb3/ .
       sudo cp -rp ...mythtv/mythtv/bindings/python/tvmaze/ .

(substitute ... with the location you downloaded mythtv into)

install the following python modules if not jet there:

       https://pypi.org/project/requests/
       https://pypi.org/project/requests-cache/
       https://pypi.org/project/python-dateutil/
       https://pypi.org/project/future

by either downloading the sourcefiles from above links, unpacking them and from the main directory within the unpacked files run:

       sudo python2 ./setup.py install

or by finding the appropriate modules for your distribution.

Go to the location of the graberfiles in:

   /usr/share/mythtv/metadata/Television/
       sudo cp -p ...mythtv/mythtv/programs/scripts/metadata/Television/tvmaze.py .
       sudo cp -p ...mythtv/mythtv/programs/scripts/metadata/Television/tmdb3tv.py .

(substitute ... with the location you downloaded mythtv into)

if you installed the python3 bindings, ensure the first line of both files points to python3:

       #!/usr/bin/env python3
       

if you updated the python2 bindings,ensure the first line of both files points to python2:

       #!/usr/bin/env python2
       

if you updated the python2 bindings, you also have to update tmdb3.py in

   /usr/share/mythtv/metadata/Movie/

go there and run:

       sudo cp -p ...mythtv/mythtv/programs/scripts/metadata/Movie/tmdb3.py .

(substitute ... with the location you downloaded mythtv into)

I have not tested this tmdb3.py version with python2!

Tests:

   /usr/share/mythtv/metadata/Television/tvmaze.py -t
   /usr/share/mythtv/metadata/Television/tmdb3tv.py -l en -a US -M Monk
   /usr/share/mythtv/metadata/Television/tvmaze.py -l en -a US -M Monk