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

[WIP] On-demand filelist fetching #1719

Open
wants to merge 52 commits into
base: dev
Choose a base branch
from
Open

[WIP] On-demand filelist fetching #1719

wants to merge 52 commits into from

Conversation

Kiloutre
Copy link
Contributor

@Kiloutre Kiloutre commented Nov 7, 2017

It's not fully completed (the JS that updates filelist doesnt show icons & no padding for stuff within folders) but it's fine for now and a mere refresh shows a proper filelist
Also it's very slow for long filelists right now, and outputs empty filename if there's only one file

@coveralls
Copy link

Coverage Status

Coverage remained the same at 38.881% when pulling 11567bf on filelist-fetching into ca271e2 on dev.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 38.719% when pulling 1219e69 on filelist-fetching into ca271e2 on dev.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 38.719% when pulling 1219e69 on filelist-fetching into ca271e2 on dev.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 38.719% when pulling 2087c27 on filelist-fetching into 213780f on dev.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 38.719% when pulling ceb02d1 on filelist-fetching into 213780f on dev.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 38.708% when pulling b6b1414 on filelist-fetching into 213780f on dev.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 38.708% when pulling 479eb02 on filelist-fetching into 213780f on dev.

@Kiloutre Kiloutre changed the title [WIP] On-demand filelist fetching On-demand filelist fetching Nov 8, 2017
sfan5
sfan5 previously approved these changes Nov 8, 2017
@Kiloutre Kiloutre changed the title On-demand filelist fetching [WIP] On-demand filelist fetching Nov 8, 2017
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 38.558% when pulling cb8604d on filelist-fetching into 213780f on dev.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 38.53% when pulling 08b6984 on filelist-fetching into 1bbda2c on dev.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 38.53% when pulling c943839 on filelist-fetching into 1bbda2c on dev.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 38.53% when pulling 95daf79 on filelist-fetching into 1bbda2c on dev.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 38.53% when pulling 95daf79 on filelist-fetching into 1bbda2c on dev.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.4%) to 38.53% when pulling 4bd364e on filelist-fetching into 887ff5b on dev.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 38.476% when pulling 1f2e85c on filelist-fetching into 418dc81 on dev.

}

t, _ := client.AddMagnet(magnet)
<-t.GotInfo()
Copy link
Member

Choose a reason for hiding this comment

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

If it's only for the filelist, you should detect before if you have the torrent file and then if you have it already, load the files from it (since you won't have to wait to connect to peers to have them). You can check how I access to a torrent file information in the upload process here with tfile the content of the torrent file

torrent, err := metainfo.Load(tfile)

In the opposite, if you don't have it, you should save it after the scrapping so you save ressource power

}

t, _ := client.AddMagnet(magnet)
<-t.GotInfo()
Copy link
Member

Choose a reason for hiding this comment

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

It might also be better to make it in a go func() when you try to scrap. So you don't keep the connection between the user and the server hanging. It might a while before yhe scrapper connects to a peer and gets the information.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That itself is not a problem, since the torrent page load is not affected by this. The filelist fetching is generally done with JS, if the user doesn't have JS then a /files/:torrentid page is loaded but the user will known full well that if that page takes time to load, it's because it's loading the filelist
So it's not really necessary here

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 34.861% when pulling 050d00d on filelist-fetching into 860f9c8 on dev.

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

Successfully merging this pull request may close these issues.

5 participants