erickok / transdroid

Manage your torrents from your Android device
GNU General Public License v3.0
1.28k stars 201 forks source link

BitComet: Update to use add magnet url for passed links #629

Closed bwitt closed 1 year ago

bwitt commented 1 year ago

Use /panel/task_add_magnet_result when passing link to torrent files.

Fixes https://github.com/erickok/transdroid/issues/622

bwitt commented 1 year ago

I can't seem to find API docs and I don't have a bitComet to test on, so I'm not completely sure this is correct? can someone test?

1265578519 commented 1 year ago

I will not to make apk for test. Who can provide apk download?

bwitt commented 1 year ago

Here's a debug apk I built locally; can you try this? (will need to unzip; had to zip it since github wouldn't let me attach an apk) app-full-debug.zip

1265578519 commented 1 year ago

thanks, it contains pull629 task_add_magnet_result? I test add the http torrent url, and he still download the torrent file and popped up a dialog box.

https://dl.dmhy.org/2022/10/21/febe71baebff2ae0d7b6478c795ae37c5bbcac21.torrent
magnet:?xt=urn:btih:febe71baebff2ae0d7b6478c795ae37c5bbcac21

1 2 3

1265578519 commented 1 year ago

image

He may need to modify all task_add_httpftp_result in BitCometAdapter.java correct it to task_add_magnet_result.

Another problem not related to pull, stop button is broken, pause is available 777 6666

1265578519 commented 1 year ago

He may need to modify all task_add_httpftp_result in BitCometAdapter.java correct it to task_add_magnet_result.

Use task_add_magnet_result to download http .torrent he won't pop up dialog. If you can judge the url .torrent suffix and magnet:?xt= use task_add_magnet_result Other http use task_add_httpftp_result, which will be better because HTTP FTP can be download 111 Add the if code the change on the complexity, Everyone dev on your to submit the pull.

bwitt commented 1 year ago

Hmm I may have uploaded the wrong apk; can you try this one also?
app-full-debug.zip

1265578519 commented 1 year ago

Hmm I may have uploaded the wrong apk; can you try this one also?

Unfortunately it still uses task_add_httpftp_result.

https://user-images.githubusercontent.com/6442439/200165163-0b218eb5-d49d-4dda-ab00-89ea744d969a.mp4

bwitt commented 1 year ago

ok I've made the adjustment please test this apk attached app-full-debug.zip

1265578519 commented 1 year ago

ok I've made the adjustment please test this apk attached app-full-debug.zip

Very good, he can now download http torrent url, now works normal.

bwitt commented 1 year ago

That's great! Thanks!

BTW for that other issue you mentioned ("stop button is broken"), if we don't already have an issue for it, please open a separate one.

erickok commented 1 year ago

Thanks for testing @12655785179