wy580477 / Leech-AIO-APP-EX

All Downloaders with Rclone auto-upload & Telegram notification on Docker | Docker 全能下载 APP + Rclone 自动上传 + 电报任务完成通知
191 stars 186 forks source link

.torrent file #28

Closed pctechkid closed 1 year ago

pctechkid commented 2 years ago

On aria2, after uploading/direct linking (from a torrent website ) a .torrent to the ariaNg is successful, the problem is when the rclone auto-upload is triggered, the .torrent file itself is uploaded into the google drive. How to disable auto uploading or excluding .torrent files to be uploaded by rclone?

wy580477 commented 2 years ago

Well. This turned out a bit harder than what I expected.

I added exclude filter to rclone daemon, it didn't work.

I will leave this as it is for now. I will revisit this issue when I have more time.

pctechkid commented 2 years ago

Well. This turned out a bit harder than what I expected.

I added exclude filter to rclone daemon, it didn't work.

I will leave this as it is for now. I will revisit this issue when I have more time.

Did this too and was surprised the exclude filter didn't worked out.

I solved this issue before but I dont know how to apply it on rclone rc POST. The code goes like this:

rclone delete -v "drivename:" --include "*.torrent" --drive-use-trash=false

The idea is that it just lets rclone upload the .torrent file, and right after uploading it, it also automatically just deletes the .torrent file too (on the google drive) by itself. Maybe you can implement that using rclone rc command in the upload.sh.

wy580477 commented 2 years ago

Did this too and was surprised the exclude filter didn't worked out.

I solved this issue before but I dont know how to apply it on rclone rc POST. The code goes like this:

rclone delete -v "drivename:" --include "*.torrent" --drive-use-trash=false

The idea is that it just lets rclone upload the .torrent file, and right after uploading it, it also automatically just deletes the .torrent file too (on the google drive) by itself. Maybe you can implement that using rclone rc command in the upload.sh.

I still haven't find a way to apply filter to http api call.

Here is a work around.

if  [[ -f "${LOCAL_PATH}" ]] && [[ "${TASK_FILE_NAME}" = *".torrent" ]]; then
    exit 0
fi

Add this before UPLOAD_FILE function in upload.sh

wy580477 commented 2 years ago

566632b0093c3c44a11514b589c5c3cf8491f26aa64b9b9e1bd0fe9a76f9f4b7

Aria2 auto-upload Include/Exclude filter base on file extensions added.

pctechkid commented 2 years ago

Thank you. This did the trick.

However, Heroku now starts banning your repo (fresh deploy, 1 single torrent file 200mb for testing), they seem to have detected your code already. I got mine banned just now.

wy580477 commented 2 years ago

Thank you. This did the trick.

However, Heroku now starts banning your repo (fresh deploy, 1 single torrent file 200mb for testing), they seem to have detected your code already. I got mine banned just now.

Did you deploy via web url? My heroku app is deployed via Heroku cli, it's still working fine.

Please help me test by using Heroku cli or github action to deploy.

How to deploy via Heroku cli:

  1. Install git and Heroku cli
  2. git clone repo to local device.
  3. Change path to git folder on command line.
  4. Run "heroku login" to login into Heroku.
  5. Run "heroku create \<your new app name> --manifest --region eu". You can choose us or eu for region.
  6. Run "heroku config:set KEY=VALUE" to set up config vars according to app.json in repo.
  7. Run "heroku git:remote -a \<your new app name>"
  8. Run "git push heroku --force"

How to deploy via github action:

  1. pull my newest commit to your fork.
  2. Set up action secrets in repo settings. You can get Heroku api key from Heroku account setting page in Heroku dashboard. image
  3. Create a new release with tag like v0.0.1_deploy, then action will be triggered.
  4. Set up config vars in Heroku dashboard according to app.json in repo.
pctechkid commented 2 years ago

Thank you. This did the trick. However, Heroku now starts banning your repo (fresh deploy, 1 single torrent file 200mb for testing), they seem to have detected your code already. I got mine banned just now.

Did you deploy via web url? My heroku app is deployed via Heroku cli, it's still working fine.

Please help me test by using Heroku cli or github action to deploy.

How to deploy via Heroku cli:

  1. Install git and Heroku cli
  2. git clone repo to local device.
  3. Change path to git folder on command line.
  4. Run "heroku login" to login into Heroku.
  5. Run "heroku create --manifest --region eu". You can choose us or eu for region.
  6. Run "heroku config:set KEY=VALUE" to set up config vars according to app.json in repo.
  7. Run "heroku git:remote -a "
  8. Run "git push heroku --force"

How to deploy via github action:

  1. pull my newest commit to your fork.
  2. Set up action secrets in repo settings. You can get Heroku api key from Heroku account setting page in Heroku dashboard. image
  3. Create a new release with tag like v0.0.1_deploy, then action will be triggered.
  4. Set up config vars in Heroku dashboard according to app.json in repo.

Yes sir, I would help you test with that. I'll do these right after I'm off with my vacation then observe the fresh deploy and will let you know afterwards what happens.

Thanks for your hard work!