Advertisement
Barry_IA

MythTV - attempts #3 and 4

Feb 27th, 2021
374
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.20 KB | None | 0 0
  1.  
  2. 3 -Metadata Lookup Changes March 2021 – Wiki page
  3.  
  4. (There is no ‘2’ – keeping numbers to match NZXT notes)
  5.  
  6. Thumbdrive notes
  7.  
  8. This is a new set of notes: Wiki copied in fresh. Extra line
  9. spaces to semi-match the NZXT notes.
  10.  
  11. https://www.mythtv.org/wiki/Metadata_Lookup_Changes_March_2021
  12.  
  13. Metadata Lookup Changes March 2021
  14.  
  15. <snip>
  16.  
  17. Manual Installation for older versions
  18.  
  19. The source code has only been updated for fixes/31 and master.
  20. If you are running version 30 or earlier, you can do a manual
  21. install. Thanks to Hika van den Hoven for these instructions.
  22. Note that this is not officially supported. Be prepared to back
  23. it out if necessary.
  24.  
  25. Get the latest version of mythtv from github:
  26.  
  27. Make directory where to place it and go there BJM: mkdir git
  28. cd git
  29.  
  30. run:
  31.  
  32. sudo git clone https://github.com/MythTV/mythtv.git mythtv
  33.  
  34. If that does not work, first install git!
  35.  
  36. Next either install the pythonbindings from there into python3:
  37. BJM: python3 –version ==> 3.6.9
  38.  
  39. go inside the downloaded data to:
  40.  
  41. ...mythtv/mythtv/bindings/python BJM: barry@M58:~$ pip
  42. install python-dateutil
  43.  
  44. Defaulting to user installation because normal site-packages is
  45. not writeable
  46.  
  47. Requirement already satisfied: python-dateutil in
  48. /usr/lib/python3/dist-packages (2.6.1)
  49.  
  50. (substitute ... with the location you downloaded it to)
  51.  
  52. run:
  53.  
  54. sudo python3 ./setup.py install
  55.  
  56. BJM: Install seemed to complete OK so skip
  57.  
  58. to next section (jump to next yellow highlight)
  59.  
  60. install the following python modules if not yet there:
  61.  
  62. https://pypi.org/project/mysqlclient/
  63.  
  64. https://pypi.org/project/requests/
  65.  
  66. https://pypi.org/project/requests-cache/
  67.  
  68. https://pypi.org/project/python-dateutil/
  69.  
  70. https://pypi.org/project/future
  71.  
  72. by either downloading the sourcefiles from above links,
  73. unpacking them and from the main directory within the unpacked
  74. files run:
  75.  
  76. sudo python3 ./setup.py install
  77.  
  78. or by finding the appropriate modules for your distribution.
  79.  
  80. or update the apropriate bindingfiles in your python2.7 binding
  81. directory
  82.  
  83. on my system:
  84.  
  85. /usr/lib64/python2.7/site-packages/MythTV
  86.  
  87. on others possibly:
  88.  
  89. /usr/local/lib/python2.7/dist-packages/MythTV
  90.  
  91. or a variation of the above.
  92.  
  93. BJM: jumped to here
  94.  
  95. Go to that directory BJM: assuming
  96. $HOME/git/mythtv/mythtv/bindings/python
  97.  
  98. first backup the tmdb3 directory in there by renaming it to
  99. tmdb3.bak: BJM cp instead?? Previous trials
  100. whining of dire tmdb3 not present.
  101.  
  102. mv tmdb3 tmdb3.bak ==> sudo cp -r tmdb3 tmdb3.bak (needs -r)
  103.  
  104. copy from the above downloaded git files the tmdb3 and tvmaze
  105. directory into this MythTV directory:
  106.  
  107. sudo cp -rp ...mythtv/mythtv/bindings/python/tmdb3/tmdb3/ .
  108.  
  109. sudo cp -rp ...mythtv/mythtv/bindings/python/tvmaze/ .
  110.  
  111. (substitute ... with the location you downloaded mythtv into)
  112.  
  113. BJM: sudo cp -rp
  114. $HOME/git/mythtv/mythtv/bindings/python/tmdb3/tmdb3/ .
  115.  
  116. sudo cp -rp $HOME/git/mythtv/mythtv/bindings/python/tvmaze/ .
  117.  
  118. I’m at (dir level):
  119. barry@M58:~/git/mythtv/mythtv/bindings/python
  120.  
  121. BJM: Unclear on the source for “copy from the above downloaded
  122. git files”
  123.  
  124. barry@M58:~$ find / -type d -iname tvmaze 2>/dev/null
  125.  
  126. /usr/local/lib/python3.6/dist-packages/MythTV/tvmaze
  127.  
  128. /usr/local/lib/python3.6/dist-packages/MythTV/tvmaze/tvmaze
  129.  
  130. /home/barry/git/mythtv/mythtv/bindings/python/build/lib/MythTV/tvmaze
  131.  
  132. /home/barry/git/mythtv/mythtv/bindings/python/tvmaze <== this is
  133. the ‘copy to’
  134.  
  135. barry@M58:~$ find / -type d -iname tmdb3 2>/dev/null
  136.  
  137. /usr/local/lib/python3.6/dist-packages/MythTV/tmdb3
  138.  
  139. /usr/local/lib/python3.6/dist-packages/MythTV/tmdb3/tmdb3
  140.  
  141. /usr/lib/python2.7/dist-packages/MythTV/tmdb3
  142.  
  143. /home/barry/git/mythtv/mythtv/bindings/python/tmdb3.bak/tmdb3
  144. <== this is the backup
  145.  
  146. /home/barry/git/mythtv/mythtv/bindings/python/tmdb3
  147.  
  148. /home/barry/git/mythtv/mythtv/bindings/python/tmdb3/tmdb3 <==
  149. this is the ‘copy to’
  150.  
  151. /home/barry/git/mythtv/mythtv/bindings/python/build/lib/MythTV/tmdb3
  152.  
  153. BJM: Guess at the ~/git/mythtv/mythtv/bindings/python dir level
  154.  
  155. sudo cp -rp $HOME/git/mythtv/mythtv/bindings/python/tmdb3/tmdb3/
  156. .
  157.  
  158. sudo cp -rp $HOME/git/mythtv/mythtv/bindings/python/tvmaze/ .
  159.  
  160. First cmd: no complaints
  161.  
  162. Second cmd: “ sudo cp -rp
  163. $HOME/git/mythtv/mythtv/bindings/python/tvmaze/ .
  164.  
  165. cp: '/home/barry/git/mythtv/mythtv/bindings/python/tvmaze/' and
  166. './tvmaze' are the same file”
  167.  
  168. Skip this section:
  169.  
  170. install the following python modules if not yet there:
  171.  
  172. https://pypi.org/project/requests/
  173.  
  174. https://pypi.org/project/requests-cache/
  175.  
  176. https://pypi.org/project/python-dateutil/
  177.  
  178. https://pypi.org/project/future
  179.  
  180. by either downloading the sourcefiles from above links,
  181. unpacking them and from the main directory within the unpacked
  182. files run:
  183.  
  184. sudo python2 ./setup.py install
  185.  
  186. or by finding the appropriate modules for your distribution.
  187.  
  188. Restart here:
  189.  
  190. Go to the location of the graberfiles in:
  191.  
  192. /usr/share/mythtv/metadata/Television/
  193.  
  194. sudo cp -p
  195. ...mythtv/mythtv/programs/scripts/metadata/Television/tvmaze.py
  196. .
  197.  
  198. sudo cp -p
  199. ...mythtv/mythtv/programs/scripts/metadata/Television/tmdb3tv.py
  200. .
  201.  
  202. (substitute ... with the location you downloaded mythtv into)
  203.  
  204. so:
  205.  
  206. cd /usr/share/mythtv/metadata/Television/
  207.  
  208. sudo cp -p
  209. $HOME/git/mythtv/mythtv/programs/scripts/metadata/Television/tvmaze.py
  210. .
  211.  
  212. sudo cp -p
  213. $HOME/git/mythtv/mythtv/programs/scripts/metadata/Television/tmdb3tv.py
  214. .
  215.  
  216. (No whinings.)
  217.  
  218. if you installed the python3 bindings, ensure the first line of
  219. both files points to python3:
  220.  
  221. #!/usr/bin/env python3
  222.  
  223. BJM: So check what-where??
  224.  
  225. FIND ==> tvmaze.py
  226.  
  227. /usr/share/mythtv/metadata/Television/tvmaze.py
  228.  
  229. /home/barry/git/mythtv/mythtv/programs/scripts/metadata/Television/tvmaze.py
  230. <== cp cmd
  231.  
  232. FIND ==> tmdb3tv.py
  233.  
  234. /usr/share/mythtv/metadata/Television/tmdb3tv.py
  235.  
  236. /home/barry/git/mythtv/mythtv/programs/scripts/metadata/Television/tmdb3tv.py
  237. <== cp cmd
  238.  
  239. So head /home/barry…. tvmaze.py has python3
  240.  
  241. tmdb3tv.py has only ‘python’ so edited to python3.
  242.  
  243. Skip this section as using python3
  244.  
  245. if you updated the python2 bindings,ensure the first line of
  246. both files points to python2:
  247.  
  248. #!/usr/bin/env python2
  249.  
  250. if you updated the python2 bindings, you also have to update
  251. tmdb3.py in
  252.  
  253. /usr/share/mythtv/metadata/Movie/ BJM: only ‘python’
  254.  
  255. go there and run:
  256.  
  257. sudo cp -p
  258. ...mythtv/mythtv/programs/scripts/metadata/Movie/tmdb3.py .
  259.  
  260. (substitute ... with the location you downloaded mythtv into)
  261.  
  262. BJM:
  263. $HOME/git/mythtv/mythtv/programs/scripts/metadata/Movie/tmdb3.py
  264.  
  265. ls ==>File does exist
  266.  
  267. Only ‘python’ – changed to ‘python3’
  268.  
  269. I have not tested this tmdb3.py version with python2!
  270.  
  271. Tests:
  272.  
  273. /usr/share/mythtv/metadata/Television/tvmaze.py -t
  274.  
  275. /usr/share/mythtv/metadata/Television/tmdb3tv.py -l en -a US -M
  276. Monk
  277.  
  278. /usr/share/mythtv/metadata/Television/tvmaze.py -l en -a US -M
  279. Monk
  280.  
  281. barry@M58:~$ /usr/share/mythtv/metadata/Television/tvmaze.py -t
  282.  
  283. Failed to import python lxml library.
  284.  
  285. Failed to import python-requests or python-request-cache
  286. library.
  287.  
  288. Failed to import MythTV bindings. Check your `configure` output
  289. to make sure installation was not disabled due to external
  290. dependencies
  291.  
  292. Failed to import PyTVmaze library. This should have been
  293. included with the python MythTV bindings.
  294.  
  295. barry@M58:~$ /usr/share/mythtv/metadata/Television/tmdb3tv.py -l
  296. en -a US -M Monk
  297.  
  298. Traceback (most recent call last):
  299.  
  300. File "/usr/share/mythtv/metadata/Television/tmdb3tv.py", line
  301. 159, in <module>
  302.  
  303. sys.exit(main("television",'tmdb3tv.py'))
  304.  
  305. File "/usr/share/mythtv/metadata/Television/tmdb3tv.py", line
  306. 79, in main
  307.  
  308. from MythTV.tmdb3.lookup import timeouthandler
  309.  
  310. File
  311. "/usr/local/lib/python3.6/dist-packages/MythTV/__init__.py",
  312. line 36, in <module>
  313.  
  314. from .utility import *
  315.  
  316. File
  317. "/usr/local/lib/python3.6/dist-packages/MythTV/utility/__init__.py",
  318. line 1, in <module>
  319.  
  320. from .dt import datetime
  321.  
  322. File
  323. "/usr/local/lib/python3.6/dist-packages/MythTV/utility/dt.py",
  324. line 14, in <module>
  325.  
  326. from future.utils import with_metaclass
  327.  
  328. ModuleNotFoundError: No module named 'future'
  329.  
  330. barry@M58:~$ /usr/share/mythtv/metadata/Television/tvmaze.py -l
  331. en -a US -M Monk
  332.  
  333. Traceback (most recent call last):
  334.  
  335. File "/usr/share/mythtv/metadata/Television/tvmaze.py", line
  336. 553, in <module>
  337.  
  338. main()
  339.  
  340. File "/usr/share/mythtv/metadata/Television/tvmaze.py", line
  341. 510, in main
  342.  
  343. import requests_cache
  344.  
  345. ModuleNotFoundError: No module named 'requests_cache'
  346.  
  347. ‘future’ and ‘requests_cache’ recognized from early skipped
  348. section:
  349.  
  350. install the following python modules if not yet there:
  351.  
  352. https://pypi.org/project/mysqlclient/
  353.  
  354. https://pypi.org/project/requests/
  355.  
  356. https://pypi.org/project/requests-cache/
  357.  
  358. https://pypi.org/project/python-dateutil/
  359.  
  360. https://pypi.org/project/future
  361.  
  362. by either downloading the sourcefiles from above links,
  363. unpacking them and from the main directory within the unpacked
  364. files run:
  365.  
  366. sudo python3 ./setup.py install
  367.  
  368. https://pypi.org/project/mysqlclient/
  369.  
  370. You may need to install the Python 3 and MySQL development
  371. headers and libraries like so:
  372.  
  373. $ sudo apt-get install python3-dev default-libmysqlclient-dev
  374. build-essential # Debian / Ubuntu
  375.  
  376. Then you can install mysqlclient via pip now:
  377.  
  378. $ pip install mysqlclient
  379.  
  380. https://pypi.org/project/requests/
  381.  
  382. $ python -m pip install requests
  383.  
  384. barry@M58:~$ python -m pip install requests
  385.  
  386. Defaulting to user installation because normal site-packages is
  387. not writeable
  388.  
  389. Requirement already satisfied: requests in
  390. /usr/lib/python3/dist-packages (2.18.4)
  391.  
  392. https://pypi.org/project/requests-cache/
  393.  
  394. pip install requests-cache
  395.  
  396. barry@M58:~$ pip install requests-cache
  397.  
  398. Defaulting to user installation because normal site-packages is
  399. not writeable
  400.  
  401. Collecting requests-cache
  402.  
  403. Downloading requests_cache-0.5.2-py2.py3-none-any.whl (22 kB)
  404.  
  405. Requirement already satisfied: requests>=1.1.0 in
  406. /usr/lib/python3/dist-packages (from requests-cache) (2.18.4)
  407.  
  408. Installing collected packages: requests-cache
  409.  
  410. Successfully installed requests-cache-0.5.2
  411.  
  412. https://pypi.org/project/python-dateutil/
  413.  
  414. pip install python-dateutil
  415.  
  416. barry@M58:~$ pip install python-dateutil
  417.  
  418. Defaulting to user installation because normal site-packages is
  419. not writeable
  420.  
  421. Requirement already satisfied: python-dateutil in
  422. /usr/lib/python3/dist-packages (2.6.1)
  423.  
  424. https://pypi.org/project/future
  425.  
  426. pip install future
  427.  
  428. So now cd to $HOME/git/mythtv/mythtv/bindings/python
  429.  
  430. then sudo python3 ./setup.py install
  431.  
  432. Tests:
  433.  
  434. /usr/share/mythtv/metadata/Television/tvmaze.py -t
  435.  
  436. /usr/share/mythtv/metadata/Television/tmdb3tv.py -l en -a US -M
  437. Monk
  438.  
  439. /usr/share/mythtv/metadata/Television/tvmaze.py -l en -a US -M
  440. Monk
  441.  
  442. /usr/share/mythtv/metadata/Television/tvmaze.py -t still failed
  443. :(
  444.  
  445. - - - - (Hoping it would work and not go through everything
  446. again) - - - -
  447.  
  448. Copy in the above Wiki to reinstall and retry
  449.  
  450. Manual Installation for older versions
  451.  
  452. <skip to after installation of missing python modules>
  453.  
  454. < At directory barry@M58:~/git/mythtv/mythtv/bindings/python$ >
  455.  
  456. Go to that directory BJM: assuming
  457. $HOME/git/mythtv/mythtv/bindings/python
  458.  
  459. first backup the tmdb3 directory in there by renaming it to
  460. tmdb3.bak: BJM cp instead?? Previous trials
  461. whining of dire tmdb3 not present.
  462.  
  463. mv tmdb3 tmdb3.bak ==> sudo cp -r tmdb3 tmdb3.bak (needs -r)
  464.  
  465. BJM: not doing the backup as would copy potential errors
  466.  
  467. copy from the above downloaded git files the tmdb3 and tvmaze
  468. directory into this MythTV directory:
  469.  
  470. sudo cp -rp ...mythtv/mythtv/bindings/python/tmdb3/tmdb3/ .
  471.  
  472. sudo cp -rp ...mythtv/mythtv/bindings/python/tvmaze/ .
  473.  
  474. (substitute ... with the location you downloaded mythtv into)
  475.  
  476. BJM: sudo cp -rp
  477. $HOME/git/mythtv/mythtv/bindings/python/tmdb3/tmdb3/ .
  478.  
  479. sudo cp -rp $HOME/git/mythtv/mythtv/bindings/python/tvmaze/ .
  480.  
  481. I’m at (dir level):
  482. barry@M58:~/git/mythtv/mythtv/bindings/python
  483.  
  484. BJM: same error as before:
  485.  
  486. barry@M58:~/git/mythtv/mythtv/bindings/python$ sudo cp -rp
  487. $HOME/git/mythtv/mythtv/bindings/python/tvmaze/ .
  488.  
  489. cp: '/home/barry/git/mythtv/mythtv/bindings/python/tvmaze/' and
  490. './tvmaze' are the same file
  491.  
  492. Skip this section:
  493.  
  494. install the following python modules if not yet there:
  495.  
  496. https://pypi.org/project/requests/
  497.  
  498. https://pypi.org/project/requests-cache/
  499.  
  500. https://pypi.org/project/python-dateutil/
  501.  
  502. https://pypi.org/project/future
  503.  
  504. by either downloading the sourcefiles from above links,
  505. unpacking them and from the main directory within the unpacked
  506. files run:
  507.  
  508. sudo python2 ./setup.py install
  509.  
  510. or by finding the appropriate modules for your distribution.
  511.  
  512. Restart here:
  513.  
  514. Go to the location of the graberfiles in:
  515.  
  516. /usr/share/mythtv/metadata/Television/
  517.  
  518. sudo cp -p
  519. ...mythtv/mythtv/programs/scripts/metadata/Television/tvmaze.py
  520. .
  521.  
  522. sudo cp -p
  523. ...mythtv/mythtv/programs/scripts/metadata/Television/tmdb3tv.py
  524. .
  525.  
  526. (substitute ... with the location you downloaded mythtv into)
  527.  
  528. so:
  529.  
  530. cd /usr/share/mythtv/metadata/Television/
  531.  
  532. sudo cp -p
  533. $HOME/git/mythtv/mythtv/programs/scripts/metadata/Television/tvmaze.py
  534. .
  535.  
  536. sudo cp -p
  537. $HOME/git/mythtv/mythtv/programs/scripts/metadata/Television/tmdb3tv.py
  538. .
  539.  
  540. (No whinings.)
  541.  
  542. if you installed the python3 bindings, ensure the first line of
  543. both files points to python3:
  544.  
  545. #!/usr/bin/env python3
  546.  
  547. BJM: So check what-where??
  548.  
  549. FIND ==> tvmaze.py
  550.  
  551. /usr/share/mythtv/metadata/Television/tvmaze.py ==>python3
  552.  
  553. /home/barry/git/mythtv/mythtv/programs/scripts/metadata/Television/tvmaze.py
  554. <== cp cmd
  555.  
  556. ==> python3 (just checking!)
  557.  
  558. FIND ==> tmdb3tv.py
  559.  
  560. /usr/share/mythtv/metadata/Television/tmdb3tv.py ==>python3
  561.  
  562. /home/barry/git/mythtv/mythtv/programs/scripts/metadata/Television/tmdb3tv.py
  563. <== cp cmd
  564.  
  565. ==> python3
  566.  
  567. So head /home/barry…. tvmaze.py has python3
  568.  
  569. tmdb3tv.py has only ‘python’ so edited to python3.
  570.  
  571. Skip this section as using python3
  572.  
  573. Now checking again
  574.  
  575. if you updated the python2 bindings,ensure the first line of
  576. both files points to python2:
  577.  
  578. #!/usr/bin/env python2
  579.  
  580. if you updated the python2 bindings, you also have to update
  581. tmdb3.py in
  582.  
  583. /usr/share/mythtv/metadata/Movie/ BJM: only ‘python’
  584.  
  585. go there and run:
  586.  
  587. sudo cp -p
  588. ...mythtv/mythtv/programs/scripts/metadata/Movie/tmdb3.py .
  589.  
  590. (substitute ... with the location you downloaded mythtv into)
  591.  
  592. BJM:
  593. $HOME/git/mythtv/mythtv/programs/scripts/metadata/Movie/tmdb3.py
  594. .
  595.  
  596. ls ==>File does exist
  597.  
  598. Only ‘python’ – changed to ‘python3’
  599.  
  600. BJM: has ‘python3’
  601.  
  602. I have not tested this tmdb3.py version with python2!
  603.  
  604. Tests:
  605.  
  606. /usr/share/mythtv/metadata/Television/tvmaze.py -t
  607.  
  608. /usr/share/mythtv/metadata/Television/tmdb3tv.py -l en -a US -M
  609. Monk
  610.  
  611. /usr/share/mythtv/metadata/Television/tvmaze.py -l en -a US -M
  612. Monk
  613.  
  614. barry@M58:/usr/share/mythtv/metadata/Movie$
  615. /usr/share/mythtv/metadata/Television/tvmaze.py -t
  616.  
  617. Failed to import python lxml library.
  618.  
  619. Failed to import MythTV bindings. Check your `configure` output
  620. to make sure installation was not disabled due to external
  621. dependencies
  622.  
  623. Failed to import PyTVmaze library. This should have been
  624. included with the python MythTV bindings.
  625.  
  626. sudo shutdown -r now ==> reload stuff?? Nope. :(
  627.  
  628. <later> trying this test:
  629.  
  630. barry@M58:~$ /usr/share/mythtv/metadata/Television/tmdb3tv.py -l
  631. en -a US -M Monk
  632.  
  633. Traceback (most recent call last):
  634.  
  635. File "/usr/share/mythtv/metadata/Television/tmdb3tv.py", line
  636. 159, in <module>
  637.  
  638. sys.exit(main("television",'tmdb3tv.py'))
  639.  
  640. File "/usr/share/mythtv/metadata/Television/tmdb3tv.py", line
  641. 79, in main
  642.  
  643. from MythTV.tmdb3.lookup import timeouthandler
  644.  
  645. File
  646. "/usr/local/lib/python3.6/dist-packages/MythTV/__init__.py",
  647. line 37, in <module>
  648.  
  649. from .connections import dbmodule
  650.  
  651. File
  652. "/usr/local/lib/python3.6/dist-packages/MythTV/connections.py",
  653. line 17, in <module>
  654.  
  655. import lxml.etree as etree
  656.  
  657. ModuleNotFoundError: No module named 'lxml'
  658.  
  659. Well, guess a little better as not whining about missing python
  660. stuff.
  661.  
  662.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement