johman10 / flood-for-transmission

A Flood (https://github.com/Flood-UI/flood) clone for Transmission
GNU General Public License v3.0
354 stars 33 forks source link

Add option to create torrents #517

Open GH0STDATA opened 1 year ago

GH0STDATA commented 1 year ago

Hey @johman10, hope you're having a good weekend.

It looks like the official Flood UI repo has the ability to create torrents directly in the web UI, but it seems to be removed or not implemented in this version.

https://github.com/jesec/flood/pull/50

Will this be added in the future?

johman10 commented 1 year ago

It seems like the package used for this would be: https://www.npmjs.com/package/create-torrent. It states it can be used in the browser, so this might be possible to do in this project too. I can consider it for the future. :)

Thank you for the feature request. :D

GH0STDATA commented 1 year ago

Sounds good, thank you for responding and considering adding this feature!

It looks like there are some other major differences between your Flood clone and the official repo. One of them being that the official repo seems to have file browsing capabilities built into the UI, which is one of the couple of reasons why creating torrents is possible.

johman10 commented 1 year ago

@GH0STDATA I would like to clarify that this project is in no way a clone of Flood. It's an independent project based on Flood UI jfurrow (with only rtorrent support). Both Jesec and me were working on a recreation of the project without knowing about each others efforts. When it was time for me to release I found Jesec's work and decided there is no pain in having both in this world. This means there is 0 technical overlap between the two projects.

Since Flood is build with a NodeJS backend it requires it's own running server to serve it's content. Flood for Transmission is made to just support Transmission and depends on the Transmission server to serve the files as simple HTML/JS/CSS. While that makes Flood for Transmission more lightweight, it does limit the capabilities (file browsing being one of them, because a browser can't just read the whole file system).

Because of all these things Flood for Transmission and Flood will never be on par when it comes to features. But I hope that Flood for Transmission can be a good alternative to those who don't want to run yet another service on their host machine.

GH0STDATA commented 1 year ago

Gotcha, makes perfect sense. The reason why I said it was a clone was because its written in your own README file for this repository. 😆 That might need to be changed if that is not the case as you stated. I can definitely tell that there are differences, and both are great for different reasons. Thank you for your detailed explanation on the history of this repo as it's quite interesting!

johman10 commented 1 year ago

@GH0STDATA fair point! I forgot that I wrote that! :sweat_smile: Might have to give the README some more love soon! :smile:

johman10 commented 1 year ago

@GH0STDATA as you can see from the PR linked above I made an attempt at this. But I'm afraid it doesn't work.

I think the main problem is that from the UI you should be able to select a path to a folder that is part of the file system of the Transmission host. But since Transmission doesn't expose files, nor an API, there is no real way to load those files into the torrent without some implemetation on the backend (which is simply Transmission). Because of this I don't think this is possible with the current architecture.

However, I'm not an expert on this. So if you know anything I don't about the expected behaviour and how to implement it, please let me know here and I will have another look based on your input.

Please note that the current PR does some kind of file upload solution which was a desperate attempt to make it work, but that doesn't work because it means Transmission can't seed the file.