r216 - /debtorrent/branches/unique/uniquely.py

camrdale-guest at users.alioth.debian.org camrdale-guest at users.alioth.debian.org
Fri Aug 10 05:38:02 UTC 2007


Author: camrdale-guest
Date: Fri Aug 10 05:38:02 2007
New Revision: 216

URL: http://svn.debian.org/wsvn/debtorrent/?sc=1&rev=216
Log:
Add the Tracker field to uniquely.

Modified:
    debtorrent/branches/unique/uniquely.py

Modified: debtorrent/branches/unique/uniquely.py
URL: http://svn.debian.org/wsvn/debtorrent/debtorrent/branches/unique/uniquely.py?rev=216&op=diff
==============================================================================
--- debtorrent/branches/unique/uniquely.py (original)
+++ debtorrent/branches/unique/uniquely.py Fri Aug 10 05:38:02 2007
@@ -16,9 +16,10 @@
 # can not contain Date, Infohash, NextPiece or OriginalPieces
 default_hash_fields = ["Codename", "Suite", "Component", "Architecture",
                        "PieceSize", "OriginalDate"]
-header_order = ["Torrent", "Infohash", "OriginalDate", "Date", "PieceSize",
-                "NextPiece", "OriginalPieces", "Codename", "Suite",
-                "Component", "Architecture", "TorrentHashFields"]
+default_tracker = "http://dttracker.debian.net:6969/announce"
+header_order = ["Torrent", "Infohash", "InfohashArchs", "OriginalDate", "Date",
+                "PieceSize", "NextPiece", "OriginalPieces", "Codename", "Suite",
+                "Component", "Architecture", "Tracker", "TorrentHashFields"]
 
 def get_old(old_file):
     """Read the headers and piece ordering data from an old file.
@@ -231,6 +232,7 @@
     all_headers["Suite"] = suite
     all_headers["Component"] = component
     all_headers["Architecture"] = "all"
+    all_headers.setdefault("Tracker", default_tracker)
     all_headers.setdefault("TorrentHashFields", " ".join(default_hash_fields))
     
     # Calculate the new hash
@@ -283,6 +285,7 @@
         headers["Suite"] = suite
         headers["Component"] = component
         headers["Architecture"] = arch
+        headers.setdefault("Tracker", default_tracker)
         headers.setdefault("TorrentHashFields", " ".join(default_hash_fields))
         
         # Calculate the new hash




More information about the Debtorrent-commits mailing list