Permalink
Browse files

Made a runner for it

  • Loading branch information...
Kartik Thakore
Kartik Thakore committed Oct 1, 2012
1 parent 820ecfa commit 13c8ea5297a586568fe534d0061a58211d69c9c8
Showing with 21 additions and 1 deletion.
  1. +19 −0 runner.pl
  2. +2 −1 simple_client.cpp
View
@@ -0,0 +1,19 @@
+use strict;
+use warnings;
+
+my $D;
+
+my $d = $ARGV[0] || 'torrents';
+
+opendir( $D, "$d") || die "Can't open dir $d: $!\n";
+my @list = readdir($D);
+closedir($D);
+
+foreach my $file ( @list )
+{
+ unless($file =~ '.' || $file =~ '..' ){
+ if ( $file =~ '.torrent' ){
+ `sc $file`;
+ }
+ }
+}
View
@@ -21,7 +21,7 @@ int main(int argc, char* argv[])
if (argc != 2)
{
- std::cerr << "usage: ./sc magnet_uri\n"
+ std::cerr << "usage: ./sc torrent_file.torrent\n"
"to stop the client, press return.\n";
return 1;
}
@@ -31,6 +31,7 @@ if (argc != 2)
#endif
{
session s;
+ s.set_download_rate_limit( 128000 );
s.listen_on(std::make_pair(6881, 6889));
add_torrent_params p;
p.save_path = "./";

0 comments on commit 13c8ea5

Please sign in to comment.