mirror of
https://github.com/NohamR/Ratio.py.git
synced 2026-11-25 15:29:55 +00:00
Add configuration file
This commit is contained in:
1 parent
363aafe901
commit
8316712c75
2 files changed
+36
-5
No files matched your search
+4
-2
@@ -16,8 +16,10 @@ logging.basicConfig(level=logging.DEBUG)
|
||||
|
||||
class torrent():
|
||||
|
||||
def __init__(self, torrent_tile):
|
||||
with open(torrent_tile, 'rb') as tf:
|
||||
def __init__(self, configuration):
|
||||
self.configuration = configuration
|
||||
torrent_file = self.configuration['torrent:']
|
||||
with open(torrent_file, 'rb') as tf:
|
||||
data = tf.read()
|
||||
self.b_enc = bencoding()
|
||||
self.metainfo = self.b_enc.bdecode(data)
|
||||
|
||||
Reference in new issue
Block a user