Jamu

From MythTV Official Wiki
Jump to: navigation, search

Time.png End Of Life: Jamu has be superseded by integrated metadata capabilities in the UI and the MythMetadataLookup tool. It will no longer be distributed or officially supported as of version 0.25


What is Jamu?

Jamu - Just.Another.Metadata.Utility
This python script performs a variety of utility functions on mythvideo metadata and its associated video files and directories. The focus is to maximize your experience with the new MythUI only available in 0.22 and higher. The primary sources of graphics and meta data for movies is themoviedb.orgwiki and for TV Series thetvdb.comwiki

Jamu is a supplementary source of metadata. If Jamu fails to deal with something, the first action should always be to perform metadata grabbing for the item in MythVideo. Jamu acts on your library as a whole, and thus makes assumptions about the data that are more difficult to predict and control than performing actions on a single item in MythVideo.

As of 0.23 Jamu can parse directories names to acquire TV series name and season information. In 0.22 Jamu only parses the video file names.

For MythTV 0.22 users, themoviedb.orghas stopped supporting their v2.0 API. This means that Jamu will not update Movie meta date and images. Please upgrade to MythTV 0.23 or higher to resolve this issue.

Jamu's Features

  1. #Mass Updates of graphics and text meta data:
    • Renaming existing TV series graphics to the new format (series Season - #) and update the video file's data base record. e.g. "Fringe Season 1.jpg"
    • Renaming existing Movie graphics to the reference number of the source of the meta data TMDB/IMDB number.
    • Fetch the graphics directories from the MythTV data base (Posters, Fan art and Banners)
    • Download missing Posters/Cover Image, Banners and Fan art for movies and TV Series
    • Populate the Mythvideo file's data base fields for:
      • TV series season and episode numbers where applicable
      • Movie graphics (Posters and Fanart) file names
      • TV series/season graphics (Posters, Banners, Fan art) file names
      • Movie and TV episode text information (meta data)
      • Add Cast members and Genres and associate with a video file
    • Create symbolic links to posters so that the MythUI shows the posters icons in place of the generic directory icon
  2. #Regular Maintenance (usually as a cron job)
    • Update MythTV video file data base records filling in missing information when new information becomes available
    • Download season specific posters and banners for TV series when they become available
    • User definable threshold that identifies low quality Poster/Cover Images. This is a trigger for the maintenance process to look for a better graphic from the primary and secondary graphics sources. The default setting is a width of 200 pixels.
    • User definable fields that control what triggers a meta data update. This can be valuable if you have bandwidth concerns or do not care that information like director, userrating ... etc are updated.
  3. Full Storage Group support for Videos and Graphics
  4. #Interactive Session supporting the selection of movie IMDB or TV Series id numbers
    • All non-interactive use of Jamu is based on the myth database having a reference number supported by either themoviedb.org or thetvdb.com.
    • Web links are included with the displayed choices
    • You can enter the IMDB or TMDB or TV Series id numbers directly
  5. Have Jamu guess at the correct TV series or Movie with only exact matches considered a successful guess. A successful guess will assign the appropriate TMDB/TVDB number to that video file's metadata. This option (-MG) works best when the video file name is very close to those used by themoviedb.org or thetvdb.com.
  6. Download missing graphics for #Scheduled and Recorded programs
  7. Find your missing TMDB or TV Series id numbers. This invokes an interactive session that allows you to focus only on video files that are lacking the essential id numbers.
  8. Seamless integration with Mythvideo download feature. Jamu conforms to the same update processes as Mythvideo downloads does for a single video file. This includes the same graphics file naming conventions for movies and TV episodes.
  9. A #Janitor option is provided which cleans up graphics that are no longer used by MythUI.
  10. #Moving video files and dynamically update the video file's data base record
    • Single files or whole directories. Great for moving TV episodes into season specific folders.
    • Video file wild card selection. e.g Only move a single season of episodes "Fringe S01E*"
    • Optionally rename TV episodes if the video file name contains season and episode numbers
    • Multiply "target and destination" pairs can be specified on the command line
  11. #Simulation (Dry Run) so that you can see what would be changed. Messages are issued for all changes to your the Myth data base, file downloads, file moves and files created. No actual changes are made to your environment. This is an essential feature when getting started.
  12. Support user specified secondary sources for graphics and/or text metadata
  13. User definable regex patterns to add support for TV series episode file names that Jamu does not natively include. See section "regex" in "jamu-example.conf".
  14. #User Configuration File which exposes almost all the script's variables for extensive customization
  15. #Statistics Reports for mass updates, maintenance, file moves and Janitor processing
  16. The Jamu option -MW will attempt to find and download graphics from TVDB and TMDB for Miro videos.
  17. Jamu can be used for many non-MythTV specific purposes related to TV Series. To see examples type:
./jamu.py --examples

0.23 specific features

  • Parse folder structure for Season, Episode, and Title information to match MythVideo folder parsing. Patch provided by Mitko Haralanov (thanks).
  • Added a new option (-MR) to interactively populate the video reference numbers from TVDB and TMDB without any meta data downloads. After that the user runs Jamu with the -M option and the meta data and images are downloaded. This enhancement greatly simplifies the preparation for mass updates to a two step process. Thanks to Yan Seiner for this suggestion.
  • Added to the interactive interface is the ability to select a reference number of '99999999' which effectively tells Jamu to ignore the specific video from further processing now and in the future
  • Added a new jamu.conf section [ignore-directory] to list Video sub-directories that Jamu should ignore. Those directories and their subdirectories will not be included in any Jamu processing. This feature can be used instead of setting multiple videos with a reference number of '99999999'.
  • Jamu will always use the TMDB reference number over the IMDB number but still supports IMDB#s when TMDB does not have the movie
  • During any -M (maintenance) run Jamu will convert IMDB#s to TMDB#s when themoviedb.org includes that movie. This is in line with MythVideo changes. Graphics for the movie will also be renamed so they do not need to be re-downloaded.
  • Jamu adds the production countries for movies when TMDB provides that information
  • Jamu adds the movie rating (e.g. PG-13) for movies when TMDB provides that information
  • Improved the -MW (Watched Recordings) option detection of TV series when the EPG data does not include a subtitle. Users can add the specific TVDB numbers to the 'series_name_override' section of their jamu.conf file. Australian users had mentioned this as an issue. Previously TV series without subtitles were being mistaken for a movie and the override did not help.
  • Jamu will now download the top rated TV Series season cover art and banner images. This enhancement matches MythVideo processing.
  • Mythbuntu 10.4 (Lucid) includes a Mythbuntu-Control-Center Jamu plugin which allows users to easily enable or disable the three Mythbuntu Jamu cronjobs and the NFS option, plus select the default language that Jamu will use. All through a remote friendly GUI.

Language Support

This option is only supported for TV Series data and then only from the prime source thetvdb.comwiki.

Jamu data requests default to English unless the -l option is used or a configuration file has a language set. NOTE: When active the language in the configuration file overrides any command line setting. When a language (e.g. es) is specified, jamu will first look for data in that language but if none is available jamu will return the English equivalent assuming any exists.

Currently thetvdb.com wiki supports the following languages: (da, fi, nl, de, it, es, fr, pl, hu, el, tr, ru, he, ja, pt, zh, cs, sl, hr, ko, en, sv, no)

Currently themoviedb.orgwiki does not support meta data selection by a specific language. Multi-language support is a feature mentioned as a future enhancement.

Getting Started

If you are transitioning to MythTV 0.22, you should start by reading the MythVideo .22 Transition Guide which contains information about how to configure MythTV 0.22's newer features, such as storage groups for video and artwork.

Installing jamu.py

Jamu is included with MythTV 0.22+fixes and higher.

Dependencies: (Of course MythTV 0.22+fixes and higher)

  • Python 2.5 or higher
  • IMDbPy library v3.8 or higher Note: On Fedora 14 the package is called "python-imdb"
  • xml v41660 or higher Note: On Fedora 14 the package is called "PyXML"
  • tvdb_api (ships with MythTV 0.22 and higher)
  • tmdb_api (ships with MythTV 0.23 and higher) - This is not required for Jamu included in 0.22+fixes
  • ffmpeg (optional) - Only used to get accurate duration times of the videos
  • Image see: In Debian/Ubuntu/Fedora it is packaged as 'python-imaging'. http://www.pythonware.com/products/pil/

Jamu can only be run on a MythTV back end. If you have multiple MythTV back ends you will need to run Jamu on each of them.

Configuring your graphics directories

Set up the directories for the graphic artwork. You can use either mythtv-setup and Storage Groups (recommended) or in the MythTV Frontend menu Utilities/Setup|Setup|Media Settings|Videos Settings|General Settings on page 1/8, enter the directories where the graphic files will be stored. It is recommened to use separate directories for each type of graphic file (Posters, Banners, Fan art, and Screen shots).

User Configuration File

A user configuration file is necessary to get the most out of what Jamu has to offer. This is where you can specify secondary sources to get data and deal with issues like movies that look like TV episodes to Jamu (e.g. the movie "U-571").

Almost every variable in the Jamu script can be set through the user configuration file but remember

"With great power comes great responsibility" - Stan Lee

There is limited validation of the variables so you can cause Jamu to abort or not work as intended.

If you have examined the "jamu-example.conf" you may be overwhelmed by the number of variables. The reality is almost all variables should be left to their defaults.
This documentation will guide you through the creation of your own configuration file and the variables that should be customized before using Jamu.

After changing configuration variables check that the variables are set as you expect run Jamu with the -f option and all the settings will be displayed:

./jamu.py -l en -C "$HOME/.mythtv/jamu.conf" -MVf | less

Use the "less" command as there are more than a page worth of variables. The variables are sorted alphabetically. Hitting 'q' key will exit "less".

Jamu will automatically look for a "jamu.conf" file in "/home/user/.mythtv/jamu.conf" directory if a configuration file is not specified on the command line.

Creating your own configuration file

Copy and rename "jamu-example.conf" to a directory of your choosing (e.g. /home/user/.mythtv/jamu.conf). Then edit the new file and make changes as instructed below. The example configuration file contains documentation for all sections and variables. If you use a different file name or directory than "/home/user/.mythtv/jamu.conf" you will need to use the -C option, For example:

./jamu -C "$HOME/.jamu/jamu-maintenance.conf" ...

If you include Jamu in a mythbackend user job and want to let Jamu find a default configuration file, make sure that you have a "jamu.conf" file for the user account you are running Jamu with or specify a fully qualified path for the configuration file, do not use the "~" short cut.

Configuration options that should be customized

The configuration file contains ample documentation on what each section is for and what each variable does. That documentation will not be repeated here. This guide will help most users get running ASAP.
To activate a variable remove the leading '#' (pound) character from the front of the variable.

  1. Find the local_language variable and set the two letter language of choice. As long as you use the configuration file you will not need to set your preferred language on the command line.
  2. Find the video_file_exts variable. If one of your video file extensions is not already included in the defaults then add it to the default string.
  3. Find the series_name_override section. Activate all variables (TV Series and Movies) that are applicable to your video collection. Add entries that you suspect should be included. Especially movie titles that may be interpreted as a TV series with season and episode numbers (e.g. "U-571"), TV series which have had remakes (e.g. The Beast, Life on Mars ... etc) or movies remakes (e.g. Planet of the Apes)
  4. Find the ep_name_massage section. If you have the TV Series '24' episodes then activate the variable.
  5. Find the movies-secondary-sources and tv-secondary-sources add/activate any secondary sources for graphics and data

That was not so bad was it? Remember to check that the variables are set as you intended with:

./jamu.py -MVf | less

or

./jamu.py -l en -C "/home/user/.mythtv/jamu.conf" -MVf | less

Variables you should revisit after you are in maintenance mode

  1. Find the tmdb_genre_filter variable. It is advised NOT to change the default settings until after you have done your mass update.
  2. Find the metadata_exclude_as_update_trigger variable. You may find that unimportant bits of missing meta data are causing frequent downloads of meta data even though it is unlikely that new data is available.
    Activate this variable and add keys to the exclusion list will reduce unnecessary meta data downloads. Adding plot would not serve you well but director or user rating may help. View the statistics reports from your maintenance log to determine if you need to change the defaults for this variable. If you do a maintenance run while using the -V (verbose) option you will be able to see which field is triggering the most meta data download.
  3. Find the min_poster_size variable. Only change from the default minimum poster width of 200 pixels if it is too large or you feel that too many poster downloads are being triggered due to the majority of your posters being less than the 200 pixel threshold. If you activate this variable and change the number to '0' zero Jamu will not attempt to get a higher resolution poster during maintenance processing.

Mass Updates

Using Jamu to perform a mass update of the MythTV data base and download of graphics for your video collection is the fastest way to enjoying the "Bling" that MythUI can display. Follow these steps to set-up and execute a mass update.

Steps to performing a Mass Update

Set up your own configuration file.

See #User Configuration File

Back up your MythTV data base

See data base backups. Jamu writes to the following data base tables 'videometadata', 'videometadatacast', 'videometadatagenre', 'videogenre' and 'videocast'. Jamu has been tested on a collection of over 1800 video files but anything can happen, so if you skip backing up your data base then:

"For those who are about to die we salute you" - Gladiator

Skipping Videos like "Home Movies"

If you have personal videos like "Home Movies" that will never have metadata and graphics you can have Jamu automatically skip them. Using MythVideo's metadata edit capablility ("i"->Metadata Options->Edit Metadata) change the specific video's TMDB number to "99999999" (eight nines).

In MythTV 0.23 or higher you can specify whole directories for Jamu to ignore rather than set each video's TMDB number to "99999999" (eight nines).
Add a "[ignore-directory]" section to your jamu.conf file and specify the directories that Jamu should ignore:

[ignore-directory]
ignore01: /media/video/homemovies/
ignore02: /media/video/morehomemovies/

Interactive Session

Jamu depends on video file data base records having either IMDB/TMDB numbers for movies and TV episodes having series names, season and episode numbers. An interactive session is required to get that information input into the MythTV data base.

In MythTV 0.23 adding the required reference numbers is faster if you use the -MR option.

/usr/local/share/mythtv/mythvideo/scripts/jamu.py -l en -C "/home/user/.mythtv/jamu.conf" -MRV

After adding all your refernece numbers you can perform an unattended mass update with:

/usr/local/share/mythtv/mythvideo/scripts/jamu.py -l en -C "/home/user/.mythtv/jamu.conf" -MV

After you have completed these two steps skip to Regular Maintenance

In MythTV 0.22 follow these instructions: Invoke an interactive session to update the MythTV database through the following command line:

/usr/local/share/mythtv/mythvideo/scripts/jamu.py -l en -C "/home/user/.mythtv/jamu.conf" -MIV

The option 'V' adds verbose messages to the console. This helps you understand what is happening.
After adding information for a couple TV shows or Movies abort the interactive session by hitting ctrl-C a few times. Your updates will be retained and the data base will be OK.

Simulation (Dry Run)

Perform a simulation run to check if everything reacts as expected. A simulation goes through all normal processes EXCEPT it does not download graphics, meta data or alter your data base. You will want to pipe the messages to a log file and examine the log at your leasure.

/usr/local/share/mythtv/mythvideo/scripts/jamu.py -l en -C "/home/user/.mythtv/jamu.conf" -sMV > "~/tmp/jamu.log"

During processing, you can tail the log file in a separate terminal session or open it in a text editor, to see that all is well.
The length of this simulation run is depended on the size of your video collection, the speed of your Internet connection, how much meta data needs to be updated and the responsiveness of the primary source web sites. You can safely abort the simulation at any time with a few ctrl-C in a row.
Examine the log and if everything looks OK then you are ready to complete your interactive session.

Restart Interactive Session

Complete your interactive session with the following command line:

/usr/local/share/mythtv/mythvideo/scripts/jamu.py -l en -C "/home/user/.mythtv/jamu.conf" -MIV

When you have added all the required information meta data and graphics downloads will start just for the video files you updated.
Start up the mythfrontend and check out what the MythUI looks like for the updated videos. Assume you like what you see you are ready for a mass update.

Running the Mass Update

Start a Mass Update with the following command:

/usr/local/share/mythtv/mythvideo/scripts/jamu.py -l en -C "/home/user/.mythtv/jamu.conf" -MV > "~/tmp/jamu.log"

If the session is going on for too long you can abort the script (a few ctrl-C in a row) without harming your data base. You will lose the statistics report but any data base updates and downloaded graphics will be retained. You can restart the script with the command line above and it will restart with the next video that has missing information.
Mass updates can take a while and are best done in off prime hours (prime hours are 4-8PM EST). Check the log file every 15 minutes.

Regular Maintenance

Using Jamu for regular maintenance is as easy as setting up a cron job. Here is a suggested cron command string:

/usr/local/share/mythtv/mythvideo/scripts/jamu.py -l en -C "/home/user/.mythtv/jamu.conf" -M > "/home/user/tmp/jamu_maintenance.log"

Modify the cron command string for language and location of the configuration and log files. The assumption is that you have already successfully gone through the steps for a mass update and are just keeping your environment up to date.
Do not schedule maintenance more than once a day and at that only during off hours. The data does not get changed that frequently and you do not want to over tax these FREE data sources. Currently both primary sources are going through teething pains from a rapidly growing user community.

Scheduled and Recorded

Posters and Fan art are supported in the Watch Recordings screen. With the (-MW) option Jamu can download the graphics for Scheduled and Recorded programs which will enable their displayed on the Watch Recordings screen. Graphics for both TV shows and Movies will be downloaded. It is suggested to use a nightly cron job to keep your graphics up to date. Only missing graphics will be downloaded. Here is an example cron command string:

/usr/local/share/mythtv/mythvideo/scripts/jamu.py -l en -C "/home/user/.mythtv/jamu.conf" -MW > "~/tmp/jamu_watched.log"

Note that the interactive (-I) switch is not valid with the -W option.

The option (-MW) will attempt to find and download graphics from TVDB and TMDB for Miro videos. To take advantage of integrated Miro videos with MythTV you need the utility script Miro Bridge [1]

For this option (-MW) to download graphics for the Miro shows and movie trailer channel names must be specified. In the jamu-example.conf file see sections "mb_tv" and "mb_movies". The configuration file contains the required documentation.

See #Scheduled & Recorded Statistics for the generated report example.
Over time a number of unused graphic files may be left from old recordings. Use Jamu's #Janitor feature to remove the unused graphics.

This stupid thing does not work!

The usual suspects:

  1. If you see an error like "'MythDB' object has no attribute 'db'" then you are likely missing a properly configured ~/.mythtv/config.xml file.
    To create the config.xml file:
    1) Remove or move the ~/.mythtv/mysql.txt (if you have one)
    2) Start the frontend (on the backend you will be running Jamu)
    3) Enter the DB info when prompted
  2. One or more of the source sites are down (thetvdb.com, themoviedb.org and any of your secondary sites)
  3. You have not followed the installation or mass update set up instructions. The best check of a proper installation is that you can use Mythvideo "Manage Video|Download Metadata" to successfully download both movies and TV episodes graphics and meta data.
  4. Your TV episode file names are not formated so that Jamu can extract series name, season and episode numbers. You can use the utility tvnamer to rename your video files.
  5. You are not running your machine with locale of 'utf-8'. Your configuration should look something like:
    > locale
    LANG=en_CA.UTF-8
    LC_CTYPE="en_CA.UTF-8"
    LC_NUMERIC="en_CA.UTF-8"
    LC_TIME="en_CA.UTF-8"
    LC_COLLATE="en_CA.UTF-8"
    LC_MONETARY="en_CA.UTF-8"
    LC_MESSAGES="en_CA.UTF-8"
    LC_PAPER="en_CA.UTF-8"
    LC_NAME="en_CA.UTF-8"
    LC_ADDRESS="en_CA.UTF-8"
    LC_TELEPHONE="en_CA.UTF-8"
    LC_MEASUREMENT="en_CA.UTF-8"
    LC_IDENTIFICATION="en_CA.UTF-8"
    LC_ALL=
  6. If you are running Jamu as a cron job and you see a Unicode error message, but the same command works when run from a command line, most likely your cron environment is not running as UTF8. This can happen even if root and users run with a locale of UTF8. This generally happens when directories or video files contain Unicode characters. Please refer to your distribution for instructions on setting the crontab's environment variables.
    This example is for US and English. Change them to your own language and country code. Add the following to the top of your crontab (see "crontab -h" for "crontab -e" information):
    LANG=en_US.UTF-8
    LANGUAGE=en
    LC_CTYPE=en_US.UTF-8
  7. One user pointed out that the utility 'PuTTY' (a Telnet and SSH client) was defaulting to 'latin-1' and therefore converting the TV series title so that TV series searches never found a result.
  8. If you are running Jamu as a cron job and you see a "! Warning - Creating an instance caused an error for one of: MythTV, MythVideo or MythDB" message, but the same command works when run from a command line, the problem may be that you have two different "mysql.txt" files. One for root and one for your user account. Check to see if they both use the correct settings.

What are these error messages?

If you have installed Python 2.6 (e.g. Ubuntu 9.04 Jaunty Jackalope) you will see these warning messages. These messages are not generated by Jamu and hopefully will be eliminated sometime in the future (see: [2]). They do not cause any issues with Jamu:

/var/lib/python-support/python2.6/MySQLdb/__init__.py:34: DeprecationWarning: the sets module is deprecated from sets import ImmutableSet

Indication that IMDB.com is having issues responding (Try again later)

imdb._exceptions.IMDbDataAccessError: {'url': 'http://akas.imdb.com/title/tt0074860/combined', 'error
type': 'http_error_default', 'errcode': 502, 'headers': <httplib.HTTPMessage instance at 0x24ab5a8>,
'proxy': , 'errmsg': 'Bad Gateway'}
imdb._exceptions.IMDbDataAccessError: {'url': 'http://akas.imdb.com/title/tt0028231/combined', 'error
type': 'http_error_default', 'errcode': 503, 'headers': <httplib.HTTPMessage instance at 0x1a8ca70>,
'proxy': , 'errmsg': 'Service Temporarily Unavailable'}

find_poster.py - indications that IMDB.com is having issues responding (Try again later)

imdb._exceptions.IMDbDataAccessError: {'url': 'http://akas.imdb.com/title/tt0159784/plotsummary',
'error type': 'http_error_default', 'errcode': 404, 'headers': <httplib.HTTPMessage instance at
0xf9d908>, 'proxy': , 'errmsg': 'Not Found'}

