Technology.py

From MythTV Official Wiki
Revision as of 16:04, 4 July 2010 by Rdv (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Synopsis

The MythNetvision Technology Mashup grabber (technology.py) supports a search and creates treeviews of videos from various technology media sources (e.g. CNet).
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 Technology search restricts its scope to the items in Technology treeview. If you do not subscribe to the Technology Treeview you will not see this search when subscribing. There are a large number of items returned in the Technology treeview so this search makes finding videos on a specific Technology 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 "Technology" 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 Technology Mashup will contain a subdirectory for each show (e.g "CNET News"). 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/technologyMashup.xml". To customize the Treeview open the "technologyMashup.xml" file with a text editor and make changes according to the instructions below. After you have made your changes and saved the "technologyMashup.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 Technology Mashup categorizes the videos. Some 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 Technology 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 Technology 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 "CNET News" subdirectory has its "HD" file size enabled.

<subDirectory name="CNET News">
   <sourceURL enabled="true" name="CNET News HD" xsltFile="cnetRSS_item" type="xml" url="http://feeds.feedburner.com/cnet/cnetnewshd?format=xml"/>
   <sourceURL enabled="false" name="CNET News SD" xsltFile="cnetRSS_item" type="xml" url="http://feeds.feedburner.com/cnet/news?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 "Prizefight" sub-directory will be specifically restricted to no more than 5 items:

<directory name="CNet" globalmax="25">
 <subDirectory name="CNET News">
   <sourceURL enabled="true" name="CNET News HD" xsltFile="cnetRSS_item" type="xml" url="http://feeds.feedburner.com/cnet/cnetnewshd?format=xml"/>
   <sourceURL enabled="false" name="CNET News SD" xsltFile="cnetRSS_item" type="xml" url="http://feeds.feedburner.com/cnet/news?format=xml"/>
 </subDirectory>
 <subDirectory name="Prizefight" max="5">
   <sourceURL enabled="true" name="Prizefight HD" xsltFile="cnetRSS_item" type="xml" url="http://feeds2.feedburner.com/cnet/prizefighthd?format=xml"/>
   <sourceURL enabled="false" name="Prizefight SD" xsltFile="cnetRSS_item" type="xml" url="http://feeds.feedburner.com/cnet/prizefight?format=xml"/>
 </subDirectory>
<directory