restoring changes

This commit is contained in:
jblu 2022-08-12 21:30:18 -05:00
parent 06b5016b90
commit d1cda2a104
3 changed files with 3 additions and 14 deletions

View File

@ -2,7 +2,6 @@
import qbittorrentapi import qbittorrentapi
import pushover import pushover
from json import load from json import load
from json import dump
from qlist import * from qlist import *
from qlogging import * from qlogging import *
from qprocess import * from qprocess import *
@ -63,21 +62,16 @@ class Qbt:
self.tl.info('Connected.') self.tl.info('Connected.')
except qbittorrentapi.APIError as e: except qbittorrentapi.APIError as e:
self.tl.exception(e) self.tl.exception(e)
self.poc.send_message(e, title="qbit-maid API ERROR") self.po.send_message(e, title="qbit-maid API ERROR")
self.torrentlist = {} # self.torrentlist = {}
# Pulling all torrent data # Pulling all torrent data
self.torrentlist = self.qbt_client.torrents_info() self.torrentlist = self.qbt_client.torrents_info()
self.d = dump
self.l = load
writetor(self)
#Main process block #Main process block
#debugpremecal(self)
if self.use_log: if self.use_log:
listqbitapiinfo(self) listqbitapiinfo(self)
listfirsttor(self) listfirsttor(self)
buildtorlist(self) buildtorlist(self)
processcounts(self) processcounts(self)
#tordeletetags(self)
if self.use_log: if self.use_log:
torrentcount(self) torrentcount(self)
torprocessor(self) torprocessor(self)

View File

@ -51,11 +51,7 @@ def writetor(self, filepath='./torrentinfo.json'):
"""Write all torrent data to a file. """Write all torrent data to a file.
Useful for development of new features. Useful for development of new features.
""" """
json_init = self.l(self.torrentlist) pass
print(json_init)
# json_object = self.d(self.torrentlist, indent=4)
# with open(filepath, 'w') as fp:
# fp.write(json_object)
def listfirsttor(self, index=0): def listfirsttor(self, index=0):
"""Only lists the first torrent""" """Only lists the first torrent"""

File diff suppressed because one or more lines are too long