Oops I picked the wrong movie/TV series. What do I do now?

This is easy to fix. Through Mythvideo select your movie/TV episode and "Manage Video|Reset Metadata" then "Manage Video|Download Metadata".

Moving video files

Jamu can be used to reorganise your video collection without losing meta data or associated graphics. After working with the MythUI and the graphics I found that moving away from a flat directory structure for TV Series had advantages. This option was written just for that purpose. Always add the target (file/directory) and destination (directory) in pairs. Multiple target and destination pairs can be specified on a single command line. Below are command strings that can be used for most move tasks.

Move a single video file

/usr/local/share/mythtv/mythvideo/scripts/jamu.py -l en -C "/home/user/.mythtv/jamu.conf" -M "/PathToVideo/fringe.1x02.avi" "/media/video/Fringe/S01"

Move a directory

/usr/local/share/mythtv/mythvideo/scripts/jamu.py -l en -C "/home/user/.mythtv/jamu.conf" -M "/PathToVideo/fringe" "/media/video/Fringe"

Move a season's worth of TV episodes into a season directory (wild cards)

/usr/local/share/mythtv/mythvideo/scripts/jamu.py -l en -C "/home/user/.mythtv/jamu.conf" -M "/media/video/Fringe/fringe.01x*" "/media/video/Fringe/S01"

