Spaces:
Running
Running
Update FileStream/bot/plugins/FileHandlers/callback.py
Browse files
FileStream/bot/plugins/FileHandlers/callback.py
CHANGED
@@ -129,10 +129,11 @@ async def cb_data(bot: Client, update: CallbackQuery):
|
|
129 |
#print(f"ANY SEARCH :{title} YEAR :{year} IMDB Response :{res}")
|
130 |
#print("TMDB",search_tmdb_any(title, year))
|
131 |
#print(f"IMDB ID :{get_imdb_id['results'][0]['id']}")
|
132 |
-
print(f"\n** GET_ID
|
133 |
#pprint(get_imdb_id)
|
|
|
134 |
res=json.loads(imdb.get_by_id(get_imdb_id['results'][0]['id']))
|
135 |
-
print(f"\n** IMDB Response :")
|
136 |
#pprint(res)
|
137 |
instruction = {
|
138 |
"privacy_type": "PUBLIC",
|
@@ -192,7 +193,8 @@ async def cb_data(bot: Client, update: CallbackQuery):
|
|
192 |
print(f"** ANY SEARCH :{name} \nFinal :{title} YEAR :{year}")
|
193 |
get_imdb_id = json.loads(imdb.search(title, year=int(year)))
|
194 |
print(f"\n** GET_ID {get_imdb_id}")
|
195 |
-
res=json.loads(imdb.get_by_id(get_imdb_id['results'][0]['id']))
|
|
|
196 |
print(f"\n** IMDB Response :{res}")
|
197 |
#"IMDB_id":get_imdb_id['results'][0]['id'] if get_imdb_id['results'][0]['id']else "None",
|
198 |
|
@@ -200,7 +202,7 @@ async def cb_data(bot: Client, update: CallbackQuery):
|
|
200 |
"privacy_type": "TEMPORARY",
|
201 |
"user_id": user_id,
|
202 |
"user_type": "TELEGRAM",
|
203 |
-
"IMDB_id":get_imdb_id['results'][0]['id'] if get_imdb_id.get("results")[0]['id'] else "
|
204 |
"poster": res.get("poster", "") ,
|
205 |
"title": res.get("name", "") ,
|
206 |
"release_date":res.get("datePublished", ""),
|
|
|
129 |
#print(f"ANY SEARCH :{title} YEAR :{year} IMDB Response :{res}")
|
130 |
#print("TMDB",search_tmdb_any(title, year))
|
131 |
#print(f"IMDB ID :{get_imdb_id['results'][0]['id']}")
|
132 |
+
print(f"\n** GET_ID {get_imdb_id}")
|
133 |
#pprint(get_imdb_id)
|
134 |
+
#res=json.loads(imdb.get_by_id(get_imdb_id['results'][0]['id']))
|
135 |
res=json.loads(imdb.get_by_id(get_imdb_id['results'][0]['id']))
|
136 |
+
print(f"\n** IMDB Response :{res}")
|
137 |
#pprint(res)
|
138 |
instruction = {
|
139 |
"privacy_type": "PUBLIC",
|
|
|
193 |
print(f"** ANY SEARCH :{name} \nFinal :{title} YEAR :{year}")
|
194 |
get_imdb_id = json.loads(imdb.search(title, year=int(year)))
|
195 |
print(f"\n** GET_ID {get_imdb_id}")
|
196 |
+
res=json.loads(imdb.get_by_id(asyncio.to_thread, get_imdb_id['results'][0]['id']))
|
197 |
+
#res=json.loads(imdb.get_by_id(get_imdb_id['results'][0]['id']))
|
198 |
print(f"\n** IMDB Response :{res}")
|
199 |
#"IMDB_id":get_imdb_id['results'][0]['id'] if get_imdb_id['results'][0]['id']else "None",
|
200 |
|
|
|
202 |
"privacy_type": "TEMPORARY",
|
203 |
"user_id": user_id,
|
204 |
"user_type": "TELEGRAM",
|
205 |
+
"IMDB_id":get_imdb_id['results'][0]['id'] if get_imdb_id.get("results")[0]['id'] else "Not Received",
|
206 |
"poster": res.get("poster", "") ,
|
207 |
"title": res.get("name", "") ,
|
208 |
"release_date":res.get("datePublished", ""),
|