Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upKeep the torrents in memory after close #1030
Closed
Comments
This comment has been minimized.
This comment has been minimized.
|
Share the client across your software, it will keep the torrents in memory |
This comment has been minimized.
This comment has been minimized.
Yep, i have did it on upload page:
And my function addTorrent:
Too bad for me that there is no internal session to webtorrent |
This comment has been minimized.
This comment has been minimized.
|
You are creating a new client each time you add a torrent. Create ONE client and use it across your app. |
This comment has been minimized.
This comment has been minimized.
oups! yes thanks, code edited |
This comment has been minimized.
This comment has been minimized.
|
This thread has been automatically locked because it has not had recent activity. To discuss futher, please open a new issue. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This is not really a question but more a request for help.
I would like to know if it is possible to keep in memory the torrents add?
Let me explain:
I create a software based on webtorrent with several different page and on each page I am obliged to declare the function add (and I think at the resource level it is not very good to do this for my software)
An example of this concept, retrieving the stats of each torrent in a graph
In this example, whenever I call the stats.html page, I call the add() function and I add the torrent from hard code like:
I thought I would use something like electron-json-storage
But it will not fix my problem of adding torrent to each page.
I take the problem from the other direction.
I assume that when you close webtorrent, the function destroy is calling to destroy the client, no?
Thanks in advance