<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<br>
<br>
<div class="moz-cite-prefix">On 2/25/21 1:36 PM, Roland Ernst wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAO+qqbOVTYYvzF-LKzJ=6oih-pUVpsOZODcwuzZ1-weo-Oo1jQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div dir="ltr"><br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, Feb 25, 2021 at 9:36
PM John Finlay via mythtv-users <<a
href="mailto:mythtv-users@mythtv.org"
moz-do-not-send="true">mythtv-users@mythtv.org</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">On 2/25/2021 10:45 AM,
Hika van den Hoven wrote:<br>
> Hoi Peter,<br>
><br>
> Thursday, February 25, 2021, 6:19:52 PM, you wrote:<br>
><br>
>> Hi Hika<br>
>> On 2/25/21 11:19 AM, Hika van den Hoven wrote:<br>
>>> It was an ambiguous error. The python2 mysql
module 'mysql-python' was<br>
>>> forked and renamed to 'mysqlclient'. So I had
no mysql module under<br>
>>> python3. Took some fiddling under gentoo to
keep the old one for<br>
>>> python 2.7 and the new one for python3 as they
excluded each other.<br>
>>><br>
>>> But now both tvmaze.py and tmdb3tv.py work
under both python2 with<br>
>>> partial adapted 0.27 bindings and under python3
with the current<br>
>>> bindings.<br>
>>><br>
>>> Next step is integration in older mythtv
versions that have no<br>
>>> knowledge of those two new metadata grabbers
and there I am a bit out<br>
>>> of my depth.<br>
>>> I can only think of renaming either one of the
two to ttvdb.py and<br>
>>> update the inetrefs. But that requires their
in- and output behaviour<br>
>>> to be exactly the same! And my first tests seem
to indicate that is<br>
>>> not the case:-(<br>
>>><br>
>>><br>
>>> Tot mails,<br>
>>> <a
href="mailto:Hikamailto%3Ahikavdh@gmail.com"
target="_blank" moz-do-not-send="true">Hikamailto:hikavdh@gmail.com</a><br>
>> Do you have a list of steps needed to get it to
work with version 0.27,<br>
>> for other people that are on older version of
MythTV?<br>
>> Peter<br>
> Get the latest version of mythtv from github:<br>
> Make directory where to place it and go there<br>
> run:<br>
> git clone <a
href="https://github.com/MythTV/mythtv.git"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://github.com/MythTV/mythtv.git</a>
mythtv<br>
> <br>
> If that does not work, first install git!<br>
> <br>
> Next either install the pythonbindings from there into
python3:<br>
> go inside the downloaded data to:<br>
> ...mythtv/mythtv/bindings/python<br>
> (substitute ... with the location you
downloaded it to)<br>
> run:<br>
> sudo python3 ./setup.py install<br>
> install the following python modules if not jet
there:<br>
> <a
href="https://pypi.org/project/mysqlclient/"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://pypi.org/project/mysqlclient/</a><br>
> <a href="https://pypi.org/project/requests/"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://pypi.org/project/requests/</a><br>
> <a
href="https://pypi.org/project/requests-cache/"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://pypi.org/project/requests-cache/</a><br>
> <a
href="https://pypi.org/project/python-dateutil/"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://pypi.org/project/python-dateutil/</a><br>
> <a href="https://pypi.org/project/future"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://pypi.org/project/future</a><br>
> by either<br>
> downloading the sourcefiles from above links,<br>
> unpacking them<br>
> and from the main directory within the
unpacked files run:<br>
> sudo python3 ./setup.py install<br>
> or by finding the appropriate modules for your
distribution.<br>
><br>
> or update the apropriate bindingfiles in your python2.7
binding directory<br>
> on my system:<br>
> /usr/lib64/python2.7/site-packages/MythTV<br>
> on others possibly:<br>
> /usr/local/lib/python2.7/dist-packages/MythTV<br>
> or a variation of the above.<br>
> <br>
> Go to that directory<br>
> first backup the tmdb3 directory in there by
renaming it to tmdb3.bak:<br>
> mv tmdb3 tmdb3.bak<br>
> copy from the above downloaded git files the tmdb3
and tvmaze directory into this MythTV directory:<br>
> sudo cp -rp
...mythtv/mythtv/bindings/python/tmdb3/tmdb3/ .<br>
> sudo cp -rp
...mythtv/mythtv/bindings/python/tvmaze/ .<br>
> (substitute ... with the location you
downloaded mythtv into)<br>
> install the following python modules if not jet
there:<br>
> <a href="https://pypi.org/project/requests/"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://pypi.org/project/requests/</a><br>
> <a
href="https://pypi.org/project/requests-cache/"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://pypi.org/project/requests-cache/</a><br>
> <a
href="https://pypi.org/project/python-dateutil/"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://pypi.org/project/python-dateutil/</a><br>
> <a href="https://pypi.org/project/future"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://pypi.org/project/future</a><br>
> by either<br>
> downloading the sourcefiles from above links,<br>
> unpacking them<br>
> and from the main directory within the
unpacked files run:<br>
> sudo python2 ./setup.py install<br>
> or by finding the appropriate modules for your
distribution.<br>
> <br>
> Go to the location of the graberfiles in:<br>
> /usr/share/mythtv/metadata/Television/<br>
> sudo cp -p
...mythtv/mythtv/programs/scripts/metadata/Television/tvmaze.py
.<br>
> sudo cp -p
...mythtv/mythtv/programs/scripts/metadata/Television/tmdb3tv.py
.<br>
> (substitute ... with the location you
downloaded mythtv into)<br>
> fix the bug at line 504 in tvmaze.py<br>
> <br>
> if not os.path.exists(cachedir):<br>
> - os.makedirs(cachepath)<br>
> + os.makedirs(cachedir)<br>
> if sys.version_info[0] == 2:<br>
> <br>
> if you installed the python3 bindings, ensure the
first line of both files points to python3:<br>
> #!/usr/bin/env python3<br>
> <br>
> if you updated the python2 bindings,ensure the
first line of both files points to python2:<br>
> #!/usr/bin/env python2<br>
> <br>
> if you updated the python2 bindings, you also have to
update tmdb3.py in<br>
> /usr/share/mythtv/metadata/Movie/<br>
> go there and run:<br>
> sudo cp -p
...mythtv/mythtv/programs/scripts/metadata/Movie/tmdb3.py .<br>
> (substitute ... with the location you
downloaded mythtv into)<br>
> I have not tested this tmdb3.py version with
python2!<br>
> <br>
> Tests:<br>
> /usr/share/mythtv/metadata/Television/tvmaze.py -t<br>
> /usr/share/mythtv/metadata/Television/tmdb3tv.py -l en
-a US -M Monk<br>
> /usr/share/mythtv/metadata/Television/tvmaze.py -l en
-a US -M Monk<br>
> <br>
><br>
><br>
<br>
<br>
On my system with python2.7 I had to hack the lookup.py file
line 300 from:<br>
<br>
if query.isnumeric():<br>
<br>
to:<br>
<br>
if unicode(query).isnumeric():<br>
<br>
because the string in query is not unicode.<br>
<br>
John<br>
<br>
</blockquote>
<div><br>
</div>
<div>I have a fixes/29 system running and can look into this
over the weekend.</div>
<div><br>
</div>
<div>Roland<br>
</div>
</div>
</div>
<br>
</blockquote>
<br>
One final note: in order to get mythtv to use tmdb3tv.py I had to
restart the backend after changing the Artwork and Data Sources
setting.<br>
<br>
Seems to be working as expected now after testing with a recording
and a videos TV program.<br>
<br>
John<br>
</body>
</html>