Ttvdb.py

From MythTV Official Wiki
Revision as of 01:09, 21 March 2009 by Rdv (talk | contribs)

Jump to: navigation, search
                     THIS PAGE IS A WORK IN PROGRESS

What is ttvdb.py

This python script is intended to perform TV series data lookups based on the thetvdb.com wiki

Downloading ttvdb.py set of scripts

Currently ttvdb.py does not ship with MythTV and only works with v0.22 revision 20232 or higher with a data base Schema Version: 1232 or higher. You will also need to apply the following patches #6346 #6158

To download the ttvdb scripts (as a non-root user in a normal directory, such as the user's HOME directory): #6242 - ttvdb make sure to download the latest version (v0.8.9)

!! Download and unpack ready for install steps go here

Installing ttvdb.py

The MythVideo scripts are typically installed in /usr/share/mythtv/mythvideo/scripts/ or /usr/local/share/mythtv/mythvideo/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).

!! Installation instructions go here

When you're done with the temporary copy made when downloading the scripts, you may delete the ttvdb directory:

!! Deletion instructions go here

Configuring MythVideo 0.22 to use ttvdb,py

Change the MythVideo settings to use the new script, the Command to search for TV series listings:

Using the default menu theme, you can find the settings in Utilities/Setup|Setup|Media Settings|Videos Settings|General Settings on page 8/8. After making the changes, the settings should look like:

Command to search for TV Shows in Mythvideo: /usr/local/share/mythtv/mythvideo/scripts/ttvdb.py -M
Command to search for TV Season posters: /usr/local/share/mythtv/mythvideo/scripts/ttvdb.py -mlP
Command to search for TV Show fanart: /usr/local/share/mythtv/mythvideo/scripts/ttvdb.py -tlF
Command to search for TV Season banners: /usr/local/share/mythtv/mythvideo/scripts/ttvdb.py -lB
Command to extract data for TV Episodes: /usr/local/share/mythtv/mythvideo/scripts/ttvdb.py -mD


Command line examples for using ttvdb

To view command line examples of all ttvdb features type:

ttvdb -u

User configuration file

TV listing sources such as Schedules Directdo not always pass MythTV TV series and episode names that match the ones on thetvdb.com wiki. This can cause ttvdb to retrieve unintended information. Luckily this does not happen often. To compensate ttvdb provides a user configuration file which can deal with those rare cases.

The configuration file can tie a series name (%TITLE%) to a specific thetvdb.com series id (the equivalent of an IMDB number). Also a TV series episode name (%SUBTITLE%) can be modified to match the episode name on thetvdb.com.

The included configuration file "tvdb-example.conf" already has examples of TV series names that need special attention. There is also an episode name that must be manipulated to match those on thetvdb.com wiki.

Here is an example where Schedules Direct has the TV Series name "The Beast" but thetvdb.com has the series name as "The Beast (2009)". Schedules Direct has the series "24" episode name of "Day 7: 10:00PM-11:00PM" while thetvdb.com has "Day 7: 10:00 PM-11:00 PM". The configuration file can compensate for these discrepancies.

Here are all known examples that you can add as part of your own ttvdb configuration file. Please add these new one to this section when you encounter them.

[series_name_override] 
# Specify recorded "Life On Mars" shows as the US version  
Life on Mars:82289
# Specify recorded "Eleventh Hour" shows as the US version  
Eleventh Hour:83066
# Specify recorded "Frontline" or "Frontline/World" shows as the "Frontline PBS" version  
Frontline/World:80646
Frontline:80646
# Specify recorded "The Beast" shows are the 2009 version  
The Beast:83805
# Specify recorded "Castle" shows are the 2009 version  
Castle:83462
# Specify recorded "Battlestar Galactica" shows are the 2003 version  
Battlestar Galactica:73545
[ep_name_massage]
# Modify the TV series 24 episode name (%SUBTITLE%)
24: PM," PM", AM, " AM"