Mar
10
Adult channel collection for XOT-UZG
Written by
jane
It's not much yet, but in the words of Dave Gorman, "Two's a collection!"
We currently have RedTube and PronShare (which has been fixed to work with v2.7.0b5) channels created for use with the XOT Framework. These channels are *not* affiliated with the XOT-UZG script, nor will they be supported by its makers. The makers of XOT-UZG are also not responsible for any content on these (or any) channels.
In other words, don't go crying to Bas if you catch your eight-year-old son watching something he oughtn't be. Or me, for that matter. If they're not looking at it on the Xbox, they're looking at it on their computer.
Anyhow, on with the show, I suppose.
Click here (http://ownedgear.com/XOT-TSV.zip) to get the latest version of the XOT-UZG adult videos. The "TSV" stands for "Top Shelf Videos". Don't know if I'll keep that name for the collection or not, but for now, I like it.
To use these, you must first install the latest version of XOT-UZG (http://code.google.com/p/xot-uzg/) (or Uitzendinggemist, as it likes to be called). Once installed, extract the contents XOT-TSV.zip file into the "Channels" folder of your Uitzendinggemist script. That's it! Icons for both should then show up in your main XOT-UZG window.
If anybody wants to contribute an adult channel, I'd suggest posting your intentions here, so that multiple people aren't working on the same site. If you want to contribute a family-friendly channel, you should probably post in the Uitzendinggemist thread, and maybe PM basje once you're done, so he can add it to the package.
Enjoy!
Sorry to be so newb, but I am trying to study up on scripting.
I loaded the script in my XBMC scripts folder and it does show the script name, but when I select it nothing happens.
What steps should I use to troubleshoot this?
congratulations on your fantastic work so far,
many thanks :)
having trouble with playing some of the files though - only some work on PS and nearly all of the ones on RedTube only last for 10 seconds... not sure if it's just bad karma though - will try again later.
Also, I made DVDPlayer the default player for PronShare, so that you can skip ahead in videos. (I'm sure I didn't do it the best way, but hey, I don't exactly know what I'm doing, here. Just poking around til things work).
I run uzg version 2.7.0 FINAL.
I have upload the pronshare and redtube to the channel directory but they dont be displayed into uzg.
Is there any update for version 2.7.0 FINAL?
http://ownedgear.com/XOT-TSV.zip
I run uzg version 2.7.0 FINAL.
I have upload the pronshare and redtube to the channel directory but they dont be displayed into uzg.
Is there any update for version 2.7.0 FINAL?
Because the channels need to be updated for 2.7.0 FINAL. There were some changes.
And this time, not only the maxXOTVersion.
http://xbmc.org/forum/showpost.php?p=149758&postcount=133
hmm..I did the lib fix, but still not working. Which link in this thread is the most recent version?
As for sites to do, the setup of the XOT framework makes it easiest to work with sites that use non-flash video (so, Divx/WMV/etc). Also, for organization, sites with categories or tags work great, too.
Pornotube was gonna be my next foray, as I found a python script that finds their FLV urls, but the content on there is pretty weak. Lots of paid content and really short, kinda worthless clips.
I'll look through the rest of those and see what'll be easiest and quickest to implement.
Is anyone familiar with Agriya flash player, or have a copy of it? If someone knows how it creates its flv filenames, we could open up a LOT of sites (it's a new-ish script package that a lot of youtube-come-latelys are using these days, including 3xupload, pacoporn, and a lot of others)
(on that note, anybody in Sacramento know of a company that needs to pay obscene amounts of money to someone that's great at everything?)
I Know that is the latest version. But it doesn't recordnise these channels
Think something is changed in the channel file layout
I'm going to have a try with it
But isn't that what most programming is, anyway? ;)
If they don't want to make their own script, I'll still work on it, and would be happy to include ads if they wanted, if they want to help with the video filenames. *shrug*
I'm not terribly skilled either (like I said, they're obviously better at something than I am. They've got a fairly successful site running), but I think the site layout changes you're thinking of are things that break scripts temporarily, as they move something to a new location, etc. If someone comes in and re-points to the new location, the script works again.
Everything you need to know is in the first post by rootyb (current thread)
pornotube.com
youporn.com
yuvutu.com
adult-sex-porn-tv.com
xvideos.com
shufuni.com/videos
megarotic.com
naughty.com/free-porn-sex-movies-videos/
eskimotube.com
movieshark.com
privatepornmovies.com
teenjill.com
http://www.4tv.com/genre.php?genre_id=21
stage6porn.com
tangotime.com
free6.com
Many more can be found here:
http://ovguide.com/adult1.html
PS! I suggest you copy the XOT script, rename it to something new (like "Top Shelf Videos" or "Adult Only!") and then release that script complete with the porn channels (and no other channels), you can even change the design and/or the background images in the script to set it apart from the original XOT script.
Is there a way to edit posts that I'm totally missing?No, users are not allowed to edit threads.
...or any other XOT/Uitzendinggemist channel for that matter :cool:
volunteer(s)?
As of version 3.0 XOT-Uzg will also be available as Plugin! So NO need to convert the channels to a plugin! Just make the channel work with 3.0 (minor changes) and XOT-Uzg 3.0 will take care of displaying a channel as a plugin!
Release will be somewhere next weekend!
Also, x3, if you're actually associated with 3xupload, can I make a suggestion? Make clicked ads open in a new browser window, so the user doesn't navigate away from your site by clicking an ad. For one, it's annoying, and why would you want to send users away from your site? Keep 'em around, so you can get more ad revenue.
Or should I just try to add the stuff from the old scipt into an other new script
Thnx anyone for trying
The percentage of people who (originally) use the site and have XBMC is going to be very small. However if the channel was available then it is free publicity amongst the XBMC community who may stumble across the thread and become interested in the site. In that sense the advertisers are going to have more or less the same amount of web viewers, however their advert, whether clickable or not, will be available to a bonus number of XBMC people who chose to run the script. Again I see that being a win win situation. I cannot see people who use the web site buying an xbox and using XBMC just for the script to use the site thereby reducing the number of web viewers which would obviously be a concern for 3xupload.
Please correct me if my logic appears flawed.
def PlayVideoItem(self, item, player="dvdplayer"):
""" NOT USER EDITABLE
Accepts an item with or without MediaUrl and playback the item. If no
MediaUrl is present, one will be retrieved.
"""
logFile.info("Starting Video Playback using the %s", player)
try:
logFile.info('opening '+ item.mediaurl)
if player=="dvdplayer":
logFile.info("Playing using DVDPlayer")
xbmc.Player(xbmc.PLAYER_CORE_DVDPLAYER).play(item. mediaurl)
else:
xbmc.Player().play(item.mediaurl)
except:
dialog = xbmcgui.Dialog()
dialog.ok(config.appName,"Kan dit programma niet afspelen.")
logFile.critical("Could not playback the url", exc_info=True)
If you want it back to Mplayer, just remove that part from the end. You could also change "DVDPlayer" to "Mplayer".
Looking into it.
With some help I got the PS channel fixed.
you can download it at
http://sleepydutchboy.googlepages.com/home
Good luck every one
Ps. Got one version with and one without XOT.
Think something is changed in the channel file layout
I'm going to have a try with it
I am the author of XOT, so I can tell you that some minor things changed. For instance: update the maxXotVersion to "3.0.0" and check the logfile for other errrors.
Glad it's working for you. Good info for everyone else, too. DVDPlayer lets you skip around streaming divx videos, Mplayer caches.
I could see a feature request in this: ability to set the player per channel (or per-filetype).
http://ownedgear.com/XOT-TSV.zip is the latest version.
One of these days, I should get around to adding multi-page viewing and searches. Maybe once I learn python. Anyone wanna hold my hand through it for awhile? :)
Credit for like, 99% of the code goes to Basje, though. I've just been editing some regex and whatnot of existing channels to work on pr0n sites. I'm fairly close to getting 3xupload to work, too.
I *think* that default player for everything is Mplayer. If you play a video, then look in your uzt.log file, it should say "playing
I also doubt they'd be able to "implement" anything to block XBMC on their own. I'm guessing a post on the agriya forums has gone up (or will be soon) asking for a solution.
They're using a pretty turnkey flash video site solution (Agriya player), and from some of the stuff I've seen on there, it's pretty clear they don't have much in the way of web hosting experience.
For example: does anybody want a list of the filename/url of every video on 3xuploads? Mind, I don't have descriptions or titles to go along with them, which is why I haven't put together a channel yet.
Try this: fire up XOT, then the redtube channel. After it says "No Files", close it out, then log into your xbox and open up the uzg.log file, and copy/paste the last 10-15 lines or so (or whatever looks vaguely relevant) into a post here.
having trouble with playing some of the files though - only some work on PS and nearly all of the ones on RedTube only last for 10 seconds... not sure if it's just bad karma though - will try again later.
It may be something to do with your cache settings. You need to be playing through MPlayer for it to use the cache. For some reason the DVD player does not seem to cache. Failing that try downloading the videos. I have put the download feature from PS into Redtube and also changed the default player to Mplayer. Should make it better for those of us, like me, who have a slow internet speed.
The code changes for Redtube (open chn_redtube.py in notepad) are:
Change
self.contextMenuEnabled = False
To
self.contextMenuEnabled = True
Then add the following code at the bottom
#================================================= =============================
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');
def PlayVideoItem(self, item, player="mplayer"):
""" NOT USER EDITABLE
Accepts an item with or without MediaUrl and playback the item. If no
MediaUrl is present, one will be retrieved.
"""
logFile.info("Starting Video Playback using the %s", player)
try:
logFile.info('opening '+ item.mediaurl)
if player=="mplayer":
logFile.info("Playing using MPlayer")
xbmc.Player(xbmc.PLAYER_CORE_MPLAYER).play(item.me diaurl)
else:
xbmc.Player().play(item.mediaurl)
except:
dialog = xbmcgui.Dialog()
dialog.ok(config.appName,"Kan dit programma niet afspelen.")
logFile.critical("Could not playback the url", exc_info=True)
To change PS default player to Mplayer start at the line
def PlayVideoItem(self, item, player="dvdplayer"):
and change dvdplayer to mplayer all the way down keeping the same case.
May I just emphasise that none of the code is my own, it is rootyb's.
yeah me too. Replaced URIlib with the fixed version and removed the .PYO... I still get "no files" for both PS and RedTube. Worked two weeks ago :sad:
Good idea, bad idea, too hard/complicated? ???
It could be done. I will look into making the Plugin option part of the XOT-Framework (http://code.google.com/p/xot-uzg/).
http://xbmc.org/forum/showpost.php?p=149758&postcount=133
But thanks!
The ones that aren't working on PS, are they working if you go to the actual site?
I played some RedTube videos today, right after I fixed it, and they seemed to play alright. Streaming FLV's doesn't seem to work perfectly. Seems like it doesn't cache well or something, regardless of what player XBMC is using.
Good idea, bad idea, too hard/complicated? ???Any updates/progress on converting these channels into plugins (http://xbmc.org/forum/showthread.php?t=28031)?
...or any other XOT/Uitzendinggemist channel for that matter :cool:
volunteer(s)?
Will look at the other changes in 2.7.0Final, but both of these should work at the moment.
http://ownedgear.com/XOT-TSV.zip
Free as in free speach, not free beer! http://www.gnu.org/philosophy/free-sw.html
But your right, I dont know anything and I do thank you (if the first statement is accurate) for sharing the content... but if this is the way your to be about it then you really should recant the statement about "free to watch" since your obviously dictating terms that is hardly considered "free" its more like conditional.
Cheers
Dan
Anyhow, I'm working on a Channel for 3xUpload now, but it's flv. Anyone happen to know where I can find an algorithm for de-obfuscating their FLV urls?
i'm this far but can't fix the no files error
#================================================= ==============================
# Import the default modules
#================================================= ==============================
import xbmc, xbmcgui
import sys, re, 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
#================================================= ==============================
if (sys.modules.has_key('progwindow')):
register = sys.modules['progwindow']
elif (sys.modules.has_key('plugin')):
register = sys.modules['plugin']
#register.channelButtonRegister.append(108)
register.channelRegister.append('chn_ps.Channel("uzg-channelwindow.xml", config.rootDir, config.skinFolder, channelCode="pron")')
#================================================= ==============================
# 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.icon = "psthumb.png"
self.iconLarge = "pslarge.png"
self.noImage = "psimage.png"
self.channelName = "Pronshare.com"
self.channelDescription = "A collection of adult videos from Stage6"
self.moduleName = "chn_ps.py"
self.maxXotVersion = "3.0.0"
self.mainListUri = "http://pronshare.com"
self.baseUrl = "http://pronshare.com"
self.onUpDownUpdateEnabled = False
self.requiresLogon = False
self.episodeItemRegex = '([^>]+)' # used for the ParseMainList
self.videoItemRegex = '([^>]+)' # used for the CreateVideoItem
self.folderItemRegex = '' # used for the CreateFolderItem
self.mediaUrlRegex = '' # used for the UpdateVideoItem
#================================================= =========================
# non standard items
self.topDescription = ""
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(' - ([^<]+)', data)
#initialise description
if len(self.folderHistory) == 1:
self.progTitle = _matches[0]
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('(([nr].)*)', 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[1], self.baseUrl + resultSet[0])
item.description = "%sn%s" % (self.folderHistory[-1].description, resultSet[1])
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[1], self.baseUrl + resultSet[0])
item.description = "%sn%s" % (self.folderHistory[-1].description, resultSet[1])
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');
def PlayVideoItem(self, item, player="dvdplayer"):
""" NOT USER EDITABLE
Accepts an item with or without MediaUrl and playback the item. If no
MediaUrl is present, one will be retrieved.
"""
logFile.info("Starting Video Playback using the %s", player)
try:
logFile.info('opening '+ item.mediaurl)
if player=="dvdplayer":
logFile.info("Playing using DVDPlayer")
xbmc.Player(xbmc.PLAYER_CORE_DVDPLAYER).play(item. mediaurl)
else:
xbmc.Player().play(item.mediaurl)
except:
dialog = xbmcgui.Dialog()
dialog.ok(config.appName,"Kan dit programma niet afspelen.")
logFile.critical("Could not playback the url", exc_info=True)
Basje could you help me with this?
That way, channels could be setup with a maxChn_ClassVersion (instead of maxXotVersion), and would only stop working if there are changes that might directly affect their usability.
Good idea, bad idea, too hard/complicated? ???
The code changes for Redtube (open chn_redtube.py in notepad) are:
Change
self.contextMenuEnabled = False
To
self.contextMenuEnabled = True
Then add the following code at the bottom
#================================================= =============================
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');
def PlayVideoItem(self, item, player="mplayer"):
""" NOT USER EDITABLE
Accepts an item with or without MediaUrl and playback the item. If no
MediaUrl is present, one will be retrieved.
"""
logFile.info("Starting Video Playback using the %s", player)
try:
logFile.info('opening '+ item.mediaurl)
if player=="mplayer":
logFile.info("Playing using MPlayer")
xbmc.Player(xbmc.PLAYER_CORE_MPLAYER).play(item.me diaurl)
else:
xbmc.Player().play(item.mediaurl)
except:
dialog = xbmcgui.Dialog()
dialog.ok(config.appName,"Kan dit programma niet afspelen.")
logFile.critical("Could not playback the url", exc_info=True)
To change PS default player to Mplayer start at the line
def PlayVideoItem(self, item, player="dvdplayer"):
and change dvdplayer to mplayer all the way down keeping the same case.
May I just emphasise that none of the code is my own, it is rootyb's.
Just made the changes to redtube so I can d/l as streaming playback is very choppy, but it just hangs is this cos i've upgraded to 2.7 final?
Everything you need to know is in the first post by rootyb (current thread)
Thanx, bro!
Also Version 3 of UZG is out.
Will the be an update to make Pr0nshare work again?
Anyway thanks for your work so far
Dan
http://ownedgear.com/XOT-TSV.zip
True, just posted it. But no big changes.
www.privateadultvideos.com (http://www.privateadultvideos.com)
thnks for the help
Got them showing up but now they aren't showing any files. Got the categories already.
(1 step closer in getting these channels fixed)
Dan
I just know what works for me. :)
I think that you're right, though, about users of the site not being likely to go setup an xbox just to view the videos without ads. I actually think that scripts like this drive more traffic to the website (the actual website, that is), because they expand exposure a bit. 3xuploads is one of the first sites I'm doing, just because it's got some pretty good quality videos on it, compared to some of the others out there. Once people recognize that, I think they'll be viewing the site both on and off of their xbox.
Now, a question that I could use some feedback on:
For 3xupload, do we want videos sorted by tag (LOTS of tags available. like, 40-50ish, I think), or channel (about a dozen channels, with 20-500 videos in each).
Each has pros and cons, I suppose. With a tag-sorted list, there'll be a lot of overlap between videos.
With a channel-sorted list, though, there's going to be a lot of videos in some of the categories.
I'm leaning toward channel-sorted, personally. At least because the channels seem to have better content (or at least, the content is better-organized).
Or should I just try to add the stuff from the old scipt into an other new script
Thnx anyone for trying
Just try to update only the channels to work with the latest version of XOT (www.rieter.net/uitzendinggemist/), which is version 3.0.0.
i'm this far but can't fix the no files error
#================================================= ==============================
# Import the default modules
#================================================= ==============================
import xbmc, xbmcgui
import sys, re, 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
#================================================= ==============================
if (sys.modules.has_key('progwindow')):
register = sys.modules['progwindow']
elif (sys.modules.has_key('plugin')):
register = sys.modules['plugin']
#register.channelButtonRegister.append(108)
register.channelRegister.append('chn_ps.Channel("uzg-channelwindow.xml", config.rootDir, config.skinFolder, channelCode="pron")')
#================================================= ==============================
# 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.icon = "psthumb.png"
self.iconLarge = "pslarge.png"
self.noImage = "psimage.png"
self.channelName = "Pronshare.com"
self.channelDescription = "A collection of adult videos from Stage6"
self.moduleName = "chn_ps.py"
self.maxXotVersion = "3.0.0"
self.mainListUri = "http://pronshare.com"
self.baseUrl = "http://pronshare.com"
self.onUpDownUpdateEnabled = False
self.requiresLogon = False
self.episodeItemRegex = '([^>]+)' # used for the ParseMainList
self.videoItemRegex = '([^>]+)' # used for the CreateVideoItem
self.folderItemRegex = '' # used for the CreateFolderItem
self.mediaUrlRegex = '' # used for the UpdateVideoItem
#================================================= =========================
# non standard items
self.topDescription = ""
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(' - ([^<]+)', data)
#initialise description
if len(self.folderHistory) == 1:
self.progTitle = _matches[0]
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('(([nr].)*)', 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[1], self.baseUrl + resultSet[0])
item.description = "%sn%s" % (self.folderHistory[-1].description, resultSet[1])
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[1], self.baseUrl + resultSet[0])
item.description = "%sn%s" % (self.folderHistory[-1].description, resultSet[1])
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');
def PlayVideoItem(self, item, player="dvdplayer"):
""" NOT USER EDITABLE
Accepts an item with or without MediaUrl and playback the item. If no
MediaUrl is present, one will be retrieved.
"""
logFile.info("Starting Video Playback using the %s", player)
try:
logFile.info('opening '+ item.mediaurl)
if player=="dvdplayer":
logFile.info("Playing using DVDPlayer")
xbmc.Player(xbmc.PLAYER_CORE_DVDPLAYER).play(item. mediaurl)
else:
xbmc.Player().play(item.mediaurl)
except:
dialog = xbmcgui.Dialog()
dialog.ok(config.appName,"Kan dit programma niet afspelen.")
logFile.critical("Could not playback the url", exc_info=True)
Basje could you help me with this?
Just have a look in the logfile of XOT first. It probably holds some info on where things go wrong. Post it on pastebin.com and we can discuss it.
#If you have any other info about this subject , Please add it free.# |