Beispiel #1
0
	def traktHiddenManager(self, idx=True):
		control.busy()
		try:
			if trakt.getActivity() > cache.timeout(self.trakt_list, self.progress_link, self.trakt_user): raise Exception()
			self.list = cache.get(self.trakt_list, 24, self.progress_link, self.trakt_user)
		except:
			self.list = cache.get(self.trakt_list, 0, self.progress_link, self.trakt_user)
		try:
			hidden = cache.get(trakt.getTrakt, 0, self.hiddenprogress_link) # if this gets cached and user hides an item it's not instantly removed.
			hidden = jsloads(hidden)
			hidden = [str(i['show']['ids']['tvdb']) for i in hidden]
			for i in self.list: i.update({'isHidden': 'true'}) if i['tvdb'] in hidden else i.update({'isHidden': ''})
			if idx: self.worker()
			self.list = sorted(self.list, key=lambda k: re.sub(r'(^the |^a |^an )', '', k['tvshowtitle'].lower()), reverse=False)
			self.list = sorted(self.list, key=lambda k: k['isHidden'], reverse=True)
			control.hide()
			from resources.lib.windows.trakthidden_manager import TraktHiddenManagerXML
			window = TraktHiddenManagerXML('trakthidden_manager.xml', control.addonPath(control.addonId()), results=self.list)
			chosen_hide, chosen_unhide = window.run()
			del window
			if chosen_unhide:
				success = trakt.unHideItems(chosen_unhide)
				if success: control.notification(title='Trakt Hidden Progress Manager', message='Successfully Unhid %s Item%s' % (len(chosen_unhide), 's' if len(chosen_unhide) >1 else ''))
			if chosen_hide:
				success = trakt.hideItems(chosen_hide)
				if success: control.notification(title='Trakt Hidden Progress Manager', message='Successfully Hid %s Item%s' % (len(chosen_hide), 's' if len(chosen_hide) >1 else ''))
		except:
			from resources.lib.modules import log_utils
			log_utils.error()
Beispiel #2
0
	def get_movie_request(self, tmdb, imdb=None): # api claims int rq'd.  But imdb_id works for movies but not looking like it does for shows
		if not tmdb and not imdb: return
		try:
			result = None
			if tmdb: result = cache.get(get_request, 96, self.movie_link % tmdb)
			if not result:
				if imdb: result = cache.get(get_request, 96, self.movie_link % imdb)
		except:
			log_utils.error()
		return result
Beispiel #3
0
	def persons(self, url):
		if url is None: self.list = cache.get(self.imdb_person_list, 24, self.personlist_link)
		else: self.list = cache.get(self.imdb_person_list, 1, url)
		if len(self.list) == 0:
			control.hide()
			control.notification(title=32010, message=33049)
		for i in range(0, len(self.list)):
			self.list[i].update({'icon': 'DefaultActor.png', 'action': 'tvshows'})
		self.addDirectory(self.list)
		return self.list
Beispiel #4
0
	def addSearch(self, url):
			try:
				skip = 0
				if '|SPLITER|' in url:
					keep = url
					url,matcher = url.split('|SPLITER|')
					skip = 1
					section = 1
				elif '|SECTION|' in url:
					matcher = url.replace('|SECTION|','')
					section = 1
				else: 
					section = 0
			except: section = 0
			link = 'https://t2k-repository.ml/IT/IT/tRmKGjTbr/xmls/clowns.xml'
			if skip == 0:
				if section == 1:
					keyboard = control.keyboard('', control.lang(30702))
					keyboard.doModal()
					if not (keyboard.isConfirmed()): return
					url = keyboard.getText()
					keep = url + '|SPLITER|' + matcher
				else:
					if (url is None or url == ''):
						keyboard = control.keyboard('', control.lang(30702))
						keyboard.doModal()
						if not (keyboard.isConfirmed()): return
						url = keyboard.getText()
			if (url is None or url == ''): return
			if section == 1: input = keep
			else: input = url
			def search(): return [input]
			query = cache.get(search, 600000000, table='rel_srch')
			def search(): return [x for y,x in enumerate((query + [input])) if x not in (query + [input])[:y]]
			cache.get(search, 0, table='rel_srch')
			links = client.request(link)
			links = re.findall(r'<link>(.+?)</link>', links)
			if section == 0: links = [i for i in links if str(i).startswith('http')]
			else: links = [i for i in links if str(i).startswith('http') and matcher.lower() in str(i).lower()]
			self.list = [] ; threads = []
			for link in links: threads.append(workers.Thread(self.it_list, link))
			[i.start() for i in threads]
			[i.join() for i in threads]
			self.list = [i for i in self.list if url.lower() in i['name'].lower()]
			for i in self.list:
				try:
					name = ''
					if not i['vip'] in ['No-Name TV']: name += '[B]%s[/B] | ' % i['vip'].upper()
					name += i['name']
					i.update({'name' : name})
				except: pass
			for i in self.list: i.update({'content': 'videos'})
			self.addDirectory(self.list)
