Minor Fixes
This commit is contained in:
@@ -160,7 +160,7 @@ def is_url_ok(url: str):
|
||||
async def metadata(file):
|
||||
out, _ = await bash(f'mediainfo "{_unquote_text(file)}" --Output=JSON')
|
||||
if _ and _.endswith("NOT_FOUND"):
|
||||
return _
|
||||
raise Exception(_)
|
||||
data = {}
|
||||
_info = json.loads(out)["media"]["track"]
|
||||
info = _info[0]
|
||||
@@ -516,7 +516,7 @@ def telegraph_client():
|
||||
if TELEGRAPH:
|
||||
return TELEGRAPH[0]
|
||||
|
||||
from .. import udB
|
||||
from .. import udB, ultroid_bot
|
||||
|
||||
token = udB.get_key("_TELEGRAPH_TOKEN")
|
||||
TelegraphClient = Telegraph(token)
|
||||
|
||||
@@ -23,6 +23,7 @@ if (Var.REDIS_URI or Var.REDISHOST):
|
||||
except ImportError:
|
||||
LOGS.info("Installing 'redis' for database.")
|
||||
os.system("pip3 install -q redis hiredis")
|
||||
from redis import Redis
|
||||
elif Var.MONGO_URI:
|
||||
try:
|
||||
from pymongo import MongoClient
|
||||
@@ -313,10 +314,9 @@ class LocalDB(_BaseDatabase):
|
||||
|
||||
def UltroidDB():
|
||||
_er = False
|
||||
from .. import HOSTED_ON
|
||||
try:
|
||||
if Redis:
|
||||
from .. import HOSTED_ON
|
||||
|
||||
return RedisDB(
|
||||
host=Var.REDIS_URI or Var.REDISHOST,
|
||||
password=Var.REDIS_PASSWORD or Var.REDISPASSWORD,
|
||||
|
||||
Reference in New Issue
Block a user