BinaryONe
commited on
Commit
ยท
dd524d1
1
Parent(s):
5c35400
Enabled Debugging - APi Changes
Browse files
FileStream/TMDB/Endpoint.py
CHANGED
@@ -9,7 +9,6 @@ def get_tvshows(tv_show_id):
|
|
9 |
def search_tmdb_movies(name):
|
10 |
# Search for the title in TMDb
|
11 |
title, year = Get_Title_Year(name)
|
12 |
-
print("*", title, year,"\n Name :", name)
|
13 |
if title is None :
|
14 |
return None
|
15 |
search_results = search.multi(title)
|
@@ -19,7 +18,8 @@ def search_tmdb_movies(name):
|
|
19 |
if result.media_type == "movie":
|
20 |
release_date=result.release_date or result.get("release_date") or result.get("first_air_date")
|
21 |
if release_date and int(release_date.split('-')[0]) == year:
|
22 |
-
|
|
|
23 |
|
24 |
except Exception as e :
|
25 |
print("* Error at Endpoint", e, result)
|
|
|
9 |
def search_tmdb_movies(name):
|
10 |
# Search for the title in TMDb
|
11 |
title, year = Get_Title_Year(name)
|
|
|
12 |
if title is None :
|
13 |
return None
|
14 |
search_results = search.multi(title)
|
|
|
18 |
if result.media_type == "movie":
|
19 |
release_date=result.release_date or result.get("release_date") or result.get("first_air_date")
|
20 |
if release_date and int(release_date.split('-')[0]) == year:
|
21 |
+
print("*", title, year,"\n Name :", name ,"\n TMDB response" ,result, type(result))
|
22 |
+
return dict(result)
|
23 |
|
24 |
except Exception as e :
|
25 |
print("* Error at Endpoint", e, result)
|
FileStream/Tools/cleanup.py
CHANGED
@@ -49,7 +49,7 @@ def clean_text(input_text):
|
|
49 |
|
50 |
def Get_Title_Year(name):
|
51 |
# Regex to match title and year
|
52 |
-
words_to_remove = ["Fษชสแด ษดแดแดแด :","FC", "HEVC","
|
53 |
name=remove_words(name, words_to_remove)
|
54 |
match = re.search(r'(?P<title>.+?)[\s\.\(\)]*(?P<year>\d{4})',name )
|
55 |
|
|
|
49 |
|
50 |
def Get_Title_Year(name):
|
51 |
# Regex to match title and year
|
52 |
+
words_to_remove = ["Fษชสแด","Fษชสแด ษดแดแดแด :","FC", "HEVC","ษดแดแดแด","-","BuLMoviee" ,"๐๐ผ๐ถ๐ป ๐จ๐ ๐ข๐ป ๐ง๐ฒ๐น๐ฒ๐ด๐ฟ๐ฎ๏ฟฝ","๐๐ผ๐ถ๐ป ๐จ๐ ๐ข๐ป ๐ง๐ฒ๐น๐ฒ๐ด๐ฟ๐ฎ๐บ","SIDHUU 591","๐ฑ๐๐๐ ๐ผ๐ ๐ถษด ๐ปแดสแดษขสแดแด","Tษชแดสแด :","Bollywood","mkv","Mแดแด ษชแด", "ษขสแดแดแด" , "TGxMALLU_MOVIE"]
|
53 |
name=remove_words(name, words_to_remove)
|
54 |
match = re.search(r'(?P<title>.+?)[\s\.\(\)]*(?P<year>\d{4})',name )
|
55 |
|
FileStream/server/routes_api.py
CHANGED
@@ -31,7 +31,7 @@ async def handle_v2(request):
|
|
31 |
|
32 |
#api.router.add_get('/10/files', list_10_all_files_db)
|
33 |
async def list_10_all_files_db(request):
|
34 |
-
file_range = [file_list_no * 10 - 10 + 1, file_list_no * 10]
|
35 |
files, total_files = await db.find_all_files([1, 10])
|
36 |
return web.json_response(json.loads(dumps(files)), headers=CORS_HEADERS)
|
37 |
|
|
|
31 |
|
32 |
#api.router.add_get('/10/files', list_10_all_files_db)
|
33 |
async def list_10_all_files_db(request):
|
34 |
+
#file_range = [file_list_no * 10 - 10 + 1, file_list_no * 10]
|
35 |
files, total_files = await db.find_all_files([1, 10])
|
36 |
return web.json_response(json.loads(dumps(files)), headers=CORS_HEADERS)
|
37 |
|