mirror of
https://github.com/werwolfby/monitorrent.git
synced 2026-10-14 21:39:03 +00:00
[PR #354] [MERGED] Qbittorrent add torrent fixes (wait for async add) #397
Labels
No labels
bug
docs
duplicate
enhancement
Epic
feature
feature
future
help wanted
in progress
need more info
plugin
proxy
pull-request
python 2
python 3
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
werwolfby/monitorrent#397
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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)
8db204dQbittorrent add torrent fixes (wait for async add)1536ea1build: update qbittorrent-api to 2023.3.44b2cafecrefactor: replace while True with forfa79096build: 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.