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

fileLink template support #26

Closed
InsideTheVoid opened this issue May 15, 2024 · 5 comments
Closed

fileLink template support #26

InsideTheVoid opened this issue May 15, 2024 · 5 comments
Assignees

Comments

@InsideTheVoid
Copy link

The fileLink feature works great if you only use 1 downloadDir.
If you use multiple, it would be great if you could do something like:

{
	"fileLink": "https://example.com/{torrent.downloadDir}",
}

In this setup files could be accessed with:

/storageA/torrent1/file.txt --> https://example.com/storageA/torrent1/file.txt
/storageA/torrent2/file.txt --> https://example.com/storageA/torrent2/file.txt
/storageB/torrent3/file.txt --> https://example.com/storageB/torrent3/file.txt

Is this something you would be willing to implement?

@killemov
Copy link
Owner

Is this something you would be willing to implement?

I already have implemented this. It was going to be in the next release, but I will see if I can separate it for you now-ish.

@killemov killemov self-assigned this May 15, 2024
killemov added a commit that referenced this issue May 15, 2024
Implemented larger size units and calculation.
@killemov
Copy link
Owner

killemov commented May 15, 2024

@InsideTheVoid Please test and post your feedback here. And if you like it, put a on it.

@InsideTheVoid
Copy link
Author

Thank you very much for the quick fix.

fileLink works as expected, but folderLink doesn't replace the variable and just outputs ${torrent.downloadDir} as plain text.

The example of /secret/${torrent.downloadDir}/ leads to a link with double slashes e.g. /secret//folder// so I used /secret${torrent.downloadDir}.

killemov added a commit that referenced this issue May 15, 2024
Fixed torrent file link template example.
@killemov
Copy link
Owner

I missed the folder link while separating and then I figured I could reduce some code by integrating stuff into String.

@InsideTheVoid
Copy link
Author

Works like a charm.
Thank you; I appreciate it very much.

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

No branches or pull requests

2 participants