Move a movie or TV episode video files and rename to a standard format

/usr/local/share/mythtv/mythvideo/scripts/jamu.py -l en -C "/home/user/.mythtv/jamu.conf" -MF "/PathToVideo/fringe" "/media/video/Fringe/S01"

All video files such as "fringe.s1x02.avi" would be moved and renamed as "Fringe - S01E02 - The Same Old Story.avi"

/usr/local/share/mythtv/mythvideo/scripts/jamu.py -l en -C "/home/user/.mythtv/jamu.conf" -MF "/PathToVideo/" "/media/video/The Duchess"

A movie video file such as "the duchess.mkv"" would be moved and renamed to "The Duchess (2008).mkv""

Janitor

As your collection changes over time some of the graphics that had been downloaded can get orphaned. A Mythvideo rescan only removes Myth data base records that no longer have video files. The Jamu Janitor (-J) option removes the orphaned Posters, Fan art and Banners that are not associated with any video file or with a Scheduled or Recorded program. Use this command line to have Jamu clean up orphaned graphics:

/usr/local/share/mythtv/mythvideo/scripts/jamu.py -l en -C "/home/user/.mythtv/jamu.conf" -MJ

Statistics Reports

At the end of mass updates, maintenance, file moves, Scheduled/Recorded and Janitor processing a statistics report is out put to the console.

