Tedtalks.py

From MythTV Official Wiki
Jump to: navigation, search

Synopsis

The MythNetvision TedTalks grabber (tedtalks.py) supports a search and creates treeviews of videos from TedTalks media sources (e.g. Ted.com).
User customizations:

  • Select video quality [1]
  • Control the maximum number of items that can be added to directories globally or for a single subdirectory [2]

Country Restrictions

  • No restrictions

Search

The TedTalks search uses the same one found on their Web site.

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 "TedTalks" 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 TedTalks will contain a subdirectory for each available TedTalks show (e.g "Last 6 Months").

Customization

Important.png Note: Customization of this grabber is entirely optional. You only need to customize the grabber if you wish to change the quality of the download file or of the flash link.

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

Select video quality

The shows are split into subdirectories which represent the quality of the download files for the TedTalks. The two options are HD and SD while the flash link can be high, medium or low.

To enable the quality of the download link you must change a "sourceURL" element's "enabled" attribute to 'true'. When you change the attribute to 'true' that source will be added to the TedTalks tree view. Of course you can disable any subdirectory by changing its 'sourceURL' element's 'enabled' attribute to 'false'.

When the TedTalks Tree view is created it will have links to the Flash videos which will playback in a full browser window. If you experience excessive stuttering during playback you may want to reduce the quality level of the Flash video link.

In this example the "Last 6 months: SD" of TedTalks is enabled while the "Last 6 months: HD" of Tedtalks is disabled. Also note that the "parameter" attribute the "flv" quality has been set to "low".

 <subDirectory name="Last 6 months">
   <sourceURL enabled="false" name="Last 6 months: HD" xsltFile="tedtalksRSS_item" type="xml" url="http://feeds.feedburner.com/tedtalksHD" parameter="flv=medium"/>
   <sourceURL enabled="true" name="Last 6 months: SD" xsltFile="tedtalksRSS_item" type="xml" url="http://feeds.feedburner.com/tedtalks_video" parameter="flv=low"/>
 </subDirectory>

Search can also have the quality of the down load file and Flash link set. In this example the search quality level Flash link has been set to "medium" with a HD video down load file.

<search name="TedTalks Search">
 <subDirectory name="TedTalks">
   <sourceURL enabled="true" name="TedTalks HD" xsltFile="tedtalksHTML_item" type="html" url="" parameter="download=HD;flv=medium"/>
   <sourceURL enabled="false" name="TedTalks SD" xsltFile="tedtalksHTML_item" type="html" url="" parameter="download=SD;flv=high"/>
 </subDirectory>
</search>

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 be limited but the "Last 6 months" sub-directory will be specifically restricted to no more than 20 items:

<directory name="TedTalks" globalmax="0">
 <subDirectory name="Last 6 months" max="20">
   <sourceURL enabled="true" name="Last 6 months: HD" xsltFile="tedtalksRSS_item" type="xml" url="http://feeds.feedburner.com/tedtalksHD" parameter="flv=high"/>
   <sourceURL enabled="false" name="Last 6 months: SD" xsltFile="tedtalksRSS_item" type="xml" url="http://feeds.feedburner.com/tedtalks_video" parameter="flv=high"/>
 </subDirectory>
</directory>