2007-08-15, 08:56
here u go da funks its in a .zip http://files.filefront.com/uitzendinggem...einfo.html
dafunks Wrote:Thanks for saying you will do zip/rar versions in the future.
But can anyone rezip a new version for me as I am dieing to use this but as i have no windows computer i cant
TheBoxMan Wrote:Actually on using the script I have a potential bug to report.
I am finding, intermittently, that sometimes I am unable to exit the script. The script remains responsive to moving around the current catagory, although will not change catagories. On pressing the thumb sticks still work - either taking a screenshot or bringing up the menu with the shutdown (which might have let me escape from it if I actually had some favourates set but since I don't I don't know).
This bug has cropped up several times recently and the only way I can find to exit it when this happens is restarting my xbox.
Wish I had more info I could give you on it :/
TheBoxMan Wrote:Actually on using the script I have a potential bug to report.
I am finding, intermittently, that sometimes I am unable to exit the script. The script remains responsive to moving around the current catagory, although will not change catagories. On pressing the thumb sticks still work - either taking a screenshot or bringing up the menu with the shutdown (which might have let me escape from it if I actually had some favourates set but since I don't I don't know).
This bug has cropped up several times recently and the only way I can find to exit it when this happens is restarting my xbox.
Wish I had more info I could give you on it :/
Basje Wrote:This is a know issue and is related to the absence of Multithreading in XBMC. The script seems to be unresponsive, but is in fact handling 2 url's at the same time. I am working on a work around, but the problem is that it is not reproducable on the XBMC_PC version.
Quote:So please be patient and in the mean time, use pageup-pagedown instead of scrolling through the lists one by one.
realjobe Wrote:have anyone tested the uitzendinggemist newest version that have TV-links support? I
Bigfoot87 Wrote:Yes I did, it works fine. But you have to be really patient and wait until all data had been loaded.
dominater01 Wrote:here u go da funks its in a .zip http://files.filefront.com/uitzendinggem...einfo.html
#===============================================================================
# Import the default modules
#===============================================================================
import xbmc, xbmcgui
import re, sys, os
#===============================================================================
# Make global object available
#===============================================================================
import common
import config
import controls
import contextmenu
import chn_class
logFile = sys.modules['__main__'].globalLogFile
uriHandler = sys.modules['__main__'].globalUriHandler
#===============================================================================
# register the channels
#===============================================================================
register = sys.modules['progwindow']
#register.channelButtonRegister.append(108)
register.channelRegister.append('chn_ps.Channel("uzg-channelwindow.xml", config.rootDir, config.skinFolder, channelCode="ps")')
#===============================================================================
# main Channel Class
#===============================================================================
class Channel(chn_class.Channel):
"""
main class from which all channels inherit
"""
#===============================================================================
def InitialiseVariables(self):
"""
Used for the initialisation of user defined parameters. All should be
present, but can be adjusted
"""
# call base function first to ensure all variables are there
chn_class.Channel.InitialiseVariables(self)
self.contextMenuEnabled = True
self.icon = "psthumb.png"
self.iconLarge = "pslarge.png"
self.noImage = "psimage.png"
self.channelName = "Pronshare.com"
self.moduleName = "chn_ps.py"
self.maxXotVersion = "2.7.0b4"
self.initialUri = "http://pronshare.com"
self.baseUrl = "http://pronshare.com"
self.requiresLogon = False
self.episodeItemRegex = '<a href="([^"]+)">([^<]+)\(\d+\)</a>' # used for the ParseMainList
self.videoItemRegex = '<a href="/Watch\.aspx\?id=\w+-\w+-\w+-\w+-\w+">([^>]+)</a>' # used for the CreateVideoItem
self.folderItemRegex = '<a href="/Category\.aspx\?id=\w+-\w+-\w+-\w+-\w+">([^>]+)</a>' # used for the CreateFolderItem
self.mediaUrlRegex = '<param name="src" value="([^"]+)" />' # used for the UpdateVideoItem
#==========================================================================
# non standard items
return True
#==============================================================================
# ContextMenu functions
#==============================================================================
def onActionFromContextMenu(self):
"""
Using of the ContextMenu. It is called
"""
if not self.contextMenuEnabled:
return None
_position = self.getCurrentListPosition()
_item = self.listItems[_position]
if not _item.type == "video":
logFile.warning("Cannot show contextmenu for folder")
return None
# build menuitems
_menuItems = ("Download Item","Play using Mplayer","Play using DVDPlayer")
_contextMenu = contextmenu.GUI(config.contextMenuSkin, config.rootDir, config.skinFolder, parent=self.getFocus(), menuItems = _menuItems)
_selectedItem = _contextMenu.selectedItem
del _contextMenu
# handle function from items
if ( _selectedItem is not None ):
logFile.debug("Selection from menu was %s", _selectedItem)
if _selectedItem == 1:
self.listItems[_position] = self.DownloadEpisode(_item)
elif _selectedItem == 2:
self.PlayVideoItem(_item)
elif _selectedItem == 3:
self.PlayVideoItem(_item,"dvdplayer")
return None
#==============================================================================
def CreateEpisodeItem(self, resultSet):
"""
Accepts an arraylist of results. It returns an item.
"""
#logFile.debug('starting CreateEpisodeItem for %s', self.channelName)
# dummy class
_item = common.clistItem(resultSet[1], self.baseUrl + resultSet[0])
_item.icon = self.folderIcon
_item.complete = True
return _item
#==============================================================================
def PreProcessFolderList(self, data):
"""
Accepts an data from the ProcessFolderList Methode, BEFORE the items are
processed. Allows setting of parameters (like title etc). No return value!
"""
_items = []
#description
_matches = common.DoRegexFindAll('/ <a href="([^"]+)">([^<]+)</a>', data)
#initialise description
if len(self.folderHistory) == 1:
self.progTitle = _matches[0][1]
logFile.debug("ProgramTitle = %s", self.progTitle)
self.folderHistory[0].description = self.progTitle
# now remove everything above the sidebar HTML to prevent problems with new
# links on the site
data = common.DoRegexFindAll('<div id="body-sidebar">(([\n\r]|.)*)', data)
if len(data)>0:
if len(data[0])>0:
data = data[0][0]
return (data, _items)
#==============================================================================
def CreateFolderItem(self, resultSet):
"""
Accepts an arraylist of results. It returns an item.
"""
#logFile.debug('starting CreateFolderItem for %s', self.channelName)
item = common.clistItem(resultSet[4], self.baseUrl + resultSet[0]+resultSet[1]+resultSet[2])
item.description = "%s\n%s" % (self.folderHistory[-1].description, item.name)
item.icon = self.folderIcon
item.thumb = self.noImage
item.type = 'folder'
item.complete = True
return item
#=============================================================================
def CreateVideoItem(self, resultSet):
"""
Accepts an arraylist of results. It returns an item.
"""
#logFile.debug('starting CreateVideoItem for %s', self.channelName)
item = common.clistItem(resultSet[4], self.baseUrl + resultSet[0]+resultSet[1]+resultSet[2])
item.description = "%s\n%s" % (self.folderHistory[-1].description, item.name)
item.icon = self.icon
item.thumb = self.noImage
item.type = 'video'
# getting the URL is part of the PlayVideo
item.complete = False
return item
#==============================================================================
def DownloadEpisode(self, item):
#check if data is already present and if video or folder
if item.type == 'folder':
logFile.warning("Cannot download a folder")
elif item.type == 'video':
if item.complete == False:
logFile.info("Fetching MediaUrl for VideoItem")
item = self.UpdateVideoItem(item)
_destFilename = item.name + ".divx"
if item.mediaurl=="":
logFile.error("Cannot determine mediaurl")
return item
logFile.info("Going to download %s", _destFilename)
_downLoader = uriHandler.Download(item.mediaurl, _destFilename)
item.downloaded = True
return item
else:
logFile.warning('Error determining folder/video type of selected item');
20070821 04:31:29 - CRITICAL - logger.py - 163 - | Traceback (most recent call last):
20070821 04:31:29 - CRITICAL - logger.py - 163 - | File "Q:\scripts\XOT\libs\chn_class.py", line 160, in onInit
20070821 04:31:29 - CRITICAL - logger.py - 163 - | self.listItems = self.ProcessFolderList(self.initialUri)
20070821 04:31:29 - CRITICAL - logger.py - 163 - | File "Q:\scripts\XOT\libs\chn_class.py", line 426, in ProcessFolderList
20070821 04:31:29 - CRITICAL - logger.py - 163 - | (_data, _preItems) = self.PreProcessFolderList(_data)
20070821 04:31:29 - CRITICAL - logger.py - 163 - | File "Q:\scripts\XOT\channels\ps\chn_ps.py", line 128, in PreProcessFolderList
20070821 04:31:29 - CRITICAL - logger.py - 163 - | self.progTitle = _matches[0][1]
20070821 04:31:29 - CRITICAL - logger.py - 163 - | IndexError: list index out of range
dominater01 Wrote:http://www.zshare.net/download/32329509267293/ there u go da funks