Interactive Session Statistics

------------------Statistics---------------
Number of video files processed .....(    2)
Number of Fanart graphics downloaded (    0)
Number of Poster graphics downloaded (    2)
Number of Banner graphics downloaded (    0)
Number of 2nd source graphics downld (    1)
Number of metadata downloads.........(    2)
Number of 2nd source metadata found .(    1)
Number of symbolic links created.....(    0)
Number of Myth database updates......(    2)
Number of undersized posters ........(    0)
--------------Updated Video Files----------
Village Of The Damned
Fringe - S01E15 - Inner Child

Maintenance and Mass update Statistics

------------------Statistics----------------
Number of video files processed .....( 1811)
Number of Fanart graphics downloaded (    2)
Number of Poster graphics downloaded (    5)
Number of Banner graphics downloaded (    1)
Number of 2nd source graphics downld (    5)
Number of metadata downloads.........(  578)
Number of 2nd source metadata found .(   79)
Number of symbolic links created.....(    0)
Number of Myth database updates......(    5)
Number of undersized posters ........(  134)
--------------Updated Video Files----------
Kings - S01E04 - Insurrection
Lost - S05E11 - Whatever Happened, Happened
24 - S07E17 - Day 7: 12:00 AM - 1:00 AM
The No. 1 Ladies' Detective Agency - S01E02 - Poison
Jason And The Argonauts
---------------Under sized Poster----------
This Island Earth
Three Days of the Condor
...
The Hoax
Titus

