Hide header actions when signed out
This commit is contained in:
@@ -465,9 +465,14 @@ async def build_snapshot(request_id: str) -> Snapshot:
|
||||
try:
|
||||
download_ids = _download_ids(_queue_records(arr_queue))
|
||||
torrent_list: List[Dict[str, Any]] = []
|
||||
if download_ids and qbittorrent.configured():
|
||||
torrents = await qbittorrent.get_torrents_by_hashes("|".join(download_ids))
|
||||
torrent_list = torrents if isinstance(torrents, list) else []
|
||||
if qbittorrent.configured():
|
||||
if download_ids:
|
||||
torrents = await qbittorrent.get_torrents_by_hashes("|".join(download_ids))
|
||||
torrent_list = torrents if isinstance(torrents, list) else []
|
||||
else:
|
||||
category = f"magent-{request_id}"
|
||||
torrents = await qbittorrent.get_torrents_by_category(category)
|
||||
torrent_list = torrents if isinstance(torrents, list) else []
|
||||
summary = _summarize_qbit(torrent_list)
|
||||
qbit_state = summary.get("state")
|
||||
qbit_message = summary.get("message")
|
||||
|
||||
Reference in New Issue
Block a user