Discussion:
[libtorrent] Web Seeds
Michael Mckeown
2016-08-10 10:29:46 UTC
Permalink
Hi,
void delete_web_seed ( std::string hash , std::string url )
{
torrent_handle x = Session->find_torrent ( to_hash ( hash.c_str (
) ) );
if ( x.is_valid ( ) )
{
std::string::iterator it = url.end ( ) - 1;
if ( *it == '/' )
{
x.remove_url_seed ( url );
}
else
{
x.remove_http_seed ( url );
}
}
}
the hash and the url both check out but the seed is never deleted, url
or http.

Second thing is when creating a torrent with web seeds (torrent is
myfile.exe and seeds are http://mysite.com/myfile.exe or
http://mysite.com/myfile.exe/)
create_torrent t ( fs , params.piece_size , pad_file_limit , flags );
for ( std::vector<std::string>::iterator i = params.web_seeds.begin (
) , end ( params.web_seeds.end ( ) ); i != end; ++i )
{
std::string url = *i;
std::string::iterator it = url.end ( ) - 1;
if ( *it == '/' )
{
t.add_url_seed ( url );
}
else
{
t.add_http_seed ( url );
}
}
the torrent creates without error and will open up on Libtorrent but
url/http seeds in torrent_status are not there (size 0 of set) but the
created torrent file won't open on utorrent (error invalid torrent file).

Thanks for any suggestions.
Arvid Norberg
2016-08-10 11:00:15 UTC
Permalink
what version of libtorrent are you using?

I'm not sure your classification of web-seed vs. http-seed is a safe
assumption. For single file torrents for instance, you won't have a
trailing '/'. Assuming you _are_ calling the removal function for the
correct type, the url/string needs to match exactly.

could you post a .torrent file that's produced by libtorrent that fail to
open in uTorrent?
Post by Michael Mckeown
Hi,
void delete_web_seed ( std::string hash , std::string url )
{
torrent_handle x = Session->find_torrent ( to_hash ( hash.c_str (
) ) );
if ( x.is_valid ( ) )
{
std::string::iterator it = url.end ( ) - 1;
if ( *it == '/' )
{
x.remove_url_seed ( url );
}
else
{
x.remove_http_seed ( url );
}
}
}
the hash and the url both check out but the seed is never deleted, url
or http.
Second thing is when creating a torrent with web seeds (torrent is
myfile.exe and seeds are http://mysite.com/myfile.exe or
http://mysite.com/myfile.exe/)
create_torrent t ( fs , params.piece_size , pad_file_limit , flags );
for ( std::vector<std::string>::iterator i = params.web_seeds.begin (
) , end ( params.web_seeds.end ( ) ); i != end; ++i )
{
std::string url = *i;
std::string::iterator it = url.end ( ) - 1;
if ( *it == '/' )
{
t.add_url_seed ( url );
}
else
{
t.add_http_seed ( url );
}
}
the torrent creates without error and will open up on Libtorrent but
url/http seeds in torrent_status are not there (size 0 of set) but the
created torrent file won't open on utorrent (error invalid torrent file).
Thanks for any suggestions.
------------------------------------------------------------
------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and
traffic
patterns at an interface-level. Reveals which users, apps, and protocols
are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
Libtorrent-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
--
Arvid Norberg
Michael Mckeown
2016-08-10 12:03:44 UTC
Permalink
Hi,

http single file:
http://s000.tinyupload.com/index.php?file_id=09646022484543738055
url single file:
http://s000.tinyupload.com/index.php?file_id=40712395178734798710

I'm using the latest master from github.

it seems its the http seed that's the problem.

Thanks.
Post by Arvid Norberg
what version of libtorrent are you using?
I'm not sure your classification of web-seed vs. http-seed is a safe
assumption. For single file torrents for instance, you won't have a
trailing '/'. Assuming you _are_ calling the removal function for the
correct type, the url/string needs to match exactly.
could you post a .torrent file that's produced by libtorrent that fail to
open in uTorrent?
Post by Michael Mckeown
Hi,
void delete_web_seed ( std::string hash , std::string url )
{
torrent_handle x = Session->find_torrent ( to_hash ( hash.c_str (
) ) );
if ( x.is_valid ( ) )
{
std::string::iterator it = url.end ( ) - 1;
if ( *it == '/' )
{
x.remove_url_seed ( url );
}
else
{
x.remove_http_seed ( url );
}
}
}
the hash and the url both check out but the seed is never deleted, url
or http.
Second thing is when creating a torrent with web seeds (torrent is
myfile.exe and seeds are http://mysite.com/myfile.exe or
http://mysite.com/myfile.exe/)
create_torrent t ( fs , params.piece_size , pad_file_limit , flags );
for ( std::vector<std::string>::iterator i = params.web_seeds.begin (
) , end ( params.web_seeds.end ( ) ); i != end; ++i )
{
std::string url = *i;
std::string::iterator it = url.end ( ) - 1;
if ( *it == '/' )
{
t.add_url_seed ( url );
}
else
{
t.add_http_seed ( url );
}
}
the torrent creates without error and will open up on Libtorrent but
url/http seeds in torrent_status are not there (size 0 of set) but the
created torrent file won't open on utorrent (error invalid torrent file).
Thanks for any suggestions.
------------------------------------------------------------
------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and
traffic
patterns at an interface-level. Reveals which users, apps, and protocols
are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
Libtorrent-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
Arvid Norberg
2016-08-11 22:48:55 UTC
Permalink
Post by Michael Mckeown
Hi,
http://s000.tinyupload.com/index.php?file_id=09646022484543738055
http://s000.tinyupload.com/index.php?file_id=40712395178734798710
I don't see anything wrong with either of those. It may be an issue in
uTorrent.
Post by Michael Mckeown
I'm using the latest master from github.
it seems its the http seed that's the problem.
As for the web seeds not showing up in libtorrent, are you looking at
alerts saying that they failed and were removed?
--
Arvid Norberg
Michael Mckeown
2016-08-20 17:32:55 UTC
Permalink
Yes, they were being removed, really should have checked that, thanks
for your time.
Post by Arvid Norberg
Post by Michael Mckeown
Hi,
http://s000.tinyupload.com/index.php?file_id=09646022484543738055
http://s000.tinyupload.com/index.php?file_id=40712395178734798710
I don't see anything wrong with either of those. It may be an issue in
uTorrent.
Post by Michael Mckeown
I'm using the latest master from github.
it seems its the http seed that's the problem.
As for the web seeds not showing up in libtorrent, are you looking at
alerts saying that they failed and were removed?
------------------------------------------------------------------------------
Continue reading on narkive:
Loading...