Skip to content

Commit

Permalink
Minor change
Browse files Browse the repository at this point in the history
Signed-off-by: anasty17 <e.anastayyar@gmail.com>
  • Loading branch information
anasty17 committed Apr 7, 2024
1 parent 9e97a5b commit 7634cad
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions bot/helper/listeners/jdownloader_listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ async def _jd_listener():
if not is_connected:
LOGGER.error(jdownloader.error)
continue
jdownloader.boot()
await jdownloader.connectToDevice()
try:
packages = await jdownloader.device.downloads.query_packages(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ async def add_jd_download(listener, path):
if not is_connected:
await listener.onDownloadError(jdownloader.error)
return
jdownloader.boot()
await jdownloader.connectToDevice()

if not jd_downloads:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ def eta(self):

def status(self):
async_to_sync(self._update)
state = self._info.get("status", "paused")
return MirrorStatus.STATUS_PAUSED if state == "paused" else state
state = self._info.get("status", "jdlimit")
return MirrorStatus.STATUS_QUEUEDL if state == "jdlimit" else state

def task(self):
return self
Expand Down
2 changes: 1 addition & 1 deletion bot/helper/mirror_leech_utils/telegram_uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ async def _upload_file(self, cap_mono, file, o_path, force_document=False):
await remove(thumb)
except FloodWait as f:
LOGGER.warning(str(f))
await sleep(f.value)
await sleep(f.value*1.3)
except Exception as err:
if (
self._thumb is None
Expand Down
1 change: 1 addition & 0 deletions bot/modules/bot_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ async def sync_jdownloader():
if not is_connected:
LOGGER.error(jdownloader.error)
return
jdownloader.boot()
await jdownloader.connectToDevice()
await (
await create_subprocess_exec("7z", "a", "cfg.zip", "/JDownloader/cfg")
Expand Down

0 comments on commit 7634cad

Please sign in to comment.