KTorrent scripts and information

KTorrent python scripts are attached.

Light Tracker Cleaning

#!/usr/bin/env kross
# Author=Sam
# File=tracker_light_clean.py
# Last Edit Date : 4/27/10 12:51 PM
# Light cleaning of tracker lists
# Disable thepiratebay
# Add openbittorrent

New Torrent Added

#!/usr/bin/env kross
# Author=Sam
# File=torrentAdded.py
# Last Edit Date : 4/27/10 1:12 PM
# Default actions to apply to newly added torrents
# Disable all trackers
# Add openbittorrent (enable http)
# Add publicbt (enable http)
# Move to top of Queue Manager

Torrent Status Changed

#!/usr/bin/env kross
# Author=Sam
# File=statusChanged.py
# Last Edit Date : 4/27/10 1:15 PM
# Default actions to apply to torrents changing status
# Move to bottom of Queue Manager
# Add publicbt (enable http)
# (Future: check and re-set limits, re-start)

New Adds Bump Up

#!/usr/bin/env kross
# Author=Sam
# File=newAddsBumpUp.py
# Throw away script! George is writing (&fixing) API calls that will make this not needed.
# (well, you'll need this until 4.x stable gets released)
# This script will move a set of torrents (or single torrent) from the bottom of the queue heap to the top.

Comments

the following will make your code more simple:

for t in tors:
   tor = KTorrent.torrent(t)
   for tracker in tor.trackers():
      if 'piratebay.org' in tracker:
         tor.setTrackerEnabled(tracker, 0)

   tor.addTracker(...)

Thanks,
Sam