restoring changes
This commit is contained in:
parent
06b5016b90
commit
d1cda2a104
10
qbit-maid.py
10
qbit-maid.py
@ -2,7 +2,6 @@
|
||||
import qbittorrentapi
|
||||
import pushover
|
||||
from json import load
|
||||
from json import dump
|
||||
from qlist import *
|
||||
from qlogging import *
|
||||
from qprocess import *
|
||||
@ -63,21 +62,16 @@ class Qbt:
|
||||
self.tl.info('Connected.')
|
||||
except qbittorrentapi.APIError as e:
|
||||
self.tl.exception(e)
|
||||
self.poc.send_message(e, title="qbit-maid API ERROR")
|
||||
self.torrentlist = {}
|
||||
self.po.send_message(e, title="qbit-maid API ERROR")
|
||||
# self.torrentlist = {}
|
||||
# Pulling all torrent data
|
||||
self.torrentlist = self.qbt_client.torrents_info()
|
||||
self.d = dump
|
||||
self.l = load
|
||||
writetor(self)
|
||||
#Main process block
|
||||
#debugpremecal(self)
|
||||
if self.use_log:
|
||||
listqbitapiinfo(self)
|
||||
listfirsttor(self)
|
||||
buildtorlist(self)
|
||||
processcounts(self)
|
||||
#tordeletetags(self)
|
||||
if self.use_log:
|
||||
torrentcount(self)
|
||||
torprocessor(self)
|
||||
|
@ -51,11 +51,7 @@ def writetor(self, filepath='./torrentinfo.json'):
|
||||
"""Write all torrent data to a file.
|
||||
Useful for development of new features.
|
||||
"""
|
||||
json_init = self.l(self.torrentlist)
|
||||
print(json_init)
|
||||
# json_object = self.d(self.torrentlist, indent=4)
|
||||
# with open(filepath, 'w') as fp:
|
||||
# fp.write(json_object)
|
||||
pass
|
||||
|
||||
def listfirsttor(self, index=0):
|
||||
"""Only lists the first torrent"""
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user