Beispiel #5
0
	def super_info(self, i):
		try:
			if self.list[i]['metacache']: return
			imdb = self.list[i].get('imdb', '') ; tmdb = self.list[i].get('tmdb', '')
#### -- Missing id's lookup -- ####
			if not tmdb and imdb:
				try:
					result = cache.get(tmdb_indexer.Movies().IdLookup, 96, imdb)
					tmdb = str(result.get('id', '')) if result.get('id') else ''
				except: tmdb = ''
			if not tmdb and imdb:
				trakt_ids = trakt.IdLookup('imdb', imdb, 'movie')
				if trakt_ids: tmdb = str(trakt_ids.get('tmdb', '')) if trakt_ids.get('tmdb') else ''
			if not tmdb and not imdb:
				try:
					results = trakt.SearchMovie(title=quote_plus(self.list[i]['title']), year=self.list[i]['year'], fields='title', full=False)
					if results[0]['movie']['title'] != self.list[i]['title'] or results[0]['movie']['year'] != self.list[i]['year']: return
					ids = results[0].get('movie', {}).get('ids', {})
					if not tmdb: tmdb = str(ids.get('tmdb', '')) if ids.get('tmdb') else ''
					if not imdb: imdb = str(ids.get('imdb', '')) if ids.get('imdb') else ''
				except: pass
#################################
			if not tmdb: return
			movie_meta = cache.get(tmdb_indexer.Movies().get_movie_meta, 96, tmdb)
			if not movie_meta: return
			values = {}
			values.update(movie_meta)
			if 'rating' in self.list[i] and self.list[i]['rating']: del values['rating'] #prefer trakt rating and votes if set
			if 'votes' in self.list[i] and self.list[i]['votes']: del values['votes'] 
			if 'year' in self.list[i] and self.list[i]['year'] != values.get('year'): del values['year'] 
			if not imdb: imdb = values.get('imdb', '')
			if not values.get('imdb'): values['imdb'] = imdb
			if not values.get('tmdb'): values['tmdb'] = tmdb
			if self.lang != 'en':
				try:
					# if self.lang == 'en' or self.lang not in values.get('available_translations', [self.lang]): raise Exception()
					trans_item = trakt.getMovieTranslation(imdb, self.lang, full=True)
					if trans_item:
						if trans_item.get('title'): values['title'] = trans_item.get('title')
						if trans_item.get('overview'): values['plot'] =trans_item.get('overview')
				except:
					from resources.lib.modules import log_utils
					log_utils.error()
			if self.enable_fanarttv:
				extended_art = fanarttv_cache.get(fanarttv.get_movie_art, 168, imdb, tmdb)
				if extended_art: values.update(extended_art)
			values = dict((k, v) for k, v in iter(values.items()) if v is not None and v != '') # remove empty keys so .update() doesn't over-write good meta with empty values.
			self.list[i].update(values)
			meta = {'imdb': imdb, 'tmdb': tmdb, 'tvdb': '', 'lang': self.lang, 'user': self.user, 'item': values}
			self.meta.append(meta)
		except:
			from resources.lib.modules import log_utils
			log_utils.error()
Beispiel #6
0
def getSeasons(id, full=True):
    try:
        url = '/shows/%s/seasons' % (id)
        if full: url += '&extended=full'
        return cache.get(getTraktAsJson, 48, url)
    except:
        log_utils.error()
Beispiel #7
0
def getPeople(id, content_type, full=True):
    try:
        url = '/%s/%s/people' % (content_type, id)
        if full: url += '?extended=full'
        return cache.get(getTraktAsJson, 96, url)
    except:
        log_utils.error()
