Difference between revisions of "Nature.py"

From MythTV Official Wiki
Jump to: navigation, search
(Initialization steps)
(Country Restrictions)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
== Synopsis  ==
 
== Synopsis  ==
The MythNetvision Nature Mashup grabber (nature.py) creates treeviews of videos from various Nature media sources (e.g. [http://www.earth-touch.com/ Earth-Touch.com]).<br>
+
The MythNetvision Nature Mashup grabber (nature.py) supports a Nature search and creates treeviews of videos from various Nature media sources (e.g. [http://www.earth-touch.com/ Earth-Touch.com]).<br>
 
Treeview user customizations:
 
Treeview user customizations:
 
*Enable shows and select the download file size [[Nature.py#Enable shows and their video quality level | [1]]]
 
*Enable shows and select the download file size [[Nature.py#Enable shows and their video quality level | [1]]]
Line 7: Line 7:
 
== Country Restrictions ==
 
== Country Restrictions ==
 
*Videos can be played in any country
 
*Videos can be played in any country
 +
 +
== Search ==
 +
The Nature search restricts its search to the items in Nature treeview. If you do not subscribe to the Nature Treeview you will not get any results from this search. There are a large number of items returned in the Nature treeview so this search makes finding videos on a specific Nature topic convenient.
  
 
== Treeview Customization Instructions ==
 
== Treeview Customization Instructions ==
Line 14: Line 17:
  
 
=== 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/natureMashup.xml". To customize the Treeview open the "natureMashup.xml" file with a text editor and make changes according to the instructions below. After you have made your changes and saved the "natureMashup.xml" file, update your subscriptions again (Initialization step #2).
 
"~/.mythtv/MythNetvision/userGrabberPrefs/natureMashup.xml". To customize the Treeview open the "natureMashup.xml" file with a text editor and make changes according to the instructions below. After you have made your changes and saved the "natureMashup.xml" file, update your subscriptions again (Initialization step #2).
Line 39: Line 43:
 
   </subDirectory>
 
   </subDirectory>
 
  <directory
 
  <directory
[[Category:MythNetvision]]
+
 
 +
[[Category:MythNetvision_Grabber_Scripts]]

Latest revision as of 18:42, 10 June 2010

Synopsis

The MythNetvision Nature Mashup grabber (nature.py) supports a Nature search and creates treeviews of videos from various Nature media sources (e.g. Earth-Touch.com).
Treeview user customizations:

  • Enable shows and select the download file size [1]
  • Control the maximum number of items that can be added to directories globally or for a single subdirectory [2]

Country Restrictions

  • Videos can be played in any country

Search

The Nature search restricts its search to the items in Nature treeview. If you do not subscribe to the Nature Treeview you will not get any results from this search. There are a large number of items returned in the Nature treeview so this search makes finding videos on a specific Nature topic convenient.

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 "Nature" 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 Nature Mashup will contain a subdirectory for each show (e.g "Moremi Lions Channel"). These are not necessarily the shows 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/natureMashup.xml". To customize the Treeview open the "natureMashup.xml" file with a text editor and make changes according to the instructions below. After you have made your changes and saved the "natureMashup.xml" file, update your subscriptions again (Initialization step #2).

Enable shows and their video quality level

The shows are split into subdirectories which represent how Nature Mashup categorizes the videos. Each sub-directory has one or more downloadable file formats. The formats represent various video quality levels.

To enable a downloadable file format you must change a "sourceURL" element's "enabled" attribute to 'true'. When you change the attribute to 'true' that downloadable file format will be added to the Nature Mashup tree view. You could activate more than one format but that would result in duplicates. Of course you can disable any subdirectory by changing all of its 'sourceURL' element's 'enabled' attribute to 'false'.

When the Nature Mashup Tree view is created it will have links to the video's web page but also a link to a file that you can download through the MythNetvision interface.

In this example the "Wildlife Highlights, short version" subdirectory has its "480p" file size enabled.

<subDirectory name="Wildlife Highlights, short version">
   <sourceURL enabled="false" name="720p"  xsltFile="earthtouchRSS_item" type="xml" url="http://feeds.feedburner.com/earth-touch_podcast_720p?format=xml"/>
   <sourceURL enabled="true" name="480p"  xsltFile="earthtouchRSS_item" type="xml" url="http://feeds.feedburner.com/earth-touch_podcast_480p?format=xml"/>
   <sourceURL enabled="false" name="iPod"  xsltFile="earthtouchRSS_item" type="xml" url="http://feeds.feedburner.com/earth-touch_podcast_ipod?format=xml"/>
</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 "Moremi Lions Channel" sub-directory will be specifically restricted to no more than 5 items:

<directory name="Earth-Touch" globalmax="25">
 <subDirectory name="Moremi Lions Channel" max="5">
   <sourceURL enabled="true" name="720p"  xsltFile="earthtouchRSS_item" type="xml" url="http://feeds.feedburner.com/moremi_podcast_720?format=xml"/>
   <sourceURL enabled="false" name="iPod"  xsltFile="earthtouchRSS_item" type="xml" url="http://feeds.feedburner.com/moremi_podcast_ipod?format=xml"/>
 </subDirectory>
<directory