Specify Download Dir with RPC
This commit is contained in:
parent
5cb5f228ad
commit
6bb1224aa7
|
|
@ -1,5 +1,6 @@
|
||||||
*.env
|
*.env
|
||||||
config.ini
|
config.ini
|
||||||
|
*conf.ini
|
||||||
*auth_token.txt
|
*auth_token.txt
|
||||||
*.pyc
|
*.pyc
|
||||||
downloads/*
|
downloads/*
|
||||||
|
|
|
||||||
2
aria.bat
2
aria.bat
|
|
@ -1 +1 @@
|
||||||
aria2c --dir ./download --enable-rpc --rpc-listen-all=false --rpc-listen-port 6800 --max-connection-per-server=10 --rpc-max-request-size=1024M --seed-time=0.01 --min-split-size=10M --follow-torrent=mem --split=10 --daemon=true --allow-overwrite=true
|
aria2c --enable-rpc --rpc-listen-all=false --rpc-listen-port 6800 --max-connection-per-server=10 --rpc-max-request-size=1024M --seed-time=0.01 --min-split-size=10M --follow-torrent=mem --split=10 --daemon=true --allow-overwrite=true
|
||||||
|
|
|
||||||
3
aria.sh
3
aria.sh
|
|
@ -1,2 +1 @@
|
||||||
export DOWNLOAD_DIR="./download"
|
aria2c --enable-rpc --rpc-listen-all=false --rpc-listen-port 6800 --max-connection-per-server=10 --rpc-max-request-size=1024M --seed-time=0.01 --min-split-size=10M --follow-torrent=mem --split=10 --daemon=true --allow-overwrite=true
|
||||||
aria2c --dir $DOWNLOAD_DIR --enable-rpc --rpc-listen-all=false --rpc-listen-port 6800 --max-connection-per-server=10 --rpc-max-request-size=1024M --seed-time=0.01 --min-split-size=10M --follow-torrent=mem --split=10 --daemon=true --allow-overwrite=true
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import aria2p
|
import aria2p
|
||||||
import os
|
import os
|
||||||
from time import sleep
|
from time import sleep
|
||||||
from bot import LOGGER
|
from bot import LOGGER,DOWNLOAD_DIR
|
||||||
|
|
||||||
|
|
||||||
EDIT_SLEEP_TIME_OUT = 5
|
EDIT_SLEEP_TIME_OUT = 5
|
||||||
|
|
@ -29,12 +29,12 @@ def check_metadata(gid):
|
||||||
|
|
||||||
def add_download(link,message):
|
def add_download(link,message):
|
||||||
if "magnet" in link:
|
if "magnet" in link:
|
||||||
download = aria2.add_magnet(link)
|
download = aria2.add_magnet(link,{'dir':DOWNLOAD_DIR})
|
||||||
allDls[message[0]] = [download,message[1]]
|
allDls[message[0]] = [download,message[1]]
|
||||||
LOGGER.info("Adding: "+link)
|
LOGGER.info("Adding: "+link)
|
||||||
return download
|
return download
|
||||||
else:
|
else:
|
||||||
download = aria2.add_uris([link])
|
download = aria2.add_uris([link],{'dir':DOWNLOAD_DIR})
|
||||||
allDls[message[0]] = [download,message[1]]
|
allDls[message[0]] = [download,message[1]]
|
||||||
LOGGER.info("Adding: "+link)
|
LOGGER.info("Adding: "+link)
|
||||||
return download
|
return download
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue