Remove run_get_select_title

This commit is contained in:
Dark1291 2025-02-11 12:49:12 +01:00
parent 88edb3766c
commit 3bf63e9166
17 changed files with 33 additions and 91 deletions

View File

@ -1,16 +1,15 @@
# 02.07.24 # 02.07.24
import sys
import subprocess
from urllib.parse import quote_plus from urllib.parse import quote_plus
# Internal utilities # Internal utilities
from StreamingCommunity.Util.console import console, msg from StreamingCommunity.Util.console import console, msg
from StreamingCommunity.Api.Template import get_select_title
# Logic class # Logic class
from .site import title_search, run_get_select_title, media_search_manager from .site import title_search, media_search_manager, table_show_manager
from .title import download_title from .title import download_title
@ -40,7 +39,7 @@ def search(string_to_search: str = None, get_onylDatabase: bool = False):
if len_database > 0: if len_database > 0:
# Select title from list # Select title from list
select_title = run_get_select_title() select_title = get_select_title(table_show_manager, media_search_manager)
# Download title # Download title
download_title(select_title) download_title(select_title)

View File

@ -13,7 +13,6 @@ from StreamingCommunity.Util.table import TVShowManager
# Logic class # Logic class
from StreamingCommunity.Api.Template import get_select_title
from StreamingCommunity.Api.Template.Util import search_domain from StreamingCommunity.Api.Template.Util import search_domain
from StreamingCommunity.Api.Template.Class.SearchType import MediaManager from StreamingCommunity.Api.Template.Class.SearchType import MediaManager
@ -78,10 +77,3 @@ def title_search(word_to_search: str) -> int:
# Return the number of titles found # Return the number of titles found
return media_search_manager.get_length() return media_search_manager.get_length()
def run_get_select_title():
"""
Display a selection of titles and prompt the user to choose one.
"""
return get_select_title(table_show_manager, media_search_manager)

View File

@ -7,11 +7,12 @@ from urllib.parse import quote_plus
# Internal utilities # Internal utilities
from StreamingCommunity.Util.console import console, msg from StreamingCommunity.Util.console import console, msg
from StreamingCommunity.Api.Template import get_select_title
from StreamingCommunity.TelegramHelp.telegram_bot import get_bot_instance from StreamingCommunity.TelegramHelp.telegram_bot import get_bot_instance
# Logic class # Logic class
from .site import title_search, run_get_select_title, media_search_manager from .site import title_search, media_search_manager, table_show_manager
from .film import download_film from .film import download_film
@ -60,7 +61,7 @@ def search(string_to_search: str = None, get_onylDatabase: bool = False):
if len_database > 0: if len_database > 0:
# Select title from list # Select title from list
select_title = run_get_select_title() select_title = get_select_title(table_show_manager, media_search_manager)
# Download only film # Download only film
download_film(select_title) download_film(select_title)

View File

@ -13,7 +13,6 @@ from StreamingCommunity.Util.table import TVShowManager
# Logic class # Logic class
from StreamingCommunity.Api.Template import get_select_title
from StreamingCommunity.Api.Template.Util import search_domain from StreamingCommunity.Api.Template.Util import search_domain
from StreamingCommunity.Api.Template.Class.SearchType import MediaManager from StreamingCommunity.Api.Template.Class.SearchType import MediaManager
@ -108,10 +107,3 @@ def title_search(title_search: str) -> int:
# Return the number of titles found # Return the number of titles found
return media_search_manager.get_length() return media_search_manager.get_length()
def run_get_select_title():
"""
Display a selection of titles and prompt the user to choose one.
"""
return get_select_title(table_show_manager, media_search_manager)

View File

@ -2,16 +2,16 @@
import sys import sys
import subprocess import subprocess
from urllib.parse import quote_plus
# Internal utilities # Internal utilities
from StreamingCommunity.Util.console import console, msg from StreamingCommunity.Util.console import console, msg
from StreamingCommunity.Api.Template import get_select_title
from StreamingCommunity.TelegramHelp.telegram_bot import get_bot_instance from StreamingCommunity.TelegramHelp.telegram_bot import get_bot_instance
# Logic class # Logic class
from .site import title_search, run_get_select_title, media_search_manager from .site import title_search, media_search_manager, table_show_manager
from .film_serie import download_film, download_series from .film_serie import download_film, download_series
@ -58,7 +58,7 @@ def search(string_to_search: str = None, get_onylDatabase: bool = False):
if len_database > 0: if len_database > 0:
# Select title from list (type: TV \ Movie \ OVA) # Select title from list (type: TV \ Movie \ OVA)
select_title = run_get_select_title() select_title = get_select_title(table_show_manager, media_search_manager)
if select_title.type == 'Movie' or select_title.type == 'OVA': if select_title.type == 'Movie' or select_title.type == 'OVA':
download_film(select_title) download_film(select_title)

