Jump to content

Check out our Community Blogs

- - - - -

Day 6 - KadyTorrent

Posted by Sundance, 13 January 2014 · 10180 views

python kadytorrent noelectrocutiontoday
First of all I must just say that I wanted to call it something less arrogant but seeing as Kady is my middle name and I wanted to call it kTorrent but wasn't sure if there was already a kTorrent out there (googling is so much work!) I called it KadyTorrent, now why am I going on about torrents when I should be mentioning about a raspberrypi? Well I did mention that I would be doing a DL system for my Pi to run and here is how it works.

1. I start my script
2. It reads any .torrent files from a directory
3. It removes any duplicates from its newly formed list
4. It loads the remaining .torrent files into the downloads function
5. The downloads function then connects and starts downloading said torrent into a generated folder within a downloads folder.
6. It then waits for user prompt to I.e. stop, reload torrent list (in case I add a new torrent) or because I want to do some debugging.
7. It infinite loops so it will not close randomly.

Below is a photo of how it looks via command line on a Windows PC.
Posted Image

That for the better part is how my download script will work.

This bit is how my hardware side will work.

1. Is there downloads currently active?
2. If yes turn on yellow LED
3. If No turn off all LED's
4. If downloads are complete turn on green LED Until user prompt
5. If there is an error such as internet connection loss or files can not be saved turn on RED LED

So now how do I merge the two together?

Well when a new download starts it will tell the script to change the "activated" variable to True and this will then be picked up by a script that is also running on the raspberry pi via the magic of the script feeding off of the same variables for different tasks.

and so that is how I will merge them together.

When the code is completed to my satisfaction I will write a full list of items used, rough assembly time and experience level required to do so and I will make a small video of it completely in action.

  • 0

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download