Move Statistics

--------------Move Statistics---------------
Number of subdirectories ............(    0)
Number of files moved ...............(    1)
Number of symbolic links recreated...(    0)
Number of renamed TV episode files.. (    0)
Number of Myth database updates .... (    0)
--------------------------------------------
Mythtv video database maintenance start: 2009-04-08 13:22
Mythtv video database maintenance ends at  : 2009-04-08 13:22
------------------Statistics---------------
Number of video files processed .....(    1)
Number of Fanart graphics downloaded (    0)
Number of Poster graphics downloaded (    0)
Number of Banner graphics downloaded (    0)
Number of 2nd source graphics downld (    0)
Number of metadata downloads.........(    1)
Number of 2nd source metadata found .(    0)
Number of symbolic links created.....(    0)
Number of Myth database updates......(    1)
Number of undersized posters ........(    0)
--------------Updated Video Files----------
Fringe - S01E15 - Inner Child

Janitor Statistics

--------------Janitor Statistics---------------
    total fanarts ......................(  738)
    total banners ......................(  133)
    total posters ......................(  884)
  deleted fanarts ......................(    2)
  deleted banners ......................(    2)
  deleted posters ......................(    2)
new total fanarts ......................(  737)
new total banners ......................(  131)
new total posters ......................(  883)
----------------Deleted fanart files---------------
/media/virtual/MythTV_Storage/MythFanArt/The Mentalist.jpg
/media/virtual/MythTV_Storage/MythFanArt/The Mentalist Season 1.jpg
----------------Deleted banner files---------------
/media/virtual/MythTV_Storage/MythBanners/The Mentalist.jpg
/media/virtual/MythTV_Storage/MythBanners/The Mentalist Season 1.jpg
----------------Deleted poster files---------------
/media/virtual/MythTV_Storage/MythVideo/The Mentalist.jpg
/media/virtual/MythTV_Storage/MythVideo/The Mentalist Season 1.jpg

Scheduled & Recorded Statistics

-----Scheduled & Recorded Statistics-------
Number of Scheduled & Recorded ......(   18)
Number of Fanart graphics found .....(   10)
Number of Poster graphics found .....(   10)
Number of Banner graphics found .....(    7)
Number of Fanart graphics downloaded (    2)
Number of Poster graphics downloaded (    2)
Number of Banner graphics downloaded (    1)
Number of Miro TV Shows ............ (    1)
Number of Miro Movie Trailers ...... (    1)
-------------Scheduled & Recorded----------
Austin City Limits
American Masters
Kings
...
The Duchess (2008)
True Blood
Hung
Miro Movie Trailer: HD-Trailers.net Blog - The Invention Of Lying (Successful)
Miro TV Show: TedTalks HD - TEDTalks : Olafur Eliasson: Playing with space and light

Interactive Session Examples

Movies

Now processing video file (Village Of The Damned)(0)(0)
Entry exists in MythDB but category is 0 and year is 1895 (default values).
Updating (Highlander Endgame).
themoviedb.org Search Results:
 1 -> Highlander: Endgame (2000)                         # http://www.themoviedb.org/movie/12211
 2 -> The Railway Children (2000)                        # http://www.themoviedb.org/movie/31920
 3 -> Endgame (2009)                                     # http://www.themoviedb.org/movie/15102
 4 -> Endgame: Blueprint for Global Enslavement (2007)   # http://www.themoviedb.org/movie/18312
 5 -> Endgame - Bronx lotta finale (1983)                # http://www.themoviedb.org/movie/28850
 6 -> 99999999 # Set this video to be ignored by Jamu with a reference number of '99999999'
