Added scraping for uncategorized torrents
This commit is contained in:
parent
40d9bb964e
commit
9e9f4a9ce4
1 changed files with 2 additions and 2 deletions
|
@ -128,7 +128,7 @@ class QbittorrentMetricsCollector():
|
||||||
if self.INCLUDE_UNCATEGORIZED:
|
if self.INCLUDE_UNCATEGORIZED:
|
||||||
categories.Uncategorized = AttrDict({'name': 'Uncategorized', 'savePath': ''})
|
categories.Uncategorized = AttrDict({'name': 'Uncategorized', 'savePath': ''})
|
||||||
for category in categories:
|
for category in categories:
|
||||||
category_torrents = [t for t in self.torrents if t['category'] == category]
|
category_torrents = [t for t in self.torrents if t['category'] == category or (self.INCLUDE_UNCATEGORIZED and category == "Uncategorized" and t['category'] == "")]
|
||||||
|
|
||||||
for status in self.TORRENT_STATUSES:
|
for status in self.TORRENT_STATUSES:
|
||||||
status_prop = f"is_{status}"
|
status_prop = f"is_{status}"
|
||||||
|
@ -203,7 +203,7 @@ def main():
|
||||||
logger.info(
|
logger.info(
|
||||||
f"Including uncategorized torrents: {config['include_uncategorized']}"
|
f"Including uncategorized torrents: {config['include_uncategorized']}"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Start server
|
# Start server
|
||||||
start_http_server(config["exporter_port"])
|
start_http_server(config["exporter_port"])
|
||||||
logger.info(
|
logger.info(
|
||||||
|
|
Loading…
Reference in a new issue