Ooba – Code addition, Menu addition, and Requests
i’ve added the ability to ignore to add identical items to the menu. this has been done by updating the class menu, code change (in ooba.py) bellow:

Quote:def has_item(self,item):
for i in self.items:
if item.get_url() == i.get_url() and\
item.get_title() == i.get_title() and\
item.get_submenu() == i.get_submenu():
return true
return false

def append(self,item,only_if_unique=false):
if only_if_unique and self.has_item(item):
# don't append

and by updating a call to the append method found in the class submenuaction, method open. code change bellow:


then i’ve changed the code to automatically open a link if it’s the only link. i want this because some sites use frames. it would be nice if this could be set in settings.xml or menu.xml. code changed in the method readsettings bellow:


then i’ve added the adult site free6.com to menu.xml, additions bellow:
<title>free6.com moveis</title>

<action type="submenu">
<pattern><![cdata[<a [^<>]*?href=['"](?p<url>[^"<>]+&type=1)['"]>(?p<title>[^<>]+)</a]]></pattern>
<pattern><![cdata[<a [^<>]*?href=['"](?p<url>/gallery.php[^"<>]+)['"]>(?p<title>[^<>]+)</a]]></pattern>
<pattern><![cdata[<frame name=['"](?p<title>gallery)['"] src=['"](?p<url>[^'"]*?)['"]]]></pattern>

feature requests
1) when a movie (or media) stops automatically start to play the next movie (or media). you should be able to this at different depths in the menu hierarchy. maybe by adding a “play all”-menu item a the top of most menus.
2) when playing a movie (or media) automatically pre-cache the next couple of movies (or medias). i guess this would involve multithreading. does xbmc’s python support multithreading?

(for the code and xml in this post i’ve shifted the indent left and changed tabs to spaces to make it readable. i’ve couldn’t find anyway to attach the complete code to this post but i’ve mailed it to the original author.)
i will add your new patterns to ooba v1.4. (soon coming...)

the feature requests are unfortunately very hard to make. i suppose that the easiest way would be to add all the urls to a playlist and then let xbmc handle it.

Logout Mark Read Team Forum Stats Members Help
Ooba – Code addition, Menu addition, and Requests0
This forum uses Lukasz Tkacz MyBB addons.