Beispiel #8
0
	def search(self, url):
		try:
			mark = False
			if (url is None or url == ''):
				self.list = [{'name': 30702, 'action': 'addSearch'}]
				self.list += [{'name': 30703, 'action': 'delSearch'}]
			else:
				if '|SECTION|' in url: mark = url.split('|SECTION|')[0]
				self.list = [{'name': 30702, 'url': url, 'action': 'addSearch'}]
				self.list += [{'name': 30703, 'action': 'delSearch'}]
			try:
				def search(): return
				query = cache.get(search, 600000000, table='rel_srch')
				for url in query:
					if mark != False:
						if mark in url:
							name = url.split('|SPLITER|')[0]
							try: self.list += [{'name': '%s...' % name, 'url': url, 'action': 'addSearch'}]
							except: pass
					else:
						if not '|SPLITER|' in url:
							try: self.list += [{'name': '%s...' % url, 'url': url, 'action': 'addSearch'}]
							except: pass
			except: pass
			self.addDirectory(self.list)
			return self.list
		except:
			log_utils.error()
Beispiel #9
0
	def IdLookup(self, imdb, tvdb=None):
		if not imdb and not tvdb: return
		try:
			result = None
			find_url = base_link + 'find/%s?api_key=%s&external_source=%s'
			if imdb:
				url = find_url % (imdb, API_key, 'imdb_id')
				try: result = cache.get(get_request, 96, url)['tv_results'][0]
				except: pass
			if tvdb and not result:
				url = find_url % (tvdb, API_key, 'tvdb_id')
				try: result = cache.get(get_request, 96, url)['tv_results'][0]
				except: return None
		except:
			log_utils.error()
		return result
Beispiel #10
0
def getTVShowSummary(id, full=True):
    try:
        url = '/shows/%s' % id
        if full: url += '?extended=full'
        return cache.get(getTraktAsJson, 48, url)
    except:
        log_utils.error()
Beispiel #11
0
def getEpisodeSummary(id, season, episode, full=True):
    try:
        url = '/shows/%s/seasons/%s/episodes/%s' % (id, season, episode)
        if full: url += '&extended=full'
        return cache.get(getTraktAsJson, 48, url)
    except:
        log_utils.error()
Beispiel #12
0
def getMovieTranslation(id, lang, full=False):
    url = '/movies/%s/translations/%s' % (id, lang)
    try:
        item = cache.get(getTraktAsJson, 48, url)[0]
        result = item if full else item.get('title')
        return None if result == 'none' else result
    except:
        log_utils.error()
Beispiel #13
0
def SearchEpisode(title, season, episode, full=True):
    try:
        url = '/search/%s/seasons/%s/episodes/%s' % (title, season, episode)
        if full: url += '&extended=full'
        return cache.get(getTraktAsJson, 48, url)
    except:
        log_utils.error()
        return
	def get_hosts_regex(self):
		hosts_regexDict = {'Real-Debrid': []}
		try:
			result = cache.get(self._get, 168, hosts_regex_url)
			hosts_regexDict['Real-Debrid'] = result
		except:
			log_utils.error()
		return hosts_regexDict
Beispiel #15
0
		def items_list(i):
			if self.list[i]['metacache']: 	return
			try:
				values = {}
				tmdb = self.list[i].get('tmdb', '')
				# movie_meta = self.get_movie_meta(tmdb)
				movie_meta = cache.get(self.get_movie_meta, 96, tmdb)
				values.update(movie_meta)
				imdb = values['imdb']
				if not self.disable_fanarttv:
					extended_art = cache.get(fanarttv.get_movie_art, 168, imdb, tmdb)
					if extended_art: values.update(extended_art)
				values = dict((k,v) for k, v in control.iteritems(values) if v is not None and v != '') # remove empty keys so .update() doesn't over-write good meta with empty values.
				self.list[i].update(values)
				meta = {'imdb': imdb, 'tmdb': tmdb, 'tvdb': '', 'lang': self.lang, 'user': self.user, 'item': values}
				self.meta.append(meta)
			except:
				log_utils.error()
Beispiel #16
0
def getGenre(content, type, type_id):
    try:
        url = '/search/%s/%s?type=%s&extended=full' % (type, type_id, content)
        result = cache.get(getTraktAsJson, 168, url)
        if not result: return []
        return result[0].get(content, {}).get('genres', [])
    except:
        log_utils.error()
        return []
Beispiel #17
0
	def get_external_ids(self, tmdb):
		if not tmdb: return None
		try:
			result = None
			url = base_link + 'tv/%s/external_ids?api_key=%s' % (tmdb, API_key)
			# result = get_request(url)
			result = cache.get(get_request, 96, url)
		except:
			log_utils.error()
		return result
