def index(url): link = net.http_GET(url).content match = re.compile( '<td align=left nowrap><a href="(.+?)">(.+?)</a>').findall(link) pages = re.compile('<a href="(.+?)"><font size=3><B><I>(.+?)</I>').findall( link) skipPages = len(pages) / 2 inc = 1 main.addDir('[COLOR blue]Manage Downloads[/COLOR]', 'none', 'viewQueue', artwork + '/other/downloads_manage.gif', 'none') for url, name in pages: if not inc > skipPages: name = '[COLOR blue]%s [/COLOR]' % console + '[COLOR blue]Roms Letters [/COLOR]' + '[COLOR blue]%s [/COLOR]' % name art = xbmc.translatePath( 'special://home/addons/plugin.program.romgrabber/icon.png') main.addDir(name, url, 'freeromsIndex', art, console) inc += 1 for url, name in match: if '<' in name: head, sep, tail = name.partition('<') name = head try: main.addGDir(name, url, 'freeromsRomLinks', artwork + 'none', console) except: pass main.autoView('addons')
def index(url): link = net.http_GET(url).content match=re.compile('<td align=left nowrap><a href="(.+?)">(.+?)</a>').findall(link) pages=re.compile('<a href="(.+?)"><font size=3><B><I>(.+?)</I>').findall(link) skipPages = len(pages) / 2 inc = 1 main.addDir('[COLOR blue]Manage Downloads[/COLOR]','none','viewQueue',artwork + '/other/downloads_manage.gif','none') for url, name in pages: if not inc > skipPages: name = '[COLOR blue]%s [/COLOR]' % console + '[COLOR blue]Roms Letters [/COLOR]' + '[COLOR blue]%s [/COLOR]' % name art = xbmc.translatePath('special://home/addons/plugin.program.romgrabber/icon.png') main.addDir(name,url,'freeromsIndex',art,console) inc += 1 for url,name in match: if '<' in name: head,sep,tail = name.partition('<') name = head try: main.addGDir(name,url,'freeromsRomLinks',artwork + 'none',console) except: pass main.autoView('addons')
def categories(): main.generateConsoleFolders() main.addDir('[COLOR blue]Manage Downloads[/COLOR]', 'none', 'viewQueue', artwork + '/other/downloads_manage.gif', 'none') main.addDir('Atari Jaguar', 'http://www.freeroms.com/atari_jaguar.htm', 'lettersIndex', artwork + '/consoles/jaguar.gif', 'Atari Jaguar') main.addDir('Atari Lynx', 'http://www.freeroms.com/atari_lynx.htm', 'lettersIndex', artwork + '/consoles/lynx.gif', 'Atari Lynx') main.addDir('CPS2', 'http://www.freeroms.com/cps2.htm', 'lettersIndex', artwork + '/consoles/cps2.gif', 'CPS2') main.addDir('MAME', 'http://www.freeroms.com/mame.htm', 'lettersIndex', artwork + '/consoles/mame.gif', 'MAME') main.addDir('Neo Geo', 'http://www.freeroms.com/neogeo.htm', 'lettersIndex', artwork + '/consoles/neogeo.gif', 'Neo Geo') main.addDir('Neo Geo Pocket', 'http://www.freeroms.com/neogeo_pocket.htm', 'lettersIndex', artwork + '/consoles/neogeopocket.gif', 'Neo Geo Pocket') main.addDir('Nintendo', 'http://www.freeroms.com/nes.htm', 'lettersIndex', artwork + '/consoles/nintendo.gif', 'Nintendo') main.addDir('Nintendo 64', 'http://www.freeroms.com/n64.htm', 'lettersIndex', artwork + '/consoles/nintendo64.gif', 'Nintendo 64') main.addDir('Nintendo GameBoy Advance', 'http://www.freeroms.com/gameboy_advance.htm', 'lettersIndex', artwork + '/consoles/gameboyadvance.gif', 'Nintendo GameBoy Advance') main.addDir('Nintendo GameBoy Color', 'http://www.freeroms.com/gameboy_color.htm', 'lettersIndex', artwork + '/consoles/gameboycolor.gif', 'Nintendo GameBoy Color') main.addDir('Super Nintendo', 'http://www.freeroms.com/snes.htm', 'lettersIndex', artwork + '/consoles/supernintendo.gif', 'Super Nintendo') main.addDir('Sega CD', 'http://www.freeroms.com/sega_cd.htm', 'lettersIndex', artwork + '/consoles/segacd.gif', 'Sega CD') main.addDir('Sega Dreamcast', 'http://www.freeroms.com/sega_dreamcast.htm', 'lettersIndex', artwork + '/consoles/dreamcast.gif', 'Sega Dreamcast') main.addDir('Sega Game Gear', 'http://www.freeroms.com/game_gear.htm', 'lettersIndex', artwork + '/consoles/gamegear.gif', 'Sega Game Gear') main.addDir('Sega Genesis', 'http://www.freeroms.com/genesis.htm', 'lettersIndex', artwork + '/consoles/segagenesis.gif', 'Sega Genesis') main.addDir('Sega Master System', 'http://www.freeroms.com/sega_master_system.htm', 'lettersIndex', artwork + '/consoles/segamastersystem.gif', 'Sega Master System') main.addDir('Sony Playstation', 'http://www.freeroms.com/psx.htm', 'lettersIndex', artwork + '/consoles/playstation.gif', 'Sony Playstation') main.autoView('default')
def lettersIndex(url): link = net.http_GET(url).content match=re.compile('\| <a href="(.+?)">(.+?)</a>').findall(link) main.addDir('[COLOR blue]Manage Downloads[/COLOR]','none','viewQueue',artwork + '/other/downloads_manage.gif','none') for url,name in match: if name =='#': main.addDir(name,url,'freeromsIndex',artwork + 'letters/hash.gif',console) else: art = artwork + 'letters/' + name + '.gif' art = art.replace(' ','-') main.addDir(name,url,'freeromsIndex',art,console) main.autoView('default')
def lettersIndex(url): link = net.http_GET(url).content match = re.compile('\| <a href="(.+?)">(.+?)</a>').findall(link) main.addDir('[COLOR blue]Manage Downloads[/COLOR]', 'none', 'viewQueue', artwork + '/other/downloads_manage.gif', 'none') for url, name in match: if name == '#': main.addDir(name, url, 'freeromsIndex', artwork + 'letters/hash.gif', console) else: art = artwork + 'letters/' + name + '.gif' art = art.replace(' ', '-') main.addDir(name, url, 'freeromsIndex', art, console) main.autoView('default')
def categories(): main.generateConsoleFolders() main.addDir('[COLOR blue]Manage Downloads[/COLOR]','none','viewQueue',artwork + '/other/downloads_manage.gif','none') main.addDir('Atari Jaguar','http://www.freeroms.com/atari_jaguar.htm','lettersIndex',artwork + '/consoles/jaguar.gif','Atari Jaguar') main.addDir('Atari Lynx','http://www.freeroms.com/atari_lynx.htm','lettersIndex',artwork + '/consoles/lynx.gif','Atari Lynx') main.addDir('CPS2','http://www.freeroms.com/cps2.htm','lettersIndex',artwork + '/consoles/cps2.gif','CPS2') main.addDir('MAME','http://www.freeroms.com/mame.htm','lettersIndex',artwork + '/consoles/mame.gif','MAME') main.addDir('Neo Geo','http://www.freeroms.com/neogeo.htm','lettersIndex',artwork + '/consoles/neogeo.gif','Neo Geo') main.addDir('Neo Geo Pocket','http://www.freeroms.com/neogeo_pocket.htm','lettersIndex',artwork + '/consoles/neogeopocket.gif','Neo Geo Pocket') main.addDir('Nintendo','http://www.freeroms.com/nes.htm','lettersIndex',artwork + '/consoles/nintendo.gif','Nintendo') main.addDir('Nintendo 64','http://www.freeroms.com/n64.htm','lettersIndex',artwork + '/consoles/nintendo64.gif','Nintendo 64') main.addDir('Nintendo GameBoy Advance','http://www.freeroms.com/gameboy_advance.htm','lettersIndex',artwork + '/consoles/gameboyadvance.gif','Nintendo GameBoy Advance') main.addDir('Nintendo GameBoy Color','http://www.freeroms.com/gameboy_color.htm','lettersIndex',artwork + '/consoles/gameboycolor.gif','Nintendo GameBoy Color') main.addDir('Super Nintendo','http://www.freeroms.com/snes.htm','lettersIndex',artwork + '/consoles/supernintendo.gif','Super Nintendo') main.addDir('Sega CD','http://www.freeroms.com/sega_cd.htm','lettersIndex',artwork + '/consoles/segacd.gif','Sega CD') main.addDir('Sega Dreamcast','http://www.freeroms.com/sega_dreamcast.htm','lettersIndex',artwork + '/consoles/dreamcast.gif','Sega Dreamcast') main.addDir('Sega Game Gear','http://www.freeroms.com/game_gear.htm','lettersIndex',artwork + '/consoles/gamegear.gif','Sega Game Gear') main.addDir('Sega Genesis','http://www.freeroms.com/genesis.htm','lettersIndex',artwork + '/consoles/segagenesis.gif','Sega Genesis') main.addDir('Sega Master System','http://www.freeroms.com/sega_master_system.htm','lettersIndex',artwork + '/consoles/segamastersystem.gif','Sega Master System') main.addDir('Sony Playstation','http://www.freeroms.com/psx.htm','lettersIndex',artwork + '/consoles/playstation.gif','Sony Playstation') main.autoView('default')