Comedycentral.py

From MythTV Official Wiki
Revision as of 20:05, 8 May 2012 by Chadparry (Talk | contribs)

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

Synopsis

The MythNetvision Comedy Central grabber (comedycentral.py) supports a treeview of recent videos from various Comedy Central shows (e.g. Colbert Nation).
Treeview user customizations:

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

Alternatives

The Comedy Central feeds don't always contain entire episodes, and that means that they aren't available through this grabber. One alternative for watching Comedy Central full episodes is to use Firefox. See the instructions at AmazonVideo.

Country Restrictions

  • These videos are all restricted to the US only

Search

The Comedy Central Terms of Service (TOS) does not allow the kind of processing which supports a search. Hopefully this will change in the future. All of the treeview sources are RSS feeds.

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 "Comedy Central" 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 Comedy Central will contain a subdirectory for each available Comedy Central show (e.g "The Daily Show"). These are not necessarily the shows you want but have 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/comedycentralMashup.xml". To customize the Treeview open the "comedycentralMashup.xml" file with a text editor and make changes according to the instructions below. After you have made your changes and saved the "comedycentralMashup.xml" file, update your subscriptions again (Initialization step #2).

Enable/Disable shows

The shows are split into subdirectories which represent the Comedy Central shows.

To enable a show 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 Comedy Central treeview. Of course you can disable any subdirectory by changing its 'sourceURL' element's 'enabled' attribute to 'false'.

When the Comedy Central Tree view is created it will have links to the Flash videos which will playback in a full browser window.

In this example the "Stand-Up" show is enabled while the "Indescision" show is disabled.

 <subDirectory name="Stand-Up">
   <sourceURL enabled="true" name="Stand-Up" xsltFile="comedycentralRSS_item" type="xml" url="http://www.comedycentral.com/rss/standupvideos.jhtml" parameter="http://www.comedycentral.com/images/shows/russell_simmons/hp_graphics/simmons_106_r4.jpg"/>
 </subDirectory>
 <subDirectory name="Indescision">
   <sourceURL enabled="false" name="Recent Shows" xsltFile="comedycentralRSS_item" type="xml" url="http://www.comedycentral.com/rss/indecisionvideos.jhtml" parameter="%SHAREDIR%/mythnetvision/icons/comedycentral.png"/>
 </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 "South Park" sub-directory will be specifically restricted to no more than 5 items:

<directory name="Comedy Central" globalmax="25">
 <subDirectory name="Colbert Report">
   <sourceURL enabled="true" name="Colbert Report" xsltFile="comedycentralRSS_item" type="xml" url="http://www.comedycentral.com/rss/colbertvideos.jhtml" parameter="http://www.comedycentral.com/comedycentral/sitewide/images/promos/affliates/showfeed_colbertnation2.jpg"/>
 </subDirectory>
 <subDirectory name="South Park" max="5">
   <sourceURL enabled="true" name="South Park" xsltFile="comedycentralRSS_item" type="xml" url="http://www.comedycentral.com/rss/southparkvideos.jhtml" parameter="http://www.comedycentral.com/comedycentral/sitewide/images/promos/affliates/showfeed_southpark.jpg"/>
 </subDirectory>
<directory