Beispiel #18
0
	def request(self, endpoint, query=None):
		try:
			if query: query = '?' + urlencode(query)
			else: query = ''
			request = self.api_url % (endpoint, query)
			response = cache.get(client.request, 24, request)
			return jsloads(response)
		except:
			log_utils.error()
			return {}
Beispiel #19
0
def SearchTVShow(title, year, fields=None, full=True):
    try:
        url = '/search/show?query=%s' % title
        if year: url += '&year=%s' % year
        if fields: url += '&fields=%s' % fields
        if full: url += '&extended=full'
        return cache.get(getTraktAsJson, 48, url)
    except:
        log_utils.error()
        return
Beispiel #20
0
def IdLookup(
    id_type, id, type
):  # ("id_type" can be trakt , imdb , tmdb , tvdb) (type can be one of "movie , show , episode , person , list")
    try:
        url = '/search/%s/%s?type=%s' % (id_type, id, type)
        result = cache.get(getTraktAsJson, 168, url)
        if not result: return None
        return result[0].get(type).get('ids')
    except:
        log_utils.error()
        return None
	def get_hosts(self):
		hosts_dict = {'Premiumize.me': []}
		hosts = []
		try:
			result = cache.get(self._get, 168, list_services_path_url)
			for x in result['directdl']:
				for alias in result['aliases'][x]: hosts.append(alias)
			hosts_dict['Premiumize.me'] = list(set(hosts))
		except:
			log_utils.error()
		return hosts_dict
Beispiel #22
0
	def get_season_isAiring(self, tmdb, season): # for pack scraping to skip if season is still airing
		if not tmdb or not season: return None
		seasonEpisodes = cache.get(self.get_seasonEpisodes_meta, 96, tmdb, season) # "status" not available this level so must iterate all eps
		unaired_count = 0
		for item in seasonEpisodes['episodes']:
			try:
				premiered = str(item.get('premiered', '')) if item.get('premiered') else ''
				if not premiered: unaired_count += 1
				elif int(re.sub(r'[^0-9]', '', str(premiered))) > int(re.sub(r'[^0-9]', '', str(self.today_date))): unaired_count += 1
			except:
				log_utils.error()
		return 'true' if unaired_count > 0 else 'false'
Beispiel #23
0
	def getTMDb(self, url, idx=True, cached=True):
		self.list = []
		try:
			try: url = getattr(self, url + '_link')
			except: pass
			try: u = urlparse(url).netloc.lower()
			except: pass
			if u in self.tmdb_link and '/list/' in url:
				self.list = cache.get(tmdb_indexer.TVshows().tmdb_collections_list, 0, url)
			elif u in self.tmdb_link and not '/list/' in url:
				duration = 168 if cached else 0
				self.list = cache.get(tmdb_indexer.TVshows().tmdb_list, duration, url)
			if self.list is None: self.list = []
			if idx: self.tvshowDirectory(self.list)
			return self.list
		except:
			from resources.lib.modules import log_utils
			log_utils.error()
			if not self.list:
				control.hide()
				if self.notifications: control.notification(title=32002, message=33049)
Beispiel #24
0
	def youtube(self, url, action):
		try:
			key = trailer.trailer().key_link.split('=', 1)[-1]
			if 'PlaylistTuner' in action:
				self.list = cache.get(youtube.youtube(key=key).playlist, 1, url)
			elif 'Playlist' in action:
				self.list = cache.get(youtube.youtube(key=key).playlist, 1, url, True)
			elif 'ChannelTuner' in action:
				self.list = cache.get(youtube.youtube(key=key).videos, 1, url)
			elif 'Channel' in action:
				self.list = cache.get(youtube.youtube(key=key).videos, 1, url, True)
			if 'Tuner' in action:
				for i in self.list: i.update({'name': i['title'], 'poster': i['image'], 'action': 'plugin', 'folder': False})
				if 'Tuner2' in action: self.list = sorted(self.list, key=lambda x: random.random())
				self.addDirectory(self.list, queue=True)
			else:
				for i in self.list: i.update({'name': i['title'], 'poster': i['image'], 'nextaction': action, 'action': 'play', 'folder': False})
				self.addDirectory(self.list)
			return self.list
		except:
			log_utils.error()
