MythTV  master
Public Member Functions | Public Attributes | Private Member Functions | List of all members
nv_python_libs.bliptv.bliptv_api.Videos Class Reference
Inheritance diagram for nv_python_libs.bliptv.bliptv_api.Videos:
Inheritance graph
[legend]
Collaboration diagram for nv_python_libs.bliptv.bliptv_api.Videos:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, apikey, mythtv=True, interactive=False, select_first=False, debug=False, custom_ui=None, language=None, search_all_languages=False)
 
def detectUserLocationByIP (self)
 Start - Utility functions. More...
 
def massageDescription (self, text)
 
def textUtf8 (self, text)
 
def ampReplace (self, text)
 
def setTreeViewIcon (self, dir_icon=None)
 
def processVideoUrl (self, url)
 End of Utility functions. More...
 
def searchTitle (self, title, pagenumber, pagelen)
 
def searchForVideos (self, title, pagenumber)
 
def getCategories (self)
 
def displayTreeView (self)
 
def makeURL (self, URL)
 
def getVideos (self, dir_dict, dictionaries)
 
def getVideosForURL (self, url, dictionaries)
 

Public Attributes

 config
 
 mythxml
 
 log_name
 
 log
 
 error_messages
 
 key_translation
 
 tree_order
 
 tree_org
 
 tree_customize
 
 feed_names
 
 feed_icons
 
 categories
 
 treeview
 
 channel_icon
 
 tree_dir_icon
 
 next_page
 
 channel
 
 tree_key
 

Private Member Functions

def _initLogger (self)
 

Detailed Description

Main interface to http://blip.tv/
This is done to support a common naming framework for all python Netvision plugins no matter their site
target.

Supports search and tree view methods
The apikey is a not required to access http://blip.tv/

Definition at line 99 of file bliptv_api.py.

Constructor & Destructor Documentation

◆ __init__()

def nv_python_libs.bliptv.bliptv_api.Videos.__init__ (   self,
  apikey,
  mythtv = True,
  interactive = False,
  select_first = False,
  debug = False,
  custom_ui = None,
  language = None,
  search_all_languages = False 
)
apikey (str/unicode):
    Specify the target site API key. Applications need their own key in some cases

mythtv (True/False):
    When True, the returned meta data is being returned has the key and values massaged to match MythTV
    When False, the returned meta data  is being returned matches what target site returned

interactive (True/False): (This option is not supported by all target site apis)
    When True, uses built-in console UI is used to select the correct show.
    When False, the first search result is used.

select_first (True/False): (This option is not supported currently implemented in any grabbers)
    Automatically selects the first series search result (rather
    than showing the user a list of more than one series).
    Is overridden by interactive = False, or specifying a custom_ui

debug (True/False):
     shows verbose debugging information

custom_ui (xx_ui.BaseUI subclass): (This option is not supported currently implemented in any grabbers)
    A callable subclass of interactive class (overrides interactive option)

language (2 character language abbreviation): (This option is not supported by all target site apis)
    The language of the returned data. Is also the language search
    uses. Default is "en" (English). For full list, run..

search_all_languages (True/False): (This option is not supported by all target site apis)
    By default, a Netvision grabber will only search in the language specified using
    the language option. When this is True, it will search for the
    show in any language

Definition at line 107 of file bliptv_api.py.

Member Function Documentation

◆ detectUserLocationByIP()

def nv_python_libs.bliptv.bliptv_api.Videos.detectUserLocationByIP (   self)

Start - Utility functions.

Get longitude and latitiude to find videos relative to your location. Up to three different
servers will be tried before giving up.
return a dictionary e.g.
{'Latitude': '43.6667', 'Country': 'Canada', 'Longitude': '-79.4167', 'City': 'Toronto'}
return an empty dictionary if there were any errors
Code found at: http://blog.suinova.com/2009/04/from-ip-to-geolocation-country-city.html

Definition at line 257 of file bliptv_api.py.

◆ massageDescription()

def nv_python_libs.bliptv.bliptv_api.Videos.massageDescription (   self,
  text 
)

◆ _initLogger()

def nv_python_libs.bliptv.bliptv_api.Videos._initLogger (   self)
private
Setups a logger using the logging module, returns a log object

Definition at line 350 of file bliptv_api.py.

◆ textUtf8()

def nv_python_libs.bliptv.bliptv_api.Videos.textUtf8 (   self,
  text 
)

◆ ampReplace()

def nv_python_libs.bliptv.bliptv_api.Videos.ampReplace (   self,
  text 
)

◆ setTreeViewIcon()

def nv_python_libs.bliptv.bliptv_api.Videos.setTreeViewIcon (   self,
  dir_icon = None 
)

◆ processVideoUrl()

def nv_python_libs.bliptv.bliptv_api.Videos.processVideoUrl (   self,
  url 
)

◆ searchTitle()

def nv_python_libs.bliptv.bliptv_api.Videos.searchTitle (   self,
  title,
  pagenumber,
  pagelen 
)

◆ searchForVideos()

def nv_python_libs.bliptv.bliptv_api.Videos.searchForVideos (   self,
  title,
  pagenumber 
)
Common name for a video search. Used to interface with MythTV plugin NetVision

Definition at line 519 of file bliptv_api.py.

◆ getCategories()

def nv_python_libs.bliptv.bliptv_api.Videos.getCategories (   self)
Get the list of valid category ids and their name and update the proper dictionaries
return nothing

Definition at line 571 of file bliptv_api.py.

◆ displayTreeView()

def nv_python_libs.bliptv.bliptv_api.Videos.displayTreeView (   self)
Gather the categories/feeds/...etc then retrieve a max page of videos meta data in each of them
return array of directories and their video meta data

Definition at line 627 of file bliptv_api.py.

◆ makeURL()

def nv_python_libs.bliptv.bliptv_api.Videos.makeURL (   self,
  URL 
)

◆ getVideos()

def nv_python_libs.bliptv.bliptv_api.Videos.getVideos (   self,
  dir_dict,
  dictionaries 
)
Parse a list made of categories and retrieve video meta data
return a dictionary of directory names and categories video meta data

Definition at line 681 of file bliptv_api.py.

◆ getVideosForURL()

def nv_python_libs.bliptv.bliptv_api.Videos.getVideosForURL (   self,
  url,
  dictionaries 
)
Get the video meta data for url search
return the video dictionary of directories and their video mata data

Definition at line 712 of file bliptv_api.py.

Referenced by nv_python_libs.youtube.youtube_api.Videos.getVideosForCategory().

Member Data Documentation

◆ config

nv_python_libs.bliptv.bliptv_api.Videos.config

Definition at line 140 of file bliptv_api.py.

