[PR #354] [MERGED] Qbittorrent add torrent fixes (wait for async add) #397

Closed
opened 2026-10-13 19:57:00 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/werwolfby/monitorrent/pull/354
Author: @LinFor
Created: 3/22/2021
Status: ✅ Merged
Merged: 4/2/2023
Merged by: @werwolfby

Base: release/1.3.0 ← Head: pr_qbittorrent


📝 Commits (4)

  • 8db204d Qbittorrent add torrent fixes (wait for async add)
  • 1536ea1 build: update qbittorrent-api to 2023.3.44
  • b2cafec refactor: replace while True with for
  • fa79096 build: add docker compose with qbittorrent service

📊 Changes

5 files changed (+76 additions, -15 deletions)

View changed files

📝 .gitignore (+2 -0)
➕ docker-compose-tests.yaml (+19 -0)
📝 monitorrent/plugins/clients/qbittorrent.py (+30 -8)
📝 requirements.txt (+1 -1)
📝 tests/plugins/clients/test_qbittorrent.py (+24 -6)

📄 Description

В api qbittorrent процесс добавления нового торрента асинхронный - операция torrents_add завершается раньше, нежели добавленный торрент становится виден через интерфейс и api torrents_info.
Интерфейс плагинов monitorrent, судя по всему, рассчитывает на синхронное завершение операции add_torrent.

В PR добавлена синхронизация: внутри add_torrent после добавления осуществляется поллинг torrents_info до тех пор, пока вновь добавленный торрент не появится, но не более, чем 30 раз с интервалом в 1 секунду.

Исправляет: #350

PS: Если что не так по стилю и т.д. - правьте сразу, я не умею в питон, не знаю как там принято писать и т.д.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/werwolfby/monitorrent/pull/354 **Author:** [@LinFor](https://github.com/LinFor) **Created:** 3/22/2021 **Status:** ✅ Merged **Merged:** 4/2/2023 **Merged by:** [@werwolfby](https://github.com/werwolfby) **Base:** `release/1.3.0` ← **Head:** `pr_qbittorrent` --- ### 📝 Commits (4) - [`8db204d`](https://github.com/werwolfby/monitorrent/commit/8db204d5edc11ce6ac65b661390dcf2877f99c35) Qbittorrent add torrent fixes (wait for async add) - [`1536ea1`](https://github.com/werwolfby/monitorrent/commit/1536ea1ad4054f54a85d4cc1cb1b45efa8fed522) build: update qbittorrent-api to 2023.3.44 - [`b2cafec`](https://github.com/werwolfby/monitorrent/commit/b2cafec04e3e015247fb2c798fb309cdce2203d8) refactor: replace while True with for - [`fa79096`](https://github.com/werwolfby/monitorrent/commit/fa7909612031ed0afcfa64638a3993bb7b9e0d1f) build: add docker compose with qbittorrent service ### 📊 Changes **5 files changed** (+76 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+2 -0) ➕ `docker-compose-tests.yaml` (+19 -0) 📝 `monitorrent/plugins/clients/qbittorrent.py` (+30 -8) 📝 `requirements.txt` (+1 -1) 📝 `tests/plugins/clients/test_qbittorrent.py` (+24 -6) </details> ### 📄 Description В api qbittorrent процесс добавления нового торрента асинхронный - операция torrents_add завершается раньше, нежели добавленный торрент становится виден через интерфейс и api torrents_info. Интерфейс плагинов monitorrent, судя по всему, рассчитывает на синхронное завершение операции add_torrent. В PR добавлена синхронизация: внутри add_torrent после добавления осуществляется поллинг torrents_info до тех пор, пока вновь добавленный торрент не появится, но не более, чем 30 раз с интервалом в 1 секунду. Исправляет: #350 PS: Если что не так по стилю и т.д. - правьте сразу, я не умею в питон, не знаю как там принято писать и т.д. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-13 19:57:00 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
werwolfby/monitorrent#397
No description provided.