Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 3 -Metadata Lookup Changes March 2021 – Wiki page
- (There is no ‘2’ – keeping numbers to match NZXT notes)
- Thumbdrive notes
- This is a new set of notes: Wiki copied in fresh. Extra line
- spaces to semi-match the NZXT notes.
- https://www.mythtv.org/wiki/Metadata_Lookup_Changes_March_2021
- Metadata Lookup Changes March 2021
- <snip>
- 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 BJM: mkdir git
- cd git
- run:
- sudo 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:
- BJM: python3 –version ==> 3.6.9
- go inside the downloaded data to:
- ...mythtv/mythtv/bindings/python BJM: barry@M58:~$ pip
- install python-dateutil
- Defaulting to user installation because normal site-packages is
- not writeable
- Requirement already satisfied: python-dateutil in
- /usr/lib/python3/dist-packages (2.6.1)
- (substitute ... with the location you downloaded it to)
- run:
- sudo python3 ./setup.py install
- BJM: Install seemed to complete OK so skip
- to next section (jump to next yellow highlight)
- install the following python modules if not yet 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.
- BJM: jumped to here
- Go to that directory BJM: assuming
- $HOME/git/mythtv/mythtv/bindings/python
- first backup the tmdb3 directory in there by renaming it to
- tmdb3.bak: BJM cp instead?? Previous trials
- whining of dire tmdb3 not present.
- mv tmdb3 tmdb3.bak ==> sudo cp -r tmdb3 tmdb3.bak (needs -r)
- 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)
- BJM: sudo cp -rp
- $HOME/git/mythtv/mythtv/bindings/python/tmdb3/tmdb3/ .
- sudo cp -rp $HOME/git/mythtv/mythtv/bindings/python/tvmaze/ .
- I’m at (dir level):
- barry@M58:~/git/mythtv/mythtv/bindings/python
- BJM: Unclear on the source for “copy from the above downloaded
- git files”
- barry@M58:~$ find / -type d -iname tvmaze 2>/dev/null
- /usr/local/lib/python3.6/dist-packages/MythTV/tvmaze
- /usr/local/lib/python3.6/dist-packages/MythTV/tvmaze/tvmaze
- /home/barry/git/mythtv/mythtv/bindings/python/build/lib/MythTV/tvmaze
- /home/barry/git/mythtv/mythtv/bindings/python/tvmaze <== this is
- the ‘copy to’
- barry@M58:~$ find / -type d -iname tmdb3 2>/dev/null
- /usr/local/lib/python3.6/dist-packages/MythTV/tmdb3
- /usr/local/lib/python3.6/dist-packages/MythTV/tmdb3/tmdb3
- /usr/lib/python2.7/dist-packages/MythTV/tmdb3
- /home/barry/git/mythtv/mythtv/bindings/python/tmdb3.bak/tmdb3
- <== this is the backup
- /home/barry/git/mythtv/mythtv/bindings/python/tmdb3
- /home/barry/git/mythtv/mythtv/bindings/python/tmdb3/tmdb3 <==
- this is the ‘copy to’
- /home/barry/git/mythtv/mythtv/bindings/python/build/lib/MythTV/tmdb3
- BJM: Guess at the ~/git/mythtv/mythtv/bindings/python dir level
- sudo cp -rp $HOME/git/mythtv/mythtv/bindings/python/tmdb3/tmdb3/
- .
- sudo cp -rp $HOME/git/mythtv/mythtv/bindings/python/tvmaze/ .
- First cmd: no complaints
- Second cmd: “ sudo cp -rp
- $HOME/git/mythtv/mythtv/bindings/python/tvmaze/ .
- cp: '/home/barry/git/mythtv/mythtv/bindings/python/tvmaze/' and
- './tvmaze' are the same file”
- Skip this section:
- install the following python modules if not yet 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.
- Restart here:
- 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)
- so:
- cd /usr/share/mythtv/metadata/Television/
- sudo cp -p
- $HOME/git/mythtv/mythtv/programs/scripts/metadata/Television/tvmaze.py
- .
- sudo cp -p
- $HOME/git/mythtv/mythtv/programs/scripts/metadata/Television/tmdb3tv.py
- .
- (No whinings.)
- if you installed the python3 bindings, ensure the first line of
- both files points to python3:
- #!/usr/bin/env python3
- BJM: So check what-where??
- FIND ==> tvmaze.py
- /usr/share/mythtv/metadata/Television/tvmaze.py
- /home/barry/git/mythtv/mythtv/programs/scripts/metadata/Television/tvmaze.py
- <== cp cmd
- FIND ==> tmdb3tv.py
- /usr/share/mythtv/metadata/Television/tmdb3tv.py
- /home/barry/git/mythtv/mythtv/programs/scripts/metadata/Television/tmdb3tv.py
- <== cp cmd
- So head /home/barry…. tvmaze.py has python3
- tmdb3tv.py has only ‘python’ so edited to python3.
- Skip this section as using 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/ BJM: only ‘python’
- go there and run:
- sudo cp -p
- ...mythtv/mythtv/programs/scripts/metadata/Movie/tmdb3.py .
- (substitute ... with the location you downloaded mythtv into)
- BJM:
- $HOME/git/mythtv/mythtv/programs/scripts/metadata/Movie/tmdb3.py
- ls ==>File does exist
- Only ‘python’ – changed to ‘python3’
- 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
- barry@M58:~$ /usr/share/mythtv/metadata/Television/tvmaze.py -t
- Failed to import python lxml library.
- Failed to import python-requests or python-request-cache
- library.
- Failed to import MythTV bindings. Check your `configure` output
- to make sure installation was not disabled due to external
- dependencies
- Failed to import PyTVmaze library. This should have been
- included with the python MythTV bindings.
- barry@M58:~$ /usr/share/mythtv/metadata/Television/tmdb3tv.py -l
- en -a US -M Monk
- Traceback (most recent call last):
- File "/usr/share/mythtv/metadata/Television/tmdb3tv.py", line
- 159, in <module>
- sys.exit(main("television",'tmdb3tv.py'))
- File "/usr/share/mythtv/metadata/Television/tmdb3tv.py", line
- 79, in main
- from MythTV.tmdb3.lookup import timeouthandler
- File
- "/usr/local/lib/python3.6/dist-packages/MythTV/__init__.py",
- line 36, in <module>
- from .utility import *
- File
- "/usr/local/lib/python3.6/dist-packages/MythTV/utility/__init__.py",
- line 1, in <module>
- from .dt import datetime
- File
- "/usr/local/lib/python3.6/dist-packages/MythTV/utility/dt.py",
- line 14, in <module>
- from future.utils import with_metaclass
- ModuleNotFoundError: No module named 'future'
- barry@M58:~$ /usr/share/mythtv/metadata/Television/tvmaze.py -l
- en -a US -M Monk
- Traceback (most recent call last):
- File "/usr/share/mythtv/metadata/Television/tvmaze.py", line
- 553, in <module>
- main()
- File "/usr/share/mythtv/metadata/Television/tvmaze.py", line
- 510, in main
- import requests_cache
- ModuleNotFoundError: No module named 'requests_cache'
- ‘future’ and ‘requests_cache’ recognized from early skipped
- section:
- install the following python modules if not yet 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
- https://pypi.org/project/mysqlclient/
- You may need to install the Python 3 and MySQL development
- headers and libraries like so:
- $ sudo apt-get install python3-dev default-libmysqlclient-dev
- build-essential # Debian / Ubuntu
- Then you can install mysqlclient via pip now:
- $ pip install mysqlclient
- https://pypi.org/project/requests/
- $ python -m pip install requests
- barry@M58:~$ python -m pip install requests
- Defaulting to user installation because normal site-packages is
- not writeable
- Requirement already satisfied: requests in
- /usr/lib/python3/dist-packages (2.18.4)
- https://pypi.org/project/requests-cache/
- pip install requests-cache
- barry@M58:~$ pip install requests-cache
- Defaulting to user installation because normal site-packages is
- not writeable
- Collecting requests-cache
- Downloading requests_cache-0.5.2-py2.py3-none-any.whl (22 kB)
- Requirement already satisfied: requests>=1.1.0 in
- /usr/lib/python3/dist-packages (from requests-cache) (2.18.4)
- Installing collected packages: requests-cache
- Successfully installed requests-cache-0.5.2
- https://pypi.org/project/python-dateutil/
- pip install python-dateutil
- barry@M58:~$ pip install python-dateutil
- Defaulting to user installation because normal site-packages is
- not writeable
- Requirement already satisfied: python-dateutil in
- /usr/lib/python3/dist-packages (2.6.1)
- https://pypi.org/project/future
- pip install future
- So now cd to $HOME/git/mythtv/mythtv/bindings/python
- then sudo python3 ./setup.py install
- 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
- /usr/share/mythtv/metadata/Television/tvmaze.py -t still failed
- :(
- - - - - (Hoping it would work and not go through everything
- again) - - - -
- Copy in the above Wiki to reinstall and retry
- Manual Installation for older versions
- <skip to after installation of missing python modules>
- < At directory barry@M58:~/git/mythtv/mythtv/bindings/python$ >
- Go to that directory BJM: assuming
- $HOME/git/mythtv/mythtv/bindings/python
- first backup the tmdb3 directory in there by renaming it to
- tmdb3.bak: BJM cp instead?? Previous trials
- whining of dire tmdb3 not present.
- mv tmdb3 tmdb3.bak ==> sudo cp -r tmdb3 tmdb3.bak (needs -r)
- BJM: not doing the backup as would copy potential errors
- 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)
- BJM: sudo cp -rp
- $HOME/git/mythtv/mythtv/bindings/python/tmdb3/tmdb3/ .
- sudo cp -rp $HOME/git/mythtv/mythtv/bindings/python/tvmaze/ .
- I’m at (dir level):
- barry@M58:~/git/mythtv/mythtv/bindings/python
- BJM: same error as before:
- barry@M58:~/git/mythtv/mythtv/bindings/python$ sudo cp -rp
- $HOME/git/mythtv/mythtv/bindings/python/tvmaze/ .
- cp: '/home/barry/git/mythtv/mythtv/bindings/python/tvmaze/' and
- './tvmaze' are the same file
- Skip this section:
- install the following python modules if not yet 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.
- Restart here:
- 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)
- so:
- cd /usr/share/mythtv/metadata/Television/
- sudo cp -p
- $HOME/git/mythtv/mythtv/programs/scripts/metadata/Television/tvmaze.py
- .
- sudo cp -p
- $HOME/git/mythtv/mythtv/programs/scripts/metadata/Television/tmdb3tv.py
- .
- (No whinings.)
- if you installed the python3 bindings, ensure the first line of
- both files points to python3:
- #!/usr/bin/env python3
- BJM: So check what-where??
- FIND ==> tvmaze.py
- /usr/share/mythtv/metadata/Television/tvmaze.py ==>python3
- /home/barry/git/mythtv/mythtv/programs/scripts/metadata/Television/tvmaze.py
- <== cp cmd
- ==> python3 (just checking!)
- FIND ==> tmdb3tv.py
- /usr/share/mythtv/metadata/Television/tmdb3tv.py ==>python3
- /home/barry/git/mythtv/mythtv/programs/scripts/metadata/Television/tmdb3tv.py
- <== cp cmd
- ==> python3
- So head /home/barry…. tvmaze.py has python3
- tmdb3tv.py has only ‘python’ so edited to python3.
- Skip this section as using python3
- Now checking again
- 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/ BJM: only ‘python’
- go there and run:
- sudo cp -p
- ...mythtv/mythtv/programs/scripts/metadata/Movie/tmdb3.py .
- (substitute ... with the location you downloaded mythtv into)
- BJM:
- $HOME/git/mythtv/mythtv/programs/scripts/metadata/Movie/tmdb3.py
- .
- ls ==>File does exist
- Only ‘python’ – changed to ‘python3’
- BJM: has ‘python3’
- 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
- barry@M58:/usr/share/mythtv/metadata/Movie$
- /usr/share/mythtv/metadata/Television/tvmaze.py -t
- Failed to import python lxml library.
- Failed to import MythTV bindings. Check your `configure` output
- to make sure installation was not disabled due to external
- dependencies
- Failed to import PyTVmaze library. This should have been
- included with the python MythTV bindings.
- sudo shutdown -r now ==> reload stuff?? Nope. :(
- <later> trying this test:
- barry@M58:~$ /usr/share/mythtv/metadata/Television/tmdb3tv.py -l
- en -a US -M Monk
- Traceback (most recent call last):
- File "/usr/share/mythtv/metadata/Television/tmdb3tv.py", line
- 159, in <module>
- sys.exit(main("television",'tmdb3tv.py'))
- File "/usr/share/mythtv/metadata/Television/tmdb3tv.py", line
- 79, in main
- from MythTV.tmdb3.lookup import timeouthandler
- File
- "/usr/local/lib/python3.6/dist-packages/MythTV/__init__.py",
- line 37, in <module>
- from .connections import dbmodule
- File
- "/usr/local/lib/python3.6/dist-packages/MythTV/connections.py",
- line 17, in <module>
- import lxml.etree as etree
- ModuleNotFoundError: No module named 'lxml'
- Well, guess a little better as not whining about missing python
- stuff.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement