- fix rarbg not start downloading after bot restarts
- catch an edge case in gdriveTools.drive_list

Co-authored-by: Anas <anasty17@users.noreply.github.com>

Co-authored-by: Aakash Singh <sainAk@users.noreply.github.com>
This commit is contained in:
Hafitz Setya 2021-05-01 17:25:31 +07:00 committed by GitHub
parent ed46131794
commit fca6a44cec
Signed by untrusted user: GitHub
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 3 deletions

View File

@ -3,7 +3,8 @@ FROM ubuntu:20.04
WORKDIR /usr/src/app
RUN chmod 777 /usr/src/app
RUN apt-get -qq update && \
DEBIAN_FRONTEND="noninteractive" apt-get -qq install -y tzdata aria2 git python3 python3-pip \
apt-get upgrade -y && apt-get autoremove -y && \
DEBIAN_FRONTEND="noninteractive" apt-get -qq install -y tzdata aria2 wget git python3 python3-pip \
locales python3-lxml \
curl pv jq ffmpeg \
p7zip-full p7zip-rar \
@ -17,6 +18,8 @@ COPY requirements.txt .
COPY extract /usr/local/bin
COPY pextract /usr/local/bin
RUN chmod +x /usr/local/bin/extract && chmod +x /usr/local/bin/pextract
RUN wget -q https://github.com/P3TERX/aria2.conf/raw/master/dht.dat -O /usr/src/app/dht.dat && \
wget -q https://github.com/P3TERX/aria2.conf/raw/master/dht6.dat -O /usr/src/app/dht6.dat
RUN pip3 install --no-cache-dir -r requirements.txt
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8

View File

@ -12,4 +12,10 @@ aria2c --enable-rpc --rpc-listen-all=false --rpc-listen-port 6800 --check-certif
--disk-cache=64M --file-allocation=prealloc --continue=true \
--max-file-not-found=5 --max-tries=20 --auto-file-renaming=true \
--bt-enable-lpd=true --seed-time=0.01 --seed-ratio=1.0 \
--content-disposition-default-utf8=true --http-accept-gzip=true --reuse-uri=true
--file-allocation=prealloc --max-file-not-found=5 --max-tries=5 --retry-wait=5 \
--auto-file-renaming=true --reuse-uri=true --http-accept-gzip=true --listen-port=49152-65535 \
--content-disposition-default-utf8=true --http-accept-gzip=true --reuse-uri=true --bt-tracker-connect-timeout=600 \
--dht-listen-port=51513 --enable-dht=true --enable-dht6=true \
--dht-file-path=/usr/src/app/dht.dat --dht-file-path6=/usr/src/app/dht6.dat \
--dht-entry-point=dht.transmissionbt.com:6881 \
--dht-entry-point6=dht.transmissionbt.com:6881

View File

@ -524,7 +524,10 @@ class GoogleDriveHelper:
msg += f' <b>| <a href="{siurl}">Index Link</a></b>'
else:
msg += f' <b>| <a href="{url}">Index Link</a></b>'
elif file.get('mimeType') == 'application/vnd.google-apps.shortcut':
msg += f"⁍<a href='https://drive.google.com/drive/folders/{file.get('id')}'>{file.get('name')}" \
f"</a> (shortcut)"
# Excluded index link as indexes cant download or open these shortcuts
else:
furl = f"https://drive.google.com/uc?id={file.get('id')}&export=download"
msg += f"⁍<code>{file.get('name')}<br>({get_readable_file_size(int(file.get('size')))})📄</code><br>"