Exemple #1
0
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')
Exemple #2
0
    #sourceVideos += re.compile( videoWrapper).findall( html )
    sourceVideos += re.compile('<(?:iframe|IFRAME)(.+?)>').findall(html)

    sourceVideos += re.compile('<source(.+?)>').findall(html)

    sourceVideos += re.compile('<video.*src="(.+?)">').findall(html)
    print 'source videos', sourceVideos

    # 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 = sourceVideo.replace('\/', '/')
        try:
            sourceVideo = re.compile(
                '(?:src|SRC)=(?:\"|\')(.+?)(?:\"|\')').findall(sourceVideo)[0]
            sourceVideo = urllib.unquote(sourceVideo)
        except:
            sourceVideo = sourceVideo
        print "sourceVideo=" + sourceVideo
        sourceVideo = sourceVideo.replace('nowvideo.co', 'nowvideo.ch')
        link = urllib2.urlparse.urlsplit(sourceVideo)
   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 )
Exemple #4
0
    
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')
Exemple #5
0
    
    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:
         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
Exemple #7
0
   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 )
Exemple #8
0
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()