StreamingCommunity Ripristinato Messaggio "Prossimamente"

This commit is contained in:
Alhaziel01
2022-11-15 19:14:17 +01:00
committed by marco
parent 5cc6c78228
commit 7e3cb693ab
3 changed files with 14 additions and 6 deletions

View File

@@ -308,20 +308,22 @@ def resolve_video_urls_for_playing(server, url, video_password="", muestra_dialo
try:
video_exists, message = server_module.test_video_exists(page_url=url)
if not video_exists:
if video_exists == False:
error_messages.append(message)
logger.info("test_video_exists says video doesn't exist")
if muestra_dialogo:
progreso.close()
else:
elif video_exists == True:
logger.info("test_video_exists says the video DOES exist")
else:
error_messages.append(message)
except:
logger.error("Could not verify if the video exists")
import traceback
logger.error(traceback.format_exc())
# If the video exists and the free mode is available, we get the url
if video_exists:
if video_exists == True:
for opcion in opciones:
# Own free and premium option uses the same server
if opcion == "free" or opcion == server:
@@ -388,8 +390,9 @@ def resolve_video_urls_for_playing(server, url, video_password="", muestra_dialo
# If we do not have urls or error messages, we put a generic one
elif not video_urls and not error_messages:
error_messages.append(config.get_localized_string(60014))
video_exists = len(video_urls) > 0
return video_urls, len(video_urls) > 0, "<br/>".join(error_messages)
return video_urls, video_exists, "<br/>".join(error_messages)
def get_server_name(serverid):

View File

@@ -1330,7 +1330,7 @@ def get_dialogo_opciones(item, default_action, strm, autoplay):
seleccion = 0
# If you can see the video, present the options
if puedes:
if puedes == True:
for video_url in video_urls:
opciones.append(config.get_localized_string(60221) + " " + video_url[0])
@@ -1359,7 +1359,7 @@ def get_dialogo_opciones(item, default_action, strm, autoplay):
opciones.append(config.get_localized_string(30162))
# If you can't see the video it informs you
else:
elif puedes == False:
if not autoplay:
if item.server != "":
if "<br/>" in motivo:
@@ -1378,6 +1378,9 @@ def get_dialogo_opciones(item, default_action, strm, autoplay):
if len(opciones) == 0:
error = True
else:
dialog_notification(puedes, motivo)
return opciones, video_urls, seleccion, error

View File

@@ -15,6 +15,8 @@ def test_video_exists(page_url):
page = httptools.downloadpage(page_url)
if page.url == page_url: # se non esiste, reindirizza all'ultimo url chiamato esistente
scws_id = support.scrapertools.find_single_match(page.data, r'scws_id[^:]+:(\d+)')
else:
return 'StreamingCommunity', 'Prossimamente'
if not scws_id:
return False, config.get_localized_string(70449) % 'StreamingCommunityWS'