Skip to content

Commit 61510be

Browse files
committed
Fix jd download remoival after stop duplicate
Signed-off-by: anasty17 <[email protected]>
1 parent 58bafa5 commit 61510be

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

bot/__main__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ async def restart(_, message):
121121
qb.cancel()
122122
if jd := Intervals["jd"]:
123123
jd.cancel()
124+
if nzb := Intervals["nzb"]:
125+
nzb.cancel()
124126
if st := Intervals["status"]:
125127
for intvl in list(st.values()):
126128
intvl.cancel()

bot/helper/mirror_leech_utils/download_utils/jd_download.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
deleteMessage,
3636
)
3737

38+
3839
@new_task
3940
async def configureDownload(_, query, obj):
4041
data = query.data.split()
@@ -267,7 +268,12 @@ async def add_jd_download(listener, path):
267268

268269
msg, button = await stop_duplicate_check(listener)
269270
if msg:
271+
await retry_function(
272+
jdownloader.device.linkgrabber.remove_links, package_ids=online_packages
273+
)
270274
await listener.onDownloadError(msg, button)
275+
async with jd_lock:
276+
del jd_downloads[gid]
271277
return
272278

273279
if listener.select and await JDownloaderHelper(listener).waitForConfigurations():

0 commit comments

Comments
 (0)