mirror of
https://github.com/Arrowar/StreamingCommunity.git
synced 2025-06-06 11:35:29 +00:00
40 lines
838 B
Python
40 lines
838 B
Python
# 09.06.24
|
|
|
|
# Internal utilities
|
|
from Src.Util.console import console, msg
|
|
|
|
|
|
# Logic class
|
|
from .site import title_search, run_get_select_title
|
|
from .serie import download_serie
|
|
|
|
|
|
|
|
# Variable
|
|
indice = 6
|
|
_deprecate = True
|
|
|
|
|
|
def search():
|
|
"""
|
|
Main function of the application for film and series.
|
|
"""
|
|
|
|
# Make request to site to get content that corrsisponde to that string
|
|
string_to_search = msg.ask("\n[purple]Insert word to search in all site").strip()
|
|
len_database = title_search(string_to_search)
|
|
|
|
if len_database > 0:
|
|
|
|
# Select title from list
|
|
select_title = run_get_select_title()
|
|
|
|
# Download only TV
|
|
download_serie(select_title)
|
|
|
|
else:
|
|
console.print(f"\n[red]Nothing matching was found for[white]: [purple]{string_to_search}")
|
|
|
|
# Retry
|
|
search()
|