Beispiel #25
0
def getTVShowTranslation(id, lang, season=None, episode=None, full=False):
    if season and episode:
        url = '/shows/%s/seasons/%s/episodes/%s/translations/%s' % (
            id, season, episode, lang)
    else:
        url = '/shows/%s/translations/%s' % (id, lang)
    try:
        item = cache.get(getTraktAsJson, 48, url)[0]
        result = item if full else item.get('title')
        return None if result == 'none' else result
    except:
        log_utils.error()
	def userlists(self):
		userlists = []
		try:
			if not self.traktCredentials: raise Exception()
			activity = trakt.getActivity()
			self.list = [] ; lists = []
			try:
				if activity > cache.timeout(self.trakt_user_list, self.traktlists_link, self.trakt_user): raise Exception()
				lists += cache.get(self.trakt_user_list, 720, self.traktlists_link, self.trakt_user)
			except:
				lists += cache.get(self.trakt_user_list, 0, self.traktlists_link, self.trakt_user)
			for i in range(len(lists)): lists[i].update({'image': 'trakt.png', 'icon': 'DefaultVideoPlaylists.png', 'action': 'movies'})
			userlists += lists
		except: pass
		try:
			if not self.traktCredentials: raise Exception()
			self.list = [] ; lists = []
			try:
				if activity > cache.timeout(self.trakt_user_list, self.traktlikedlists_link, self.trakt_user): raise Exception()
				lists += cache.get(self.trakt_user_list, 3, self.traktlikedlists_link, self.trakt_user)
			except:
				lists += cache.get(self.trakt_user_list, 0, self.traktlikedlists_link, self.trakt_user)
			for i in range(len(lists)): lists[i].update({'image': 'trakt.png', 'icon': 'DefaultVideoPlaylists.png', 'action': 'movies'})
			userlists += lists
		except: pass
		try:
			if not self.imdb_user: raise Exception()
			self.list = []
			lists = cache.get(self.imdb_user_list, 0, self.imdblists_link)
			for i in range(len(lists)): lists[i].update({'image': 'imdb.png', 'icon': 'DefaultVideoPlaylists.png', 'action': 'movies'})
			userlists += lists
		except: pass
		try:
			if self.tmdb_session_id == '': raise Exception()
			self.list = []
			lists = cache.get(tmdb_indexer.userlists, 0, self.tmdb_userlists_link)
			for i in range(len(lists)): lists[i].update({'image': 'tmdb.png', 'icon': 'DefaultVideoPlaylists.png', 'action': 'tmdbmovies'})
			userlists += lists
		except: pass
		self.list = []
		for i in range(len(userlists)): # Filter the user's own lists that were
			contains = False
			adapted = userlists[i]['url'].replace('/me/', '/%s/' % self.trakt_user)
			for j in range(len(self.list)):
				if adapted == self.list[j]['url'].replace('/me/', '/%s/' % self.trakt_user):
					contains = True
					break
			if not contains: self.list.append(userlists[i])
		if self.tmdb_session_id != '': # TMDb Favorites
			self.list.insert(0, {'name': control.lang(32026), 'url': self.tmdb_favorites_link, 'image': 'tmdb.png', 'icon': 'DefaultVideoPlaylists.png', 'action': 'tmdbmovies'})
		if self.tmdb_session_id != '': # TMDb Watchlist
			self.list.insert(0, {'name': control.lang(32033), 'url': self.tmdb_watchlist_link, 'image': 'tmdb.png', 'icon': 'DefaultVideoPlaylists.png', 'action': 'tmdbmovies'})
		if self.imdb_user != '': # imdb Watchlist
			self.list.insert(0, {'name': control.lang(32033), 'url': self.imdbwatchlist_link, 'image': 'imdb.png', 'icon': 'DefaultVideoPlaylists.png', 'action': 'movies'})
		if self.imdb_user != '': # imdb My Ratings
			self.list.insert(0, {'name': control.lang(32025), 'url': self.imdbratings_link, 'image': 'imdb.png', 'icon': 'DefaultVideoPlaylists.png', 'action': 'movies'})
		if self.traktCredentials: # Trakt Watchlist
			self.list.insert(0, {'name': control.lang(32033), 'url': self.traktwatchlist_link, 'image': 'trakt.png', 'icon': 'DefaultVideoPlaylists.png', 'action': 'movies'})
		self.addDirectory(self.list, queue=True)
		return self.list
	def unfinished(self, url, idx=True):
		self.list = []
		try:
			try: url = getattr(self, url + '_link')
			except: pass
			activity = trakt.getPausedActivity()
			if url == self.traktunfinished_link :
				try:
					if activity > cache.timeout(self.trakt_list, self.traktunfinished_link, self.trakt_user):
						raise Exception()
					self.list = cache.get(self.trakt_list, 720, self.traktunfinished_link , self.trakt_user)
				except:
					self.list = cache.get(self.trakt_list, 0, self.traktunfinished_link , self.trakt_user)
				if idx: self.worker()
			if idx:
				self.list = sorted(self.list, key=lambda k: k['paused_at'], reverse=True)
				self.movieDirectory(self.list, unfinished=True, next=False)
			return self.list
		except:
			log_utils.error()
			if not self.list:
				control.hide()
				if self.notifications: control.notification(title=32001, message=33049)
Beispiel #28
0
 def get_hosts(self):
     url = 'hosts'
     hosts_dict = {'AllDebrid': []}
     hosts = []
     try:
         result = cache.get(self._get, 168, url)
         result = result['hosts']
         for k, v in result.items():
             try:
                 hosts.extend(v['domains'])
             except:
                 pass
         hosts_dict['AllDebrid'] = list(set(hosts))
     except:
         log_utils.error()
     return hosts_dict
Beispiel #29
0
	def imdb_list(self, url, isRatinglink=False):
		list = [] ; items = [] ; dupes = []
		try:
			for i in re.findall(r'date\[(\d+)\]', url):
				url = url.replace('date[%s]' % i, (self.date_time - timedelta(days=int(i))).strftime('%Y-%m-%d'))
			def imdb_watchlist_id(url):
				return client.parseDOM(client.request(url), 'meta', ret='content', attrs = {'property': 'pageId'})[0]
			if url == self.imdbwatchlist_link:
				url = cache.get(imdb_watchlist_id, 8640, url)
				url = self.imdbwatchlist2_link % url
			result = client.request(url)
			result = result.replace('\n', ' ')
			items = client.parseDOM(result, 'div', attrs = {'class': '.+? lister-item'}) + client.parseDOM(result, 'div', attrs = {'class': 'lister-item .+?'})
			items += client.parseDOM(result, 'div', attrs = {'class': 'list_item.+?'})
		except:
			from resources.lib.modules import log_utils
			log_utils.error()
			return
		try:
			# HTML syntax error, " directly followed by attribute name. Insert space in between. parseDOM can otherwise not handle it.
			result = result.replace('"class="lister-page-next', '" class="lister-page-next')
			next = client.parseDOM(result, 'a', ret='href', attrs = {'class': 'lister-page-next.+?'})
			if len(next) == 0:
				next = client.parseDOM(result, 'div', attrs = {'class': 'pagination'})[0]
				next = zip(client.parseDOM(next, 'a', ret='href'), client.parseDOM(next, 'a'))
				next = [i[0] for i in next if 'Next' in i[1]]
			next = url.replace(urlparse(url).query, urlparse(next[0]).query)
			next = client.replaceHTMLCodes(next)
		except:
			next = ''
		for item in items:
			try:
				title = client.replaceHTMLCodes(client.parseDOM(item, 'a')[1])
				year = client.parseDOM(item, 'span', attrs = {'class': 'lister-item-year.+?'})
				year += client.parseDOM(item, 'span', attrs = {'class': 'year_type'})
				year = re.findall(r'(\d{4})', year[0])[0]
				if int(year) > int((self.date_time).strftime('%Y')): raise Exception()
				imdb = client.parseDOM(item, 'a', ret='href')[0]
				imdb = re.findall(r'(tt\d*)', imdb)[0]
				if imdb in dupes: raise Exception()
				dupes.append(imdb)
				list.append({'title': title, 'tvshowtitle': title, 'originaltitle': title, 'year': year, 'imdb': imdb, 'tmdb': '', 'tvdb': '', 'next': next}) # just let super_info() TMDb request provide the meta and pass min to retrieve it
			except:
				from resources.lib.modules import log_utils
				log_utils.error()
		return list
Beispiel #30
0
	def getTVmaze(self, url, idx=True):
		from resources.lib.indexers import tvmaze
		self.list = []
		try:
			try: url = getattr(self, url + '_link')
			except: pass
			self.list = cache.get(tvmaze.tvshows().tvmaze_list, 168, url)
			# if idx: self.worker() ## TVMaze has it's own full list builder.
			if self.list is None: self.list = []
			if idx: self.tvshowDirectory(self.list)
			return self.list
		except:
			from resources.lib.modules import log_utils
			log_utils.error()
			if not self.list:
				control.hide()
				if self.notifications: control.notification(title=32002, message=33049)