diff --git a/wut-aria-add b/wut-aria-add index da9a284..136e203 100755 --- a/wut-aria-add +++ b/wut-aria-add @@ -1,6 +1,27 @@ #!/usr/bin/env python3 +import time import xmlrpc.client as xmlrpclib -s = xmlrpclib.ServerProxy('http://localhost:4800/rpc') -s.aria2.addTorrent("token:yajnuAdCemNathNojdi", xmlrpclib.Binary(open('/srv/dl/satnogs-observations-000100001-000110000/satnogs-observations-000100001-000110000_archive.torrent', mode='rb').read())) +from pathlib import Path + +s = xmlrpclib.ServerProxy('http://localhost:4800/rpc') +path=Path('/srv/dl') + +# All torrents +#torrents=sorted(list(path.glob('**/satnogs-observations-*/satnogs-observations-*_archive.torrent'))) + +# Added torrents +torrents=sorted(list(path.glob('**/satnogs-observations-0001?0001-000??0000/satnogs-observations-*_archive.torrent'))) +torrents=sorted(list(path.glob('**/satnogs-observations-0002?0001-000??0000/satnogs-observations-*_archive.torrent'))) +torrents=sorted(list(path.glob('**/satnogs-observations-0003?0001-000??0000/satnogs-observations-*_archive.torrent'))) +torrents=sorted(list(path.glob('**/satnogs-observations-0004?0001-000??0000/satnogs-observations-*_archive.torrent'))) +torrents=sorted(list(path.glob('**/satnogs-observations-0005?0001-000??0000/satnogs-observations-*_archive.torrent'))) +torrents=sorted(list(path.glob('**/satnogs-observations-0006?0001-000??0000/satnogs-observations-*_archive.torrent'))) +torrents=sorted(list(path.glob('**/satnogs-observations-0007?0001-000??0000/satnogs-observations-*_archive.torrent'))) + +for i in torrents: + print(i.name) + s.aria2.addTorrent("token:yajnuAdCemNathNojdi", + xmlrpclib.Binary(open(i, mode='rb').read())) + time.sleep(3) diff --git a/wut-aria-daemon b/wut-aria-daemon index 7be2b0e..bdb9217 100755 --- a/wut-aria-daemon +++ b/wut-aria-daemon @@ -4,6 +4,8 @@ set -x mkdir -p ~/log /srv/dl +ulimit -n 8192 + aria2c \ --daemon=true \ --enable-rpc=true \ @@ -11,7 +13,6 @@ aria2c \ --rpc-listen-port=4800 \ --rpc-listen-all=false \ --rpc-secret=`cat /home/jebba/.aria-secret` \ - --deferred-input=true \ --disable-ipv6=true \ --disk-cache=128M \ --file-allocation=falloc \ @@ -19,5 +20,17 @@ aria2c \ --log=/home/jebba/log/aria.log \ --bt-max-open-files=1000 \ --bt-max-peers=1000 \ - --continue=true + --continue=true \ + --follow-torrent=mem \ + --rpc-save-upload-metadata=false \ + --max-concurrent-downloads=100 \ + --bt-max-open-files=50000 \ + --bt-max-peers=0 \ + --allow-overwrite=true \ + --max-download-result=0 \ + --enable-mmap=true +exit + + --deferred-input=true \ +--enable-mmap