﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	mlocked
13546	Hardcoded call to 'python' from mythtv-programs for lyrics	rcrdnalor	Bill Meek	"MythTV is on the way to switch to python3. But some programs
use to call 'python <script-name> <options>' for grabbing lyrics 
for the MythTV-Music plugin (note the hardcoded 'python' call).

Note: Pythons PEP 394 states that 
""The python command should always invoke Python 2"".

But python2 is not available on modern linux installations, because 
python2 is deprecated and EOF starting with January 1st, 2020.

Latest releases of various linux distributions do not install python by default,
only python3 (like Ubuntu 19.10).

Use the following command to identify those hardcoded calls to python:
{{{
$ grep -nHIrF --include=*.cpp -- QString\(\""python
mythtv/programs/mythutil/musicmetautils.cpp:494:        p.start(QString(""python %1 -v"").arg(scripts.at(x)));
mythtv/programs/mythutil/musicmetautils.cpp:538:        p.start(QString(""python %1 --artist=\""%2\"" --album=\""%3\"" --title=\""%4\"" --filename=\""%5\"""")
mythtv/programs/mythbackend/mainserver.cpp:6951:        p.start(QString(""python %1 -v"").arg(scripts.at(x)));
}}}

Once these lyric scripts are able to speak python3 as well (see #13545), 
we can use the configured python version (i.e.: either python2 or python3).

The attached patch uses the configured python version to call
these lyric grabber scripts.

Note: This patch is compile time tested only.
"	Patch - Bug Fix	closed	minor	31.0	Plugin - MythMusic	Master Head	medium	fixed	python3		0
