my $torrent_dir = "/$name/torrent";
$name =~ s/\W+/_/g;
+=head1 host_s1_torrent_list
+
+Returns JSON encoded list of all torrents
+
+=cut
+
$worker->register_function( $name . '_torrent_list' => sub {
my ($job) = @_;
my @cols = split(/\s+/,$job->arg);
return $j->encode( \@list );
} );
+=head1 host_s1_torrent_download ~login/path.torrent
+
+Start download of torrent
+
+=cut
+
$worker->register_function( $name . '_torrent_download' => sub {
my $work = $_[0]->arg;
chomp $work;
} );
+=head1 host_s1_torrent_share ~login/file.txt
+
+Create torrent and start seeding it
+
+=cut
+
$worker->register_function( $name . '_torrent_share' => sub {
my $work = $_[0]->arg;
chomp $work;