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

Bettering torrent support. #1612

Merged
merged 4 commits into from
Aug 6, 2024
Merged

Bettering torrent support. #1612

merged 4 commits into from
Aug 6, 2024

Conversation

dessalines
Copy link
Member

Pics:

Screenshot_2024-08-05-16-10-51-73_c9298fda48802cf3e2d17cb10a48759f

Screenshot_2024-08-05-16-11-05-91_c9298fda48802cf3e2d17cb10a48759f

- Fixes URI validation to include magnet link schemes.
- When creating a post, can automatically copy the torrent title from
  the link.
- Adds a torrent helper for magnet links.
- Fixes magnet link clicks.
- Fixes #1609
@dessalines dessalines requested a review from MV-GH as a code owner August 5, 2024 20:28
MetaDataRes(res.data.metadata.title, false)
else -> MetaDataRes(null, false)
// If its a torrent magnet link, use the dn param to extract the torrent title
if (uri.scheme == "magnet") {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you add a constant for these strings.

Copy link
Member Author

Choose a reason for hiding this comment

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

I did add a ALLOWED_SCHEMES list, but this one only needs to check one of them.

@MV-GH
Copy link
Collaborator

MV-GH commented Aug 5, 2024

You need to fix the tests too

@dessalines dessalines merged commit ce99dfb into main Aug 6, 2024
2 checks passed
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.

Fix torrent magnet links, add a helper link for magnet URLs.
2 participants