- Aggiungi alla videoteca se non si sa se è un film o una serie
This commit is contained in:
+6
-3
@@ -410,15 +410,18 @@ def set_infoLabels_item(item, seekTmdb=True, search_language=def_lang, lock=None
|
||||
# do it by title
|
||||
if search_type == 'tv':
|
||||
# Serial search by title and filtering your results if necessary
|
||||
otmdb = Tmdb(searched_text=scrapertools.unescape(item.infoLabels['tvshowtitle']), search_type=search_type,
|
||||
searched_title = scrapertools.unescape(item.infoLabels['tvshowtitle'])
|
||||
searched_title = searched_title.split('-')[0].strip()
|
||||
otmdb = Tmdb(searched_text=searched_title, search_type=search_type,
|
||||
search_language=search_language, filtro=item.infoLabels.get('filtro', {}),
|
||||
year=item.infoLabels['year'])
|
||||
else:
|
||||
# Movie search by title ...
|
||||
# if item.infoLabels['year'] or item.infoLabels['filtro']:
|
||||
# ...and year or filter
|
||||
searched_title = item.contentTitle if item.contentTitle else item.fulltitle
|
||||
otmdb = Tmdb(searched_text=scrapertools.unescape(searched_title), search_type=search_type, search_language=search_language,
|
||||
searched_title = scrapertools.unescape(item.contentTitle if item.contentTitle else item.fulltitle)
|
||||
searched_title = searched_title.split('-')[0].strip()
|
||||
otmdb = Tmdb(searched_text=searched_title, search_type=search_type, search_language=search_language,
|
||||
filtro=item.infoLabels.get('filtro', {}), year=item.infoLabels['year'])
|
||||
if otmdb is not None:
|
||||
if otmdb.get_id() and config.get_setting("tmdb_plus_info", default=False):
|
||||
|
||||
@@ -949,6 +949,14 @@ def get_local_content(path):
|
||||
return local_episodelist
|
||||
|
||||
|
||||
def add_to_videolibrary(item, channel):
|
||||
itemlist = getattr(channel, item.from_action)(item)
|
||||
if itemlist and itemlist[0].contentType == 'episode':
|
||||
return add_tvshow(item, channel)
|
||||
else:
|
||||
return add_movie(item)
|
||||
|
||||
|
||||
def add_movie(item):
|
||||
"""
|
||||
Keep a movie at the movie library. The movie can be a link within a channel or a previously downloaded video.
|
||||
@@ -966,6 +974,7 @@ def add_movie(item):
|
||||
"""
|
||||
logger.debug()
|
||||
from platformcode.launcher import set_search_temp; set_search_temp(item)
|
||||
item.contentType = 'movie'
|
||||
|
||||
# To disambiguate titles, TMDB is caused to ask for the really desired title
|
||||
# The user can select the title among those offered on the first screen
|
||||
@@ -1012,6 +1021,7 @@ def add_tvshow(item, channel=None):
|
||||
"""
|
||||
|
||||
logger.debug("show=#" + item.show + "#")
|
||||
item.contentType = 'tvshow'
|
||||
from platformcode.launcher import set_search_temp; set_search_temp(item)
|
||||
|
||||
if item.channel == "downloads":
|
||||
|
||||
Reference in New Issue
Block a user