Difference between revisions of "Trailers.py"

From MythTV Official Wiki
Jump to: navigation, search
(Initialization steps)
Line 13: Line 13:
  
 
=== Customization ===
 
=== Customization ===
 +
{{Note box|Customization of this grabber is entirely optional.  You only need to customize the grabber if you wish to change which items appear in the tree.}}
 
When you updated the treeview in Initialization step #2 a user configuration file was created at:<br>
 
When you updated the treeview in Initialization step #2 a user configuration file was created at:<br>
 
"~/.mythtv/MythNetvision/userGrabberPrefs/trailersMashup.xml". To customize the Treeview open the "trailersMashup.xml" file with a text editor and make changes according to the instructions below. After you have made your changes and saved the "trailersMashup.xml" file, update your subscriptions again (Initialization step #2).
 
"~/.mythtv/MythNetvision/userGrabberPrefs/trailersMashup.xml". To customize the Treeview open the "trailersMashup.xml" file with a text editor and make changes according to the instructions below. After you have made your changes and saved the "trailersMashup.xml" file, update your subscriptions again (Initialization step #2).

Revision as of 16:11, 30 May 2010

Synopsis

The MythNetvision Trailers Mashup grabber (trailers.py) creates treeviews of items from various Movie Trailer sources (e.g. Tribute.ca).
Treeview user customizations:

  • Enable or Disable sources [1]
  • Control the maximum number of items that can be added to directories globally or for a single directory [2]

Country Restrictions

  • Videos can be played in any country

Treeview Customization Instructions

Initialization steps

  1. You need to enable this treeview from the Media Library menu, select the Browse Internet Video menu option and press MENU (M). Select Scan/Manage Subscriptions, then Manage Site Subscriptions. Now subscribe to the "Trailers" grabber.
  2. You will need to download the treeview. To do so, select MENU (M). Select Scan/Manage Subscriptions, then Update Site Maps. The update process can take several minutes. Once this is complete the Trailers Mashup will contain the a directory for each source (e.g "CinemaRV.com"). These are not necessarily the sources you want but have just been enabled to provide you something to view until you specify your preferences.

Customization

Important.png Note: Customization of this grabber is entirely optional. You only need to customize the grabber if you wish to change which items appear in the tree.

When you updated the treeview in Initialization step #2 a user configuration file was created at:
"~/.mythtv/MythNetvision/userGrabberPrefs/trailersMashup.xml". To customize the Treeview open the "trailersMashup.xml" file with a text editor and make changes according to the instructions below. After you have made your changes and saved the "trailersMashup.xml" file, update your subscriptions again (Initialization step #2).

Enable or Disable sources

The sources are split into subdirectories which represent a Trailers Mashup source. To enable or disable a source you must change a "sourceURL" element's "enabled" attribute to 'true' to enable or 'false' to disable. Of course you can disable any subdirectory by changing all of its "sourceURL" element's "enabled" attribute to 'false'.

In this example the "TrailerAddict.com" subdirectory has "Movie Trailers" enabled but "Movie Clips" is disabled.

<subDirectory name="TrailerAddict.com">
   <sourceURL enabled="true" name="Movie Trailers"  xsltFile="traileraddictRSS_item" type="xml" url="http://www.traileraddict.com/rss"/>
   <sourceURL enabled="false" name="Movie Clips"  xsltFile="traileraddictRSS_item" type="xml" url="http://www.traileraddict.com/clipsrss"/>
</subDirectory>

Controlling the number of items included in a subdirectory

You can optionally control the number of items added to a subdirectory through two attributes:

  • "globalmax" - Limits the number of items included for all subdirectories. A value of zero (0) means there are no limits.
  • "max" - Limits the number of items included for an individual subdirectory. This value will override the "globalmax" setting. A value of zero (0) means there are no limits.

In this example any "subDirectory" without their own maximum setting will not exceed 25 items but the "TrailerAddict.com" subdirectory will be specifically restricted to no more than 5 items:

<directory name="Movie Trailers" globalmax="25">
 <subDirectory name="TrailerAddict.com" max="5">
   <sourceURL enabled="true" name="Movie Trailers"  xsltFile="traileraddictRSS_item" type="xml" url="http://www.traileraddict.com/rss"/>
   <sourceURL enabled="true" name="Movie Clips"  xsltFile="traileraddictRSS_item" type="xml" url="http://www.traileraddict.com/clipsrss"/>
 </subDirectory>
<directory