Init
The module object contains several function, the init function is a native python function that is automatically loaded when the object is initiated. For the BartsideeTV Framework it contains some basic variables that will tell the framework how to handle functions in the module. The fixed variables (from the template) should be present in the init function to make to module work probably. Important to notice is that the init variables are global and can be called from anywhere in the module script.
I will try to explain a bit more what the variables are for:
-
self.name = "Module Name"
…will state the module name.
Please do not use special characters, but spaces and capital letters are allowed.
-
self.type = [‘search’,‘genre’,‘list’]
…will tell the framework which functions in the module are available.
There are 3 possible options to choose from:
search: This will add a dynamic search option to the module
list: This will add a static list option to the module
genre: This will add a static list option with genres to the module
Please note that the ‘search’ type is only for dynamic searching. In this case you directly scrape the search results from a webpage. If you have a static list of streams a search option will be automatically added and you will only need the ‘list’ type.
If you enable a type by putting it in the variable you must be sure to also script to appropriate module function named by the same name. So if you at the ‘list’ type be sure to script also the self.List() function
-
self.episode = True
…[True/False]when set to true it will open the episode window after selecting a stream.
Stream variables are passed to the self.Episode() function.
When using live tv streams please turn this option off.
-
self.filter = []
…will add a filter option to the genre section.
Add string variables in array formation here like ['channel1', 'channel2'] etc. You have to make sure you add a specific filter to the genre stream list to make sure it is working
-
self.genre = []
…will add the main genres to the genre functions.
Add string variables in array formation here like ['drama', 'action'] etc. The genre parameter is forwarded to the genre function so you can scrape the correct list for a specific genre.
-
self.content_type = ‘video/x-ms-asf’
…will give the boxee player information about the content to be played, Please use a correct mime type.
When you use the flash mime type ‘video/x-flv’ the stream will be opened in the boxee browser.
-
self.country = ‘UK’
.. will give the user information regarding to module and stream origin. If the streams are not available for him in his country he can easily disable it.
You can add custom global variables or specific function to be initiated on load after the framework variables
Didn't find any related posts :(
bartsidee
nl