Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support add BT-magnet hash code URI directly #468

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

xckai
Copy link

@xckai xckai commented Sep 3, 2018

Support add BT-magnet hash code URI directly, such as '24B971DF922333C66E674E0F1F4248240C4A6F08'
If you search some resource from THE PIRATE BAY, this feature is usefull.

许凯 added 2 commits September 1, 2018 12:13
Support add BT-magnet hash code URI directly, such as   '24B971DF922333C66E674E0F1F4248240C4A6F08' 
If you search some resource from THE PIRATE BAY, this feature is usefull.
@xckai
Copy link
Author

xckai commented Sep 3, 2018

Support add BT-magnet hash code URI directly

@xckai xckai closed this Sep 3, 2018
@xckai xckai reopened this Sep 3, 2018
Copy link
Owner

@ziahamza ziahamza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to reverse the if statement, good otherwise


if(t.startsWith("HTTP")||t.startsWith("MAGNET")||t.startsWith("FTP")){
return u
}else{
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xckai can you reverse the if statement? As many un known urls now will become magnet url

Copy link
Author

@xckai xckai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only add magnet protocol's head when uri is a 32-bit BASE32 encoding string or 40-bit HEX encoding string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants