+#
+# !! Imports required for create_torrent
+#
+from BaseLib.Core.API import *
+#
+#
+#
+
+def create_torrent(input_):
+ tdef = TorrentDef()
+ tdef.add_content(input_, config.AVINFO_CLASS.get_video_duration(input_))
+ tdef.set_tracker(config.BT_TRACKER)
+
+ tdef.set_piece_length(32768)
+
+ tdef.finalize()
+ tdef.save(input_ + ".tstream")
+
+ print 'READY!', config.BT_TRACKER, config.AVINFO_CLASS.get_video_duration(input_)