[mirrorbrain-commits] r8073 - in /trunk: mb/mb/conn.py sql/schema-postgresql.sql

From: <poeml_at_mirrorbrain.org>
Date: Thu, 05 Aug 2010 01:57:14 -0000
Author: poeml
Date: Thu Aug  5 03:57:13 2010
New Revision: 8073

URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain?rev=8073&view=rev
Log:
Add "btih" field to the hash table for the "BitTorrent information
hash" needed for magnet links (issue #56)

Modified:
    trunk/mb/mb/conn.py
    trunk/sql/schema-postgresql.sql

Modified: trunk/mb/mb/conn.py
URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain/trunk/mb/mb/conn.py?rev=8073&r1=8072&r2=8073&view=diff
==============================================================================
--- trunk/mb/mb/conn.py (original)
+++ trunk/mb/mb/conn.py Thu Aug  5 03:57:13 2010
_at_@ -188,6 +188,7 @@
                     "sha256" BYTEA NOT NULL,
                     "sha1piecesize" INTEGER NOT NULL,
                     "sha1pieces" BYTEA NOT NULL,
+                    "btih" BYTEA NOT NULL,
                     "pgp" TEXT NOT NULL,
                     "zblocksize" SMALLINT NOT NULL,
                     "zhashlens" VARCHAR(8),
_at_@ -207,6 +208,8 @@
                      sha1piecesize, 
                      sha1pieces,
                      encode(sha1pieces, 'hex') AS sha1pieceshex,
+                     btih,
+                     encode(btih, 'hex') AS btihhex,
                      pgp,
                      zblocksize,
                      zhashlens,

Modified: trunk/sql/schema-postgresql.sql
URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain/trunk/sql/schema-postgresql.sql?rev=8073&r1=8072&r2=8073&view=diff
==============================================================================
--- trunk/sql/schema-postgresql.sql (original)
+++ trunk/sql/schema-postgresql.sql Thu Aug  5 03:57:13 2010
_at_@ -31,6 +31,7 @@
         "sha256" BYTEA NOT NULL,
         "sha1piecesize" INTEGER NOT NULL,
         "sha1pieces" BYTEA NOT NULL,
+        "btih"   BYTEA NOT NULL,
         "pgp" TEXT NOT NULL,
         "zblocksize" SMALLINT NOT NULL,
         "zhashlens" VARCHAR(8),
_at_@ -58,6 +59,8 @@
          sha1piecesize, 
          sha1pieces,
          encode(sha1pieces, 'hex') AS sha1pieceshex,
+         btih,
+         encode(btih, 'hex') AS btihhex, 
          pgp,
          zblocksize,
          zhashlens,




_______________________________________________
mirrorbrain-commits mailing list
Archive: http://mirrorbrain.org/archive/mirrorbrain-commits/

Note: To remove yourself from this list, send a mail with the content
 	unsubscribe
to the address mirrorbrain-commits-request_at_mirrorbrain.org
Received on Thu Aug 05 2010 - 01:57:15 GMT

This archive was generated by hypermail 2.3.0 : Mon Feb 20 2012 - 23:47:04 GMT