Difference between revisions of "Tmdb.pl"
(→What is tmdb.pl: Add some "why" to the "What is tmdb.pl" section.) |
m (→Installing tmdb.pl: Fixed up the install script to include SUDO variable (to make it easy for users using the root account directly)) |
||
Line 23: | Line 23: | ||
= Installing tmdb.pl = | = Installing tmdb.pl = | ||
− | The MythVideo scripts are typically installed in <code>/usr/share/mythtv/mythvideo/scripts/</code> or <code>/usr/local/share/mythtv/scripts/</code>. The following code assumes they are installed in one of those two directories. If not, adjust the SCRIPTDIR as appropriate (and skip the if conditional that tries to set it automatically). To use the code below, copy/paste the following commands directly into the same terminal window you used for downloading the script, above | + | The MythVideo scripts are typically installed in <code>/usr/share/mythtv/mythvideo/scripts/</code> or <code>/usr/local/share/mythtv/scripts/</code>. The following code assumes they are installed in one of those two directories. If not, adjust the SCRIPTDIR as appropriate (and skip the if conditional that tries to set it automatically). To use the code below, copy/paste the following commands directly into the same terminal window you used for downloading the script, above. If your distribution does not use the <code>sudo</code> command to execute scripts as <code>root</code>, ensure you're using the root account (and in the directory you were in when you downloaded the script, above) and do not copy the first line ("<code>SUDO=sudo</code>"). |
<pre> | <pre> | ||
+ | SUDO=sudo && | ||
if [ -d /usr/share/mythtv/mythvideo/scripts ]; then | if [ -d /usr/share/mythtv/mythvideo/scripts ]; then | ||
SCRIPTDIR=/usr/share/mythtv/mythvideo/scripts | SCRIPTDIR=/usr/share/mythtv/mythvideo/scripts | ||
Line 32: | Line 33: | ||
else | else | ||
echo "Unable to find script directory. Please install tmdb.pl manually." | echo "Unable to find script directory. Please install tmdb.pl manually." | ||
− | fi | + | fi |
− | + | $SUDO cp -Rv tmdb/* ${SCRIPTDIR} && | |
if [ -e ${SCRIPTDIR}/tmdb.pl ]; then | if [ -e ${SCRIPTDIR}/tmdb.pl ]; then | ||
echo "Successfully installed tmdb.pl script to:" | echo "Successfully installed tmdb.pl script to:" | ||
echo " ${SCRIPTDIR}" | echo " ${SCRIPTDIR}" | ||
if [ -e ${SCRIPTDIR}/imdb.pl ]; then | if [ -e ${SCRIPTDIR}/imdb.pl ]; then | ||
− | + | $SUDO mv ${SCRIPTDIR}/imdb.pl{,-orig} | |
− | fi | + | fi |
− | + | $SUDO ln -s tmdb.pl ${SCRIPTDIR}/imdb.pl && | |
if [ -L ${SCRIPTDIR}/imdb.pl ]; then | if [ -L ${SCRIPTDIR}/imdb.pl ]; then | ||
echo "Successfully configured MythVideo and MythWeb to use tmdb.pl." | echo "Successfully configured MythVideo and MythWeb to use tmdb.pl." | ||
Line 47: | Line 48: | ||
echo "Please create a symlink called imdb.pl that refers to tmdb.pl in" | echo "Please create a symlink called imdb.pl that refers to tmdb.pl in" | ||
echo " ${SCRIPTDIR}" | echo " ${SCRIPTDIR}" | ||
− | fi | + | fi |
else | else | ||
echo "Unable to install tmdb.pl script. Please install tmdb.pl manually." | echo "Unable to install tmdb.pl script. Please install tmdb.pl manually." |
Revision as of 20:42, 4 April 2009
Note: The correct title of this article is tmdb.pl. It appears incorrectly here due to technical restrictions.
What is tmdb.pl
This perl script is intended to perform movie data lookups based on the themoviedb.org database. It will replace the imdb.pl script used by older versions of MythTV, as the imdb.pl script is now in violation of the IMDb Terms of Use.
The best part about using themoviedb.org data is that it is designed for applications such as MythTV, so it provides a lot of information that IMDb does not provide--such as multiple high-quality movie posters per movie, fan art, banners, and more. And, the data at themoviedb.org is freely editable by users and is available for use under open licensing terms.
Downloading tmdb.pl
If you're using MythTV 0.21-fixes, tmdb.pl
does not ship with MythTV, so you will need to download the script (as a non-root user in a normal directory, such as the user's HOME directory). Do so by copying/pasting the following commands directly into a terminal window:
install -d tmdb/MythTV && pushd tmdb && svn cat http://svn.mythtv.org/svn/trunk/mythplugins/mythvideo/mythvideo/scripts/tmdb.pl > tmdb.pl && echo "Successfully downloaded tmdb.pl." && svn cat http://svn.mythtv.org/svn/trunk/mythplugins/mythvideo/mythvideo/scripts/MythTV/MythVideoCommon.pm > MythTV/MythVideoCommon.pm && echo "Successfully downloaded MythVideoCommon.pm." && chmod 755 ./tmdb.pl ./MythTV/MythVideoCommon.pm && popd
Installing tmdb.pl
The MythVideo scripts are typically installed in /usr/share/mythtv/mythvideo/scripts/
or /usr/local/share/mythtv/scripts/
. The following code assumes they are installed in one of those two directories. If not, adjust the SCRIPTDIR as appropriate (and skip the if conditional that tries to set it automatically). To use the code below, copy/paste the following commands directly into the same terminal window you used for downloading the script, above. If your distribution does not use the sudo
command to execute scripts as root
, ensure you're using the root account (and in the directory you were in when you downloaded the script, above) and do not copy the first line ("SUDO=sudo
").
SUDO=sudo && if [ -d /usr/share/mythtv/mythvideo/scripts ]; then SCRIPTDIR=/usr/share/mythtv/mythvideo/scripts elif [ -d /usr/local/share/mythtv/mythvideo/scripts ]; then SCRIPTDIR=/usr/local/share/mythtv/mythvideo/scripts else echo "Unable to find script directory. Please install tmdb.pl manually." fi $SUDO cp -Rv tmdb/* ${SCRIPTDIR} && if [ -e ${SCRIPTDIR}/tmdb.pl ]; then echo "Successfully installed tmdb.pl script to:" echo " ${SCRIPTDIR}" if [ -e ${SCRIPTDIR}/imdb.pl ]; then $SUDO mv ${SCRIPTDIR}/imdb.pl{,-orig} fi $SUDO ln -s tmdb.pl ${SCRIPTDIR}/imdb.pl && if [ -L ${SCRIPTDIR}/imdb.pl ]; then echo "Successfully configured MythVideo and MythWeb to use tmdb.pl." else echo "Unable to configure MythVideo and MythWeb to use tmdb.pl." echo "Please create a symlink called imdb.pl that refers to tmdb.pl in" echo " ${SCRIPTDIR}" fi else echo "Unable to install tmdb.pl script. Please install tmdb.pl manually." fi unset SCRIPTDIR
When you're done with the temporary copy made when downloading the scripts, you may delete the tmdb directory:
rm -r tmdb