Spaces:
Running
Running
BinaryONe
commited on
Commit
·
9589968
1
Parent(s):
ae8ac11
Callback Update
Browse files
FileStream/APIs/TMDB/Endpoint.py
CHANGED
@@ -61,7 +61,6 @@ def search_tmdb_any(title: str, year: str):
|
|
61 |
"""
|
62 |
try:
|
63 |
# Validate inputs
|
64 |
-
year = int(year)
|
65 |
if not isinstance(title, str) or not isinstance(year, int):
|
66 |
logging.warning("Invalid input: Title must be a string, and Year must be an integer.")
|
67 |
return None
|
|
|
61 |
"""
|
62 |
try:
|
63 |
# Validate inputs
|
|
|
64 |
if not isinstance(title, str) or not isinstance(year, int):
|
65 |
logging.warning("Invalid input: Title must be a string, and Year must be an integer.")
|
66 |
return None
|
FileStream/bot/plugins/FileHandlers/callback.py
CHANGED
@@ -159,9 +159,10 @@ async def cb_data(bot: Client, update: CallbackQuery):
|
|
159 |
#name = file_caption if (file_caption) != "None/Unknown" else file_name
|
160 |
from FileStream.Tools.cleanup import Get_Title_Year
|
161 |
title, year = Get_Title_Year(name)
|
162 |
-
|
163 |
-
print("TMDB",search_tmdb_any(title, year))
|
164 |
res = imdb.search(title, year=year)
|
|
|
|
|
165 |
print(f"IMDB Response :{imdb.get_by_id(res[0]['id'])}")
|
166 |
if msg_type == 'MOVIE':
|
167 |
resp=search_tmdb_movies(name)
|
@@ -173,13 +174,13 @@ async def cb_data(bot: Client, update: CallbackQuery):
|
|
173 |
'overview':resp['overview']
|
174 |
}
|
175 |
elif msg_type == "WEBSERIES":
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
else:
|
184 |
print("Please choose correct answer")
|
185 |
|
|
|
159 |
#name = file_caption if (file_caption) != "None/Unknown" else file_name
|
160 |
from FileStream.Tools.cleanup import Get_Title_Year
|
161 |
title, year = Get_Title_Year(name)
|
162 |
+
year = int(year)
|
|
|
163 |
res = imdb.search(title, year=year)
|
164 |
+
print(f"ANY SEARCH :{title} YEAR :{year} IMDB Response :{res}")
|
165 |
+
print("TMDB",search_tmdb_any(title, year))
|
166 |
print(f"IMDB Response :{imdb.get_by_id(res[0]['id'])}")
|
167 |
if msg_type == 'MOVIE':
|
168 |
resp=search_tmdb_movies(name)
|
|
|
174 |
'overview':resp['overview']
|
175 |
}
|
176 |
elif msg_type == "WEBSERIES":
|
177 |
+
resp=search_tmdb_any(title, year)
|
178 |
+
result={
|
179 |
+
'title': resp['title'],
|
180 |
+
'id': resp['id'],
|
181 |
+
'media_type': resp['media_type'],
|
182 |
+
'overview':resp['overview']
|
183 |
+
}
|
184 |
else:
|
185 |
print("Please choose correct answer")
|
186 |
|
FileStream/utils/FileProcessors/file_properties.py
CHANGED
@@ -183,9 +183,7 @@ def get_file_info(message, instruction):
|
|
183 |
user_idx = message.from_user.id
|
184 |
else:
|
185 |
user_idx = message.chat.id
|
186 |
-
"""
|
187 |
-
key = 'b'
|
188 |
-
|
189 |
#"caption": clean_text(getattr(message, "caption", f"{get_name(message)}")),
|
190 |
return {
|
191 |
"user_id": instruction['user_id'],
|
|
|
183 |
user_idx = message.from_user.id
|
184 |
else:
|
185 |
user_idx = message.chat.id
|
186 |
+
"""
|
|
|
|
|
187 |
#"caption": clean_text(getattr(message, "caption", f"{get_name(message)}")),
|
188 |
return {
|
189 |
"user_id": instruction['user_id'],
|