View File

@ -16,7 +16,6 @@ from StreamingCommunity.TelegramHelp.telegram_bot import get_bot_instance
# Logic class # Logic class
from StreamingCommunity.Api.Template import get_select_title
from StreamingCommunity.Api.Template.Util import search_domain from StreamingCommunity.Api.Template.Util import search_domain
from StreamingCommunity.Api.Template.Class.SearchType import MediaManager from StreamingCommunity.Api.Template.Class.SearchType import MediaManager
@ -183,10 +182,3 @@ def title_search(title: str) -> int:
# Return the length of media search manager # Return the length of media search manager
return media_search_manager.get_length() return media_search_manager.get_length()
def run_get_select_title():
"""
Display a selection of titles and prompt the user to choose one.
"""
return get_select_title(table_show_manager, media_search_manager)

View File

@ -5,10 +5,11 @@ from urllib.parse import quote_plus
# Internal utilities # Internal utilities
from StreamingCommunity.Util.console import console, msg from StreamingCommunity.Util.console import console, msg
from StreamingCommunity.Api.Template import get_select_title
# Logic class # Logic class
from .site import title_search, run_get_select_title, media_search_manager from .site import title_search, media_search_manager, table_show_manager
from .film import download_film from .film import download_film
@ -39,7 +40,7 @@ def search(string_to_search: str = None, get_onylDatabase: bool = False):
if len_database > 0: if len_database > 0:
# Select title from list # Select title from list
select_title = run_get_select_title() select_title = get_select_title(table_show_manager, media_search_manager)
# !!! ADD TYPE DONT WORK FOR SERIE # !!! ADD TYPE DONT WORK FOR SERIE
download_film(select_title) download_film(select_title)

View File

@ -12,7 +12,6 @@ from StreamingCommunity.Util.table import TVShowManager
# Logic class # Logic class
from StreamingCommunity.Api.Template import get_select_title
from StreamingCommunity.Api.Template.Util import search_domain from StreamingCommunity.Api.Template.Util import search_domain
from StreamingCommunity.Api.Template.Class.SearchType import MediaManager from StreamingCommunity.Api.Template.Class.SearchType import MediaManager
@ -74,10 +73,3 @@ def title_search(word_to_search: str) -> int:
# Return the number of titles found # Return the number of titles found
return media_search_manager.get_length() return media_search_manager.get_length()
def run_get_select_title():
"""
Display a selection of titles and prompt the user to choose one.
"""
return get_select_title(table_show_manager, media_search_manager)

View File

@ -6,10 +6,11 @@ from urllib.parse import quote_plus
# Internal utilities # Internal utilities
from StreamingCommunity.Util.console import console, msg from StreamingCommunity.Util.console import console, msg
from StreamingCommunity.Api.Template import get_select_title
# Logic class # Logic class
from .site import title_search, run_get_select_title, media_search_manager from .site import title_search, media_search_manager, table_show_manager
from .series import download_thread from .series import download_thread
@ -40,7 +41,7 @@ def search(string_to_search: str = None, get_onylDatabase: bool = False):
if len_database > 0: if len_database > 0:
# Select title from list # Select title from list
select_title = run_get_select_title() select_title = get_select_title(table_show_manager, media_search_manager)
# Download only film # Download only film
if "Serie TV" in str(select_title.type): if "Serie TV" in str(select_title.type):

View File

@ -16,7 +16,6 @@ from StreamingCommunity.Util.table import TVShowManager
# Logic class # Logic class
from StreamingCommunity.Api.Template import get_select_title
from StreamingCommunity.Api.Template.Util import search_domain from StreamingCommunity.Api.Template.Util import search_domain
from StreamingCommunity.Api.Template.Class.SearchType import MediaManager from StreamingCommunity.Api.Template.Class.SearchType import MediaManager
@ -90,10 +89,3 @@ def title_search(word_to_search: str) -> int:
return -999 return -999
return -9999 return -9999
def run_get_select_title():
"""
Display a selection of titles and prompt the user to choose one.
"""
return get_select_title(table_show_manager, media_search_manager)

View File

@ -5,10 +5,11 @@ from urllib.parse import quote_plus
# Internal utilities # Internal utilities
from StreamingCommunity.Util.console import console, msg from StreamingCommunity.Util.console import console, msg
from StreamingCommunity.Api.Template import get_select_title
# Logic class # Logic class
from .site import title_search, run_get_select_title, media_search_manager from .site import title_search, media_search_manager, table_show_manager
from .series import download_series from .series import download_series
@ -39,7 +40,7 @@ def search(string_to_search: str = None, get_onylDatabase: bool = False):
if len_database > 0: if len_database > 0:
# Select title from list # Select title from list
select_title = run_get_select_title() select_title = get_select_title(table_show_manager, media_search_manager)
# Download only film # Download only film
download_series(select_title) download_series(select_title)

