import xbmc,xbmcplugin from core import scrapertools,xbmctools from servers import servertools from core import logger,config from pelisalacarta import buscador from core.item import Item from xml.dom import minidom from xml.dom import EMPTY_NAMESPACE from platform.xbmc.config import get_system_platform PLUGIN_NAME = "pelisalacarta" CHANNELNAME = "seriesdanko" ATOM_NS = 'http://www.w3.org/2005/Atom' DEBUG = config.get_setting("debug") if get_system_platform() == "xbox": MaxResult = "55" else: MaxResult = "500" def isGeneric(): return True def mainlist(item): logger.info("[seriesdanko.py] mainlist") itemlist = [] itemlist.append( Item(channel=CHANNELNAME, title="Noticias" , action="novedades" , url="http://www.blogger.com/feeds/5090863330072217342/posts/default/-/Noticias?start-index=1&max-results=25&orderby=published&alt=json&callback=nuevoscapitulos")) itemlist.append( Item(channel=CHANNELNAME, title="Series Actualizadas" , action="listvideofeeds", url="http://www.blogger.com/feeds/5090863330072217342/posts/default/-/sd?start-index=1&max-results=%s" %MaxResult))
CHANNELNAME = 'updater4buscador' if config.get_setting("thumbnail_type")=="0": IMAGES_PATH = xbmc.translatePath( os.path.join( config.get_runtime_path(), 'resources' , 'images' , 'posters' ) ) else: IMAGES_PATH = xbmc.translatePath( os.path.join( config.get_runtime_path(), 'resources' , 'images' , 'banners' ) ) ROOT_DIR = config.get_runtime_path() REMOTE_VERSION_FILE = "http://blog.tvalacarta.info/descargas/"+PLUGIN_NAME+"-version.xml" LOCAL_VERSION_FILE = xbmc.translatePath( os.path.join( ROOT_DIR , "version.xml" ) ) LOCAL_FILE = xbmc.translatePath( os.path.join( ROOT_DIR , PLUGIN_NAME+"-" ) ) try: # Añadida a la opcion : si plataforma xbmcdharma es "True", no debe ser con la plataforma de la xbox # porque seria un falso "True", ya que el xbmc en las xbox no son dharma por lo tanto no existen los addons if config.get_platform()=="xbmcdharma" and not platform.get_system_platform() == "xbox": REMOTE_FILE = "http://blog.tvalacarta.info/descargas/"+PLUGIN_NAME+"-xbmc-addon-" DESTINATION_FOLDER = xbmc.translatePath( "special://home/addons") else: REMOTE_FILE = "http://blog.tvalacarta.info/descargas/"+PLUGIN_NAME+"-xbmc-plugin-" DESTINATION_FOLDER = xbmc.translatePath( "special://home/plugins/video") except: REMOTE_FILE = "http://blog.tvalacarta.info/descargas/"+PLUGIN_NAME+"-xbmc-plugin-" DESTINATION_FOLDER = xbmc.translatePath( os.path.join( ROOT_DIR , ".." ) ) def mainlist(params,url,category): xbmctools.addnewfolder( CHANNELNAME , "actualizar" , category , "Actualizar el Buscador","buscador","","") xbmcplugin.endOfDirectory( handle=int( sys.argv[ 1 ] ), succeeded=True ) def actualizar(params,url,category): ok = updatechannel(url)