def buscartrailer(params,url,category):
print "[trailertools.py] Modulo: buscartrailer()"
thumbnail = ""
solo = "false"
videotitle = title = urllib.unquote_plus( params.get("title") ).strip()
if ":]" in videotitle:
solo = "true"
videotitle = re.sub("\[[^\]]+\]","",videotitle).strip()
if config.get_localized_string(30110) in videotitle: #"Buscar trailer para"
videotitle = videotitle.replace(config.get_localized_string(30110),"").strip()
if config.get_localized_string(30111) in videotitle: #"Insatisfecho?, busca otra vez : "
videotitle = videotitle.replace(config.get_localized_string(30111),"").strip()
listavideos = GetTrailerbyKeyboard(videotitle.strip(),category)
else:
listavideos = gettrailer(videotitle.strip().strip(),category,solo)
if len(listavideos)>0:
for video in listavideos:
titulo = video[1]
url = video[0]
thumbnail = video[2]
duracion = video[3]
xbmctools.addnewvideo( "trailertools" , "youtubeplay" , category , "youtube" , titulo , url , thumbnail , "Ver Video","",duracion )
xbmctools.addnewfolder( CHANNELNAME , "buscartrailer" , category , config.get_localized_string(30111)+" "+videotitle , url , os.path.join(IMAGES_PATH, 'trailertools.png'), "" ) #"Insatisfecho?, busca otra vez : "
# Propiedades
xbmcplugin.setPluginCategory( handle=int( sys.argv[ 1 ] ), category=category )
xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ), sortMethod=xbmcplugin.SORT_METHOD_NONE )
xbmcplugin.endOfDirectory( handle=int( sys.argv[ 1 ] ), succeeded=True )
trailertools.py 文件源码
python
阅读 17
收藏 0
点赞 0
评论 0
评论列表
文章目录