I am trying to create a script to help me move large files accross an internal Windows network, and was hoping that Ruby, in conjunction with BitTorrent would be ideal. However, my code doesnt seem to actually download anything.
I know the RubyTorrent project has been abandoned for a long time, so I was hoping one of my fellow Stackoverflow'ers could help me.
My code (so far is):
require 'rubytorrent'
bt = RubyTorrent::BitTorrent.new('http://www.mininova.org/get/2511754')
puts bt.tracker
puts bt.port
thread = Thread.new do
while true
puts bt.percent_completed
sleep 15
end
end
bt.on_event(self, :complete) { thread.kill }
thread.join
As you can see, the 'bt.tracker' line is coming up as nil, so it might be a problem passing the .torrent file, but then why does it pass the rest of the file ok?
Any help getting this to work would be greatly appreciated.