File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ def is_url_ok(url: str):
160160async def metadata (file ):
161161 out , _ = await bash (f'mediainfo "{ _unquote_text (file )} " --Output=JSON' )
162162 if _ and _ .endswith ("NOT_FOUND" ):
163- return _
163+ raise Exception ( _ )
164164 data = {}
165165 _info = json .loads (out )["media" ]["track" ]
166166 info = _info [0 ]
@@ -516,7 +516,7 @@ def telegraph_client():
516516 if TELEGRAPH :
517517 return TELEGRAPH [0 ]
518518
519- from .. import udB
519+ from .. import udB , ultroid_bot
520520
521521 token = udB .get_key ("_TELEGRAPH_TOKEN" )
522522 TelegraphClient = Telegraph (token )
Original file line number Diff line number Diff line change 2323 except ImportError :
2424 LOGS .info ("Installing 'redis' for database." )
2525 os .system ("pip3 install -q redis hiredis" )
26+ from redis import Redis
2627elif Var .MONGO_URI :
2728 try :
2829 from pymongo import MongoClient
@@ -313,10 +314,9 @@ def __repr__(self):
313314
314315def UltroidDB ():
315316 _er = False
317+ from .. import HOSTED_ON
316318 try :
317319 if Redis :
318- from .. import HOSTED_ON
319-
320320 return RedisDB (
321321 host = Var .REDIS_URI or Var .REDISHOST ,
322322 password = Var .REDIS_PASSWORD or Var .REDISPASSWORD ,
You can’t perform that action at this time.
0 commit comments