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
+7 -4
View File
@@ -308,20 +308,22 @@ def resolve_video_urls_for_playing(server, url, video_password="", muestra_dialo
try: try:
video_exists, message = server_module.test_video_exists(page_url=url) video_exists, message = server_module.test_video_exists(page_url=url)
if not video_exists: if video_exists == False:
error_messages.append(message) error_messages.append(message)
logger.info("test_video_exists says video doesn't exist") logger.info("test_video_exists says video doesn't exist")
if muestra_dialogo: if muestra_dialogo:
progreso.close() progreso.close()
else: elif video_exists == True:
logger.info("test_video_exists says the video DOES exist") logger.info("test_video_exists says the video DOES exist")
else:
error_messages.append(message)
except: except:
logger.error("Could not verify if the video exists") logger.error("Could not verify if the video exists")
import traceback import traceback
logger.error(traceback.format_exc()) logger.error(traceback.format_exc())
# If the video exists and the free mode is available, we get the url # 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: for opcion in opciones:
# Own free and premium option uses the same server # Own free and premium option uses the same server
if opcion == "free" or opcion == 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 # If we do not have urls or error messages, we put a generic one
elif not video_urls and not error_messages: elif not video_urls and not error_messages:
error_messages.append(config.get_localized_string(60014)) 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): def get_server_name(serverid):
+5 -2
View File
@@ -1330,7 +1330,7 @@ def get_dialogo_opciones(item, default_action, strm, autoplay):
seleccion = 0 seleccion = 0
# If you can see the video, present the options # If you can see the video, present the options
if puedes: if puedes == True:
for video_url in video_urls: for video_url in video_urls:
opciones.append(config.get_localized_string(60221) + " " + video_url[0]) 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)) opciones.append(config.get_localized_string(30162))
# If you can't see the video it informs you # If you can't see the video it informs you
else: elif puedes == False:
if not autoplay: if not autoplay:
if item.server != "": if item.server != "":
if "<br/>" in motivo: if "<br/>" in motivo:
@@ -1378,6 +1378,9 @@ def get_dialogo_opciones(item, default_action, strm, autoplay):
if len(opciones) == 0: if len(opciones) == 0:
error = True error = True
else:
dialog_notification(puedes, motivo)
return opciones, video_urls, seleccion, error return opciones, video_urls, seleccion, error
+2
View File
@@ -15,6 +15,8 @@ def test_video_exists(page_url):
page = httptools.downloadpage(page_url) page = httptools.downloadpage(page_url)
if page.url == page_url: # se non esiste, reindirizza all'ultimo url chiamato esistente 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+)') scws_id = support.scrapertools.find_single_match(page.data, r'scws_id[^:]+:(\d+)')
else:
return 'StreamingCommunity', 'Prossimamente'
if not scws_id: if not scws_id:
return False, config.get_localized_string(70449) % 'StreamingCommunityWS' return False, config.get_localized_string(70449) % 'StreamingCommunityWS'