本文整理汇总了Python中t0mm0.common.addon.Addon.show_ok_dialog方法的典型用法代码示例。如果您正苦于以下问题:Python Addon.show_ok_dialog方法的具体用法?Python Addon.show_ok_dialog怎么用?Python Addon.show_ok_dialog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类t0mm0.common.addon.Addon
的用法示例。
在下文中一共展示了Addon.show_ok_dialog方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: RMOVIEMETA
# 需要导入模块: from t0mm0.common.addon import Addon [as 别名]
# 或者: from t0mm0.common.addon.Addon import show_ok_dialog [as 别名]
def RMOVIEMETA(meta_name):
imdb_id = Addon.queries.get('imdb_id', '')
r = re.split(r'480p|720p|xvid',meta_name,0,)
name = re.findall(r'(.+?)\s[\d]{4}',r[0],flags=re.I)
year = re.findall(r'([\d{4}])',r[0])
print str(name)
if len(name) >=1:
name = name[0]
name =''.join(name)
year =''.join(year)
metaget=metahandlers.MetaData()
try:
search_meta = metaget.search_movies(name)
except:
xbmc.executebuiltin("XBMC.Notification([COLOR red]Notice[/COLOR],Could not find correct MetaData,10000,os.path.join(art,'TVRnotify.png')")
return
if search_meta:
movie_list = []
for movie in search_meta:
movie_list.append(movie['title'] + ' (' + str(movie['year']) + ')')
dialog = xbmcgui.Dialog()
index = dialog.select('Choose', movie_list)
if index > -1:
new_imdb_id = search_meta[index]['imdb_id']
new_tmdb_id = search_meta[index]['tmdb_id']
meta = metaget.update_meta('movie', name, imdb_id=imdb_id, new_imdb_id=new_imdb_id, new_tmdb_id=new_tmdb_id, year=year)
xbmc.executebuiltin("Container.Refresh")
else:
msg = ['No matches found']
Addon.show_ok_dialog(msg, 'Refresh Results')
示例2: Settings
# 需要导入模块: from t0mm0.common.addon import Addon [as 别名]
# 或者: from t0mm0.common.addon.Addon import show_ok_dialog [as 别名]
stream_url = None
if 'dailymotion' in url:
stream_url = url
else:
hosted_media = urlresolver.HostedMediaFile( url=url, title=name )
print "hosted_media"
print hosted_media
if hosted_media:
stream_url = hosted_media.resolve()
print stream_url
if stream_url:
addon.resolve_url(stream_url)
else:
print "unable to resolve"
addon.show_ok_dialog( [ 'Unknown hosted video' ], title='Playback' )
else:
if mode == 'main':
Main_Categories()
elif mode == 'settings':
Settings()
elif mode == 'movie':
Main_Movie( url, lang )
elif mode == 'tree':
Main_Tree( url, lang )
elif mode == 'leaf':
Main_Leaf( url, lang )
示例3: MAINMENU
# 需要导入模块: from t0mm0.common.addon import Addon [as 别名]
# 或者: from t0mm0.common.addon.Addon import show_ok_dialog [as 别名]
art = main.art
error_logo = art+'/bigx.png'
try:
import urllib, urllib2, re, string, urlparse, sys, os
from t0mm0.common.net import Net
from metahandler import metahandlers
from sqlite3 import dbapi2 as database
from universal import playbackengine, watchhistory
import urlresolver
except Exception, e:
addon.log_error(str(e))
addon.show_small_popup('MashUP: Tv-Release','Failed To Import Modules', 5000, error_logo)
addon.show_ok_dialog(['Failed To Import Modules','Please Post Logfile In MashUP Forum @','http://www.xbmchub.com'],
'MashUP: TV-Release')
net = Net()
BASEURL = 'http://www.tv-release.net/'
wh = watchhistory.WatchHistory(addon_id)
def MAINMENU():
main.addDir('Search Tv-Release', BASEURL+'?s=', 1006,art+'/tvrsearch1.png')
main.addDir('TV 480', BASEURL+'category/tvshows/tv480p/', 1001,art+'/TV480.png')
main.addDir('TV 720', BASEURL+'category/tvshows/tv720p/', 1001,art+'/TV720.png')
main.addDir('TV MP4', BASEURL+'category/tvshows/tvmp4/', 1001,art+'/TVmp4.png')
main.addDir('TV Xvid', BASEURL+'category/tvshows/tvxvid/', 1001,art+'/TVxvid.png')
main.addDir('TV Packs', BASEURL+'tv-pack/', 1007,art+'/TVpacks.png')
main.addDir('TV Foreign', BASEURL+'category/tvshows/tv-foreign/', 1001,art+'/TVforeign.png')
main.addDir('Movies 480', BASEURL+'category/movies/movies480p/', 1001,art+'/Movies480.png')
main.addDir('Movies 720', BASEURL+'category/movies/movies720p/', 1001,art+'/Movies720.png')
main.addDir('Movies Xvid', BASEURL+'category/movies/moviesxvid/', 1001,art+'/Moviesxvid.png')
示例4: str
# 需要导入模块: from t0mm0.common.addon import Addon [as 别名]
# 或者: from t0mm0.common.addon.Addon import show_ok_dialog [as 别名]
if search_meta:
movie_list = []
for movie in search_meta:
movie_list.append(movie['title'] + ' (' + str(movie['year']) + ')')
dialog = xbmcgui.Dialog()
index = dialog.select('Choose', movie_list)
if index > -1:
new_imdb_id = search_meta[index]['imdb_id']
new_tmdb_id = search_meta[index]['tmdb_id']
meta = metaget.update_meta(name, old_imdb_id=imdb_id, old_tmdb_id=tmdb_id, new_imdb_id=new_imdb_id, new_tmdb_id=new_tmdb_id, year=year)
xbmc.executebuiltin("Container.Refresh")
else:
msg = ['No matches found']
addon.show_ok_dialog(msg, 'Refresh Results')
elif mode == 'tvseasons':
metaget=metahandlers.MetaData()
season_list = ['1','2', '3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23']
season_meta = metaget.get_seasons(imdb_id, season_list)
for season in season_list:
cur_season = season_meta[int(season) - 1]
addon.add_directory({'mode': 'tvepisodes', 'url': 'none', 'imdb_id': imdb_id, 'season': season}, {'title': 'Season ' + season}, total_items=len(season_list), img=cur_season['cover_url'])
elif mode == 'tvepisodes':
metaget=metahandlers.MetaData()
episodes = range(1,10)
for episode in episodes:
示例5: len
# 需要导入模块: from t0mm0.common.addon import Addon [as 别名]
# 或者: from t0mm0.common.addon.Addon import show_ok_dialog [as 别名]
sourceVideos.append('src="' + (a['href'].split()[0]) + ' ' + ('width = ""'))
# Handle embed tags
#sourceVideos += re.compile( '<embed(.+?)>', flags=re.DOTALL).findall( html )
# Handle iframe tags
sourceVideos += re.compile( '<iframe(.+?)>').findall( html )
# Handle Youtube new window
src = re.compile( 'onclick="window.open\((.+?),' ).findall( html )
if src:
sourceVideos += [ 'src=' + src[ 0 ] ]
if len( sourceVideos ) == 0:
print "No video sources found!!!!"
addon.show_ok_dialog( [ 'Page has unsupported video' ], title='Playback' )
return
videoItem = []
for sourceVideo in sourceVideos:
print "sourceVideo=" + sourceVideo
sourceVideo = re.compile( 'src=(?:\"|\')(.+?)(?:\"|\')' ).findall( sourceVideo )[0]
sourceVideo = urllib.unquote( sourceVideo )
print "sourceVideo=" + sourceVideo
link = urllib2.urlparse.urlsplit( sourceVideo )
host = link.hostname
host = host.replace( 'www.', '' )
host = host.replace( '.com', '' )
sourceName = host.capitalize()
print "sourceName = " + sourceName
示例6: MAINMENU
# 需要导入模块: from t0mm0.common.addon import Addon [as 别名]
# 或者: from t0mm0.common.addon.Addon import show_ok_dialog [as 别名]
art = main.art
error_logo = art + "/bigx.png"
try:
import urllib, urllib2, re, string, urlparse, sys, os
from t0mm0.common.net import Net
from metahandler import metahandlers
from sqlite3 import dbapi2 as database
from universal import playbackengine, watchhistory
import urlresolver
except Exception, e:
addon.log_error(str(e))
addon.show_small_popup("MashUP: tubePLUS", "Failed To Import Modules", 5000, error_logo)
addon.show_ok_dialog(
["Failed To Import Modules", "Please Post Logfile In MashUP Forum @", "http://www.xbmchub.com"],
"MashUP: TV-Release",
)
net = Net()
BASE_URL = "http://www.tubeplus.me/"
wh = watchhistory.WatchHistory(addon_id)
def MAINMENU():
main.addDir("Search", BASE_URL + "?s=", 1024, art + "/tpsearch.png")
main.addDir("TV Shows", BASE_URL, 1021, art + "/tptvshows.png")
main.addDir("Movies", BASE_URL, 1022, art + "/tpmovies.png")
# main.addDir('TubePLUS Movie Charts','http://www.tubeplus.me/tool/',1023,'')
main.addPlayc("Resolver Settings", BASE_URL, 1004, art + "/tpsettings.png", "", "", "", "", "")
main.VIEWSB()