Direct search of themoviedb.org # http://themoviedb.org/
Enter choice:
("Enter" key equals first selection (1)) or input a zero padded 5 digit movie TMDB id number, ? for help):
12211
Updated Mythdb for video file(Highlander Endgame)

TV Series

Now processing video file (Fringe - S01E15 - Inner Child)(1)(15)
Entry does not exist in MythDB.  Adding (Fringe - S01E15 - Inner Child).
1 -> Fringe # http://thetvdb.com/index.php?tab=series&id=82066
2 -> 99999999 # Set this video to be ignored by Jamu with a reference number of '99999999'
Direct search of thetvdb # http://thetvdb.com/?tab=advancedsearch
Enter choice (Enter key equals number one (1)) or input the Series id directly, ? for help):
1
Updated Mythdb for video file(Fringe - S01E15 - Inner Child)

Cool, but I wish I could add my DVD collection

Mythvideo is not intended to be a DVD collection manager. Even if you manually entered your DVD collection meta data the next video file scan will remove all that you entered.

One way to get around this is to created a directory called DVDs and created zero length video files who's file name are the name of the DVDs (e.g. "/media/video/DVDs/A to F/A Beautiful Mind.mkv"). Now Jamu can perform all data and graphics downloads as if this was a regular video file.

For a large collection manually creating zero length files with the proper DVD name can be too difficult, but some of you have your collections catalogued. Some of the catalogue applications can output your collection as a delimited file. A simple script can use the delimiter file to create the required zero length video files.

Jamu limitations

  1. The "find_meta.py" script supports ripped DVD's with multiple files making up a single video. Jamu will skip any DVD rips as "VIDEO_TS" directories. ISO files are supported.
  2. There is no chaining of TV series episodes or video files. A movie that is split into multiple video files are treated as separate video files. You could use a video utility like ffmpeg or mkvmerge (append feature) to combine multiple video files.
  3. .ts video files are not included as a supported video file extension. This can be changed by add the "ts" extension to a user configuration file variable video_file_exts. See "jamu-example.conf". Again file chaining is not supported.
  4. If you use a customized naming convention for your graphics then DO NOT use Jamu. Jamu conforms to the naming convention used by Mythvideo downloads ("tmdb#.ext" or "imdb#.ext" for movies and "series Season #.ext" for TV series). Your graphic files will be renamed to conform to these standards. This is the only way Jamu can work seamlessly with Mythvideo downloads.
  5. Jamu does not download or deal with screen shot graphics. There has been discussion that screen shot capabilities is going to be added to MythTV.
  6. When there are Storage groups for graphics Jamu will download new graphics to the FIRST graphic storage group per graphic type (cover art, banners and/or Fan art). Jamu does not support any download balancing of graphics.
  7. Jamu does not parse the directory names of a video file for TV series and season information. Jamu will only work with a TV episode whose file name includes a TV series name and season/episode numbers.

Credits

  • The jamu script could not exist without the tvdb_api module written by dbr/Ben. Time and again dbr/Ben has added functionality to accommodate the needs of MythTV. dbr/Ben has another useful script called tvnamer which renames video files to a standard format, tvnamer and tvdb_api can be found at:
    http://wiki.github.com/dbr/tvdb_api/tvnamer
    http://wiki.github.com/dbr/tvdb_api
    You can install tvnamer which will also install a version of tvdb_api without fear of being out of sync with the version of tvdb_api that Jamu uses as they are packaged separately.
  • The script tmdb_api author dbr/Ben was copied and extensively modified. tmdb.py can be found at [3]
  • The routines to select video files was copied and modified from tvnamer.py mentioned above.
  • The interactive console interface for selecting IMDB numbers and TV Series was copied and modified from tvnamer
  • The routine "_save_video_metadata_to_mythdb" has been copied and modified from "find_meta.py" author Pekka Jääskeläinen.
  • The routine "_addCastGenre" was copied and modified from "tvdb-bulk-update.py" by author David Shilvock <davels@telus.net>. Found at http://bitbucket.org/davels/tvdb-bulk-update/
  • Additional scripts are called if specified as secondary data sources e.g. find_poster.py author Pekka Jääskeläinen (gmail: pekka.jaaskelainen)
  • The Graphite theme by Robert McNamara included with MythTV