Referenced by nv_python_libs.mtv.mtv_api.Videos._initLogger(), nv_python_libs.youtube.youtube_api.Videos._initLogger(), nv_python_libs.bliptv.bliptv_api.Videos._initLogger(), nv_python_libs.dailymotion.dailymotion_api.Videos._initLogger(), nv_python_libs.vimeo.vimeo_api.Videos._initLogger(), nv_python_libs.mainProcess.siteQueries.displayHTML(), nv_python_libs.mainProcess.siteQueries.displayTreeView(), nv_python_libs.mashups.mashups_api.Videos.displayTreeView(), nv_python_libs.hulu.hulu_api.Videos.displayTreeView(), nv_python_libs.thewb.thewb_api.Videos.displayTreeView(), nv_python_libs.rev3.rev3_api.Videos.displayTreeView(), nv_python_libs.dailymotion.dailymotion_api.Videos.displayTreeView(), nv_python_libs.vimeo.vimeo_api.Videos.displayTreeView(), giantbomb.giantbomb_api.gamedbQueries.gameData(), giantbomb.giantbomb_api.gamedbQueries.gameSearch(), nv_python_libs.bliptv.bliptv_api.Videos.getCategories(), nv_python_libs.hulu.hulu_api.Videos.getHuluConfig(), nv_python_libs.mashups.mashups_api.Videos.getMashupsConfig(), nv_python_libs.pbs.pbs_api.Videos.getPBSConfig(), nv_python_libs.rev3.rev3_api.Videos.getRev3Config(), nv_python_libs.youtube.youtube_api.Videos.getSearchResults(), nv_python_libs.tedtalks.tedtalks_api.Videos.getTedTalksConfig(), nv_python_libs.thewb.thewb_api.Videos.getTheWBConfig(), nv_python_libs.mnvsearch.mnvsearch_api.Videos.getTreeviewData(), nv_python_libs.hulu.hulu_api.Videos.getUserPreferences(), nv_python_libs.youtube.youtube_api.Videos.getUserPreferences(), nv_python_libs.rev3.rev3_api.Videos.getUserPreferences(), nv_python_libs.tedtalks.tedtalks_api.Videos.getUserPreferences(), nv_python_libs.pbs.pbs_api.Videos.getUserPreferences(), nv_python_libs.mashups.mashups_api.Videos.getUserPreferences(), nv_python_libs.thewb.thewb_api.Videos.getUserPreferences(), nv_python_libs.youtube.youtube_api.Videos.getVideoCategories(), nv_python_libs.rev3.rev3_api.Videos.getVideoID(), nv_python_libs.mtv.mtv_api.Videos.getVideos(), nv_python_libs.bliptv.bliptv_api.Videos.getVideos(), nv_python_libs.dailymotion.dailymotion_api.Videos.getVideos(), nv_python_libs.vimeo.vimeo_api.Videos.getVideos(), nv_python_libs.dailymotion.dailymotion_api.Videos.getVideosForGroupURL(), nv_python_libs.youtube.youtube_api.Videos.getVideosForURL(), nv_python_libs.mtv.mtv_api.Videos.getVideosForURL(), nv_python_libs.bliptv.bliptv_api.Videos.getVideosForURL(), nv_python_libs.dailymotion.dailymotion_api.Videos.getVideosForURL(), nv_python_libs.mnvsearch.mnvsearch_api.Videos.searchForVideos(), nv_python_libs.mashups.mashups_api.Videos.searchForVideos(), nv_python_libs.tedtalks.tedtalks_api.Videos.searchForVideos(), nv_python_libs.hulu.hulu_api.Videos.searchForVideos(), nv_python_libs.thewb.thewb_api.Videos.searchForVideos(), nv_python_libs.rev3.rev3_api.Videos.searchForVideos(), nv_python_libs.mnvsearch.mnvsearch_api.Videos.searchTitle(), nv_python_libs.hulu.hulu_api.Videos.searchTitle(), nv_python_libs.tedtalks.tedtalks_api.Videos.searchTitle(), nv_python_libs.mtv.mtv_api.Videos.searchTitle(), nv_python_libs.thewb.thewb_api.Videos.searchTitle(), nv_python_libs.bliptv.bliptv_api.Videos.searchTitle(), nv_python_libs.rev3.rev3_api.Videos.searchTitle(), nv_python_libs.dailymotion.dailymotion_api.Videos.searchTitle(), nv_python_libs.pbs.pbs_api.Videos.updatePBS(), nv_python_libs.rev3.rev3_api.Videos.updateRev3(), nv_python_libs.tedtalks.tedtalks_api.Videos.updateTedTalks(), nv_python_libs.thewb.thewb_api.Videos.updateTheWB(), and nv_python_libs.mtv.mtv_api.Videos.videoDetails().

◆ mythxml

nv_python_libs.bliptv.bliptv_api.Videos.mythxml

◆ log_name

nv_python_libs.bliptv.bliptv_api.Videos.log_name

◆ log

nv_python_libs.bliptv.bliptv_api.Videos.log

Definition at line 151 of file bliptv_api.py.

◆ error_messages

nv_python_libs.bliptv.bliptv_api.Videos.error_messages

Definition at line 164 of file bliptv_api.py.

Referenced by nv_python_libs.mashups.mashups_api.Videos.displayTreeView(), nv_python_libs.hulu.hulu_api.Videos.displayTreeView(), nv_python_libs.thewb.thewb_api.Videos.displayTreeView(), nv_python_libs.rev3.rev3_api.Videos.displayTreeView(), nv_python_libs.vimeo.vimeo_api.Videos.displayTreeView(), nv_python_libs.bliptv.bliptv_api.Videos.getCategories(), nv_python_libs.hulu.hulu_api.Videos.getHuluConfig(), nv_python_libs.mashups.mashups_api.Videos.getMashupsConfig(), nv_python_libs.pbs.pbs_api.Videos.getPBSConfig(), nv_python_libs.rev3.rev3_api.Videos.getRev3Config(), nv_python_libs.youtube.youtube_api.Videos.getSearchResults(), nv_python_libs.tedtalks.tedtalks_api.Videos.getTedTalksConfig(), nv_python_libs.thewb.thewb_api.Videos.getTheWBConfig(), nv_python_libs.vimeo.vimeo_api.Videos.getTreeVideos(), nv_python_libs.youtube.youtube_api.Videos.getVideoCategories(), nv_python_libs.youtube.youtube_api.Videos.getVideoDetails(), nv_python_libs.dailymotion.dailymotion_api.Videos.getVideosForGroupURL(), nv_python_libs.youtube.youtube_api.Videos.getVideosForURL(), nv_python_libs.mtv.mtv_api.Videos.getVideosForURL(), nv_python_libs.bliptv.bliptv_api.Videos.getVideosForURL(), nv_python_libs.dailymotion.dailymotion_api.Videos.getVideosForURL(), nv_python_libs.mashups.mashups_api.Videos.searchForVideos(), nv_python_libs.tedtalks.tedtalks_api.Videos.searchForVideos(), nv_python_libs.hulu.hulu_api.Videos.searchForVideos(), nv_python_libs.thewb.thewb_api.Videos.searchForVideos(), nv_python_libs.bliptv.bliptv_api.Videos.searchForVideos(), nv_python_libs.rev3.rev3_api.Videos.searchForVideos(), nv_python_libs.mnvsearch.mnvsearch_api.Videos.searchTitle(), nv_python_libs.hulu.hulu_api.Videos.searchTitle(), nv_python_libs.tedtalks.tedtalks_api.Videos.searchTitle(), nv_python_libs.mtv.mtv_api.Videos.searchTitle(), nv_python_libs.thewb.thewb_api.Videos.searchTitle(), nv_python_libs.bliptv.bliptv_api.Videos.searchTitle(), nv_python_libs.rev3.rev3_api.Videos.searchTitle(), nv_python_libs.vimeo.vimeo_api.Videos.searchTitle(), nv_python_libs.pbs.pbs_api.Videos.updatePBS(), nv_python_libs.rev3.rev3_api.Videos.updateRev3(), nv_python_libs.tedtalks.tedtalks_api.Videos.updateTedTalks(), nv_python_libs.thewb.thewb_api.Videos.updateTheWB(), and nv_python_libs.mtv.mtv_api.Videos.videoDetails().

◆ key_translation

nv_python_libs.bliptv.bliptv_api.Videos.key_translation

◆ tree_order

nv_python_libs.bliptv.bliptv_api.Videos.tree_order

◆ tree_org

nv_python_libs.bliptv.bliptv_api.Videos.tree_org

◆ tree_customize

nv_python_libs.bliptv.bliptv_api.Videos.tree_customize

◆ feed_names

nv_python_libs.bliptv.bliptv_api.Videos.feed_names

◆ feed_icons

nv_python_libs.bliptv.bliptv_api.Videos.feed_icons

◆ categories

nv_python_libs.bliptv.bliptv_api.Videos.categories

Definition at line 236 of file bliptv_api.py.

Referenced by nv_python_libs.bliptv.bliptv_api.Videos.getVideos().

◆ treeview

nv_python_libs.bliptv.bliptv_api.Videos.treeview

◆ channel_icon

nv_python_libs.bliptv.bliptv_api.Videos.channel_icon

◆ tree_dir_icon

nv_python_libs.bliptv.bliptv_api.Videos.tree_dir_icon

Definition at line 392 of file bliptv_api.py.

◆ next_page

nv_python_libs.bliptv.bliptv_api.Videos.next_page

◆ channel

nv_python_libs.bliptv.bliptv_api.Videos.channel

◆ tree_key

nv_python_libs.bliptv.bliptv_api.Videos.tree_key

The documentation for this class was generated from the following file: