Bbciplayer.py

From MythTV Official Wiki
(Redirected from MNV BBCiPlayer)
Jump to: navigation, search

Synopsis

The MythNetvision BBC iPlayer grabber (bbciplayer.py) searches and creates treeviews of the http://www.bbc.co.uk/iplayersite. Content includes both video and audio streams.
Treeview user customizations:

  • Specify the type of link used by MythBrowser to display BBC iPlayer video or audio content [1]
  • Disable any of the standard RSS feeds [2]
  • Add search terms whose results become their own directory [3]
  • Add specific iPlayer RSS feeds that become their own directory [4]
  • Control the maximum number of items that can be added to directories globally or for a single directory [5]

Country Restrictions

  • Audio can be played in any country
  • Video can only be played in the UK

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 "BBC iPlayer" 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 BBC iPlayer will contain the standard RSS feeds (e.g. "TV Highlights").

Customization

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

MythBrowser display

You can choose the type of display that is seen in MythBrowser by altering the value of the "displayURL" element. The values can be:

  • "fullscreen" - Displays the video MythBrowser full web page. This is the default setting. Of all the link types this one has the largest playback video display.
  • "bbcweb" - Displays the web page that you would see if you surfed the BBC iPlayer web site.
  • "bigscreen" - Displays a web page that supports game consoles like the Wii and PS3. The video window is the smallest but the screen is less cluttered than the Web page and has larger buttons and controls.

Example of the Web page ("bbcweb") display:

   <displayURL>bbcweb</displayURL>

Adding your own search terms

You can have one or more specific search terms that will be presented as individual directories in your BBC tree view. With each search you need a "dirName" and the "searchTerm". Use the BBC's regular web page search to verify that your search term actually produces results. The BBC search is at the top of this web page: BBC iPlayer Search.
Here are two example search terms. which are included but commented out in your "bbciplayer.xml" file.

<userSearchStrings>
   <userSearch>
       <dirName>Doctor Who Episodes</dirName>
       <searchTerm>Doctor Who</searchTerm>
   </userSearch>
   <userSearch>
       <dirName>Eastenders Episodes</dirName>
       <searchTerm>Eastenders</searchTerm>
   </userSearch>
</userSearchStrings>

Adding specific RSS feeds

You can have one or more specific RSS Feed URL(s) that will be presented as individual directories in your BBC tree view. With each RSS URL you need a "name" and the "url". Use the BBC feed selection web page to select a specific RSS URL. Cut and paste the URL text as the "url" (bottom of the "All feeds" web page). The BBC "All feeds" selection page is at: BBC "All feeds" Make sure you click on the "All feeds" tab.
Here are example RSS feeds, which are included but commented out in your "bbciplayer.xml" file.

<userFeeds>
   <url name="Children's Drama">http://feeds.bbc.co.uk/iplayer/categories/childrens/drama/tv/list</url>
   <url name="Most Popular Comedy">http://feeds.bbc.co.uk/iplayer/categories/comedy/tv/popular</url>
</userFeeds>

Disabling the standard RSS feeds

You can disable the display of specific standard RSS feeds by changing the "enabled" attribute to "false". Here is an example of a disabled RSS feed:

<treeviewURLS globalmax="0">
   <url enabled="false">http://feeds.bbc.co.uk/iplayer/highlights/tv</url>
   ...
</treeviewURLS>

Controlling the number of items included in an RSS feed directory

Some of the RSS feeds return a large number of video/audio items (e.g. Cbeebies over 200 items). You can optionally control both the standard RSS feeds and RSS feeds you added through two attributes:

  • "globalmax" - Limits the number of items included per RSS feed for all "treeviewURLS" or "userFeeds" RSS feeds. A value of zero (0) means there are no limits.
  • "max" - Limits the number of items included for an individual RSS feed. This value will override the "globalmax" setting. A value of zero (0) means there are no limits.

In this example any "userFeeds" without their own maximum setting will not exceed 25 items but the "Children's Drama" feed will be specifically restricted to no more than 5 items:

<userFeeds globalmax="25">
   <url max="5" name="Children's Drama">http://feeds.bbc.co.uk/iplayer/categories/childrens/drama/tv/list</url>
</userFeeds>