View File

@ -13,7 +13,6 @@ from StreamingCommunity.Util.table import TVShowManager
# Logic class # Logic class
from StreamingCommunity.Api.Template import get_select_title
from StreamingCommunity.Api.Template.Util import search_domain from StreamingCommunity.Api.Template.Util import search_domain
from StreamingCommunity.Api.Template.Class.SearchType import MediaManager from StreamingCommunity.Api.Template.Class.SearchType import MediaManager
@ -81,10 +80,3 @@ def title_search(word_to_search: str) -> int:
# Return the number of titles found # Return the number of titles found
return media_search_manager.get_length() return media_search_manager.get_length()
def run_get_select_title():
"""
Display a selection of titles and prompt the user to choose one.
"""
return get_select_title(table_show_manager, media_search_manager)

View File

@ -6,10 +6,11 @@ from urllib.parse import quote_plus
# Internal utilities # Internal utilities
from StreamingCommunity.Util.console import console, msg from StreamingCommunity.Util.console import console, msg
from StreamingCommunity.Api.Template import get_select_title
# Logic class # Logic class
from .site import title_search, run_get_select_title, media_search_manager from .site import title_search, media_search_manager, table_show_manager
from .title import download_title from .title import download_title
@ -40,7 +41,7 @@ def search(string_to_search: str = None, get_onylDatabase: bool = False):
if len_database > 0: if len_database > 0:
# Select title from list # Select title from list
select_title = run_get_select_title() select_title = get_select_title(table_show_manager, media_search_manager)
# Download title # Download title
download_title(select_title) download_title(select_title)

View File

@ -7,7 +7,6 @@ from StreamingCommunity.Util.table import TVShowManager
# Logic class # Logic class
from StreamingCommunity.Api.Template import get_select_title
from StreamingCommunity.Api.Template.Util import search_domain from StreamingCommunity.Api.Template.Util import search_domain
from StreamingCommunity.Api.Template.Class.SearchType import MediaManager from StreamingCommunity.Api.Template.Class.SearchType import MediaManager
from .util.ilCorsarScraper import IlCorsaroNeroScraper from .util.ilCorsarScraper import IlCorsaroNeroScraper
@ -63,10 +62,3 @@ async def title_search(word_to_search: str) -> int:
# Return the number of titles found # Return the number of titles found
return media_search_manager.get_length() return media_search_manager.get_length()
def run_get_select_title():
"""
Display a selection of titles and prompt the user to choose one.
"""
return get_select_title(table_show_manager, media_search_manager)

View File

@ -7,11 +7,12 @@ from urllib.parse import quote_plus
# Internal utilities # Internal utilities
from StreamingCommunity.Util.console import console, msg from StreamingCommunity.Util.console import console, msg
from StreamingCommunity.Api.Template import get_select_title
from StreamingCommunity.TelegramHelp.telegram_bot import get_bot_instance from StreamingCommunity.TelegramHelp.telegram_bot import get_bot_instance
# Logic class # Logic class
from .site import get_version_and_domain, title_search, run_get_select_title, media_search_manager from .site import get_version_and_domain, title_search, table_show_manager, media_search_manager
from .film import download_film from .film import download_film
from .series import download_series from .series import download_series
@ -62,7 +63,7 @@ def search(string_to_search: str = None, get_onylDatabase: bool = False):
if len_database > 0: if len_database > 0:
# Select title from list # Select title from list
select_title = run_get_select_title() select_title = get_select_title(table_show_manager, media_search_manager)
if select_title.type == 'tv': if select_title.type == 'tv':
download_series(select_title, site_version) download_series(select_title, site_version)

View File

@ -19,7 +19,6 @@ from StreamingCommunity.TelegramHelp.telegram_bot import get_bot_instance
# Logic class # Logic class
from StreamingCommunity.Api.Template import get_select_title
from StreamingCommunity.Api.Template.Util import search_domain from StreamingCommunity.Api.Template.Util import search_domain
from StreamingCommunity.Api.Template.Class.SearchType import MediaManager from StreamingCommunity.Api.Template.Class.SearchType import MediaManager
@ -148,10 +147,3 @@ def title_search(title_search: str, domain: str) -> int:
# Return the number of titles found # Return the number of titles found
return media_search_manager.get_length() return media_search_manager.get_length()
def run_get_select_title():
"""
Display a selection of titles and prompt the user to choose one.
"""
return get_select_title(table_show_manager, media_search_manager)

View File

@ -145,6 +145,7 @@ def initialize():
except: except:
console.log("[red]Error with loading github.") console.log("[red]Error with loading github.")
def restart_script(): def restart_script():
"""Riavvia lo script con gli stessi argomenti della riga di comando.""" """Riavvia lo script con gli stessi argomenti della riga di comando."""
print("\n🔄 Riavvio dello script...\n") print("\n🔄 Riavvio dello script...\n")