Repository: pymedusa/Medusa

Issue:
Not sure this is so much a thing or an issue but -  DOWNLOADHANDLER :: [4d9c792] Exception while checking torrent status. with error: division by zero
**Describe the bug**
2021-06-04 16:20:05 ERROR    DOWNLOADHANDLER :: [4d9c792] Exception while checking torrent status. with error: division by zero
Traceback (most recent call last):
  File "C:\Medusa\Medusa\medusa\schedulers\download_handler.py", line 364, in run
    self._update_status(torrent_client)
  File "C:\Medusa\Medusa\medusa\schedulers\download_handler.py", line 173, in _update_status
    status = client.get_status(history_result['info_hash'])
  File "C:\Medusa\Medusa\medusa\clients\torrent\qbittorrent.py", line 413, in get_status
    client_status.progress = int(torrent['downloaded'] / torrent['size'] * 100)
ZeroDivisionError: division by zero

**To Reproduce**
Steps to reproduce the behavior:
Honestly, this is probably more apt to be an open issue because I don't know what it is. Half the time I get errors (really warnings) saying it couldn't connect to the torrent handler, yet I can go and manage torrents and it pulls up qbittorrent fine. I have this pretty much automated on Windows 10 Pro 21H1 (latest Build) so I am unsure what is actually the problem. Everything downloads fine, pushes fine, processes fine, it just this was the warning and I couldn't submit it using the submit error option in Medusa.

**Expected behavior**
I expected nothing. The more I do this the more I feel like an idiot and that this isn't a bug. I am very sorry for this.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Medusa (please complete the following information):**
 - OS: Windows 10 Pro 21H1 19043.1023 Windows Feature Experience Pack 120.2212.3740.0
 - Branch: Master
 - Commit: 4d9c7927ebeb425e386b122a230c849163d065c7 - 0.5.12
 - Python version: 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)]
 - Database version: 44.18

**Debug logs (at least 50 lines):**
General > Advanced Settings > Enable debug
<details>

```
2021-06-04 17:26:59 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 50.54ms
2021-06-04 17:26:57 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 52.55ms
2021-06-04 17:26:55 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 51.04ms
2021-06-04 17:26:54 INFO	TORNADO :: [4d9c792] 101 GET /ws/ui (127.0.0.1) 0.50ms
2021-06-04 17:26:54 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/config/ (127.0.0.1) 21.52ms
2021-06-04 17:26:54 INFO	TORNADO :: [4d9c792] 304 GET /api/v2/stats/ (127.0.0.1) 19.02ms
2021-06-04 17:26:54 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 57.55ms
2021-06-04 17:26:54 INFO	TORNADO :: [4d9c792] 304 GET /errorlogs/ (127.0.0.1) 1.50ms
2021-06-04 17:26:54 INFO	TORNADO :: [4d9c792] 302 GET /errorlogs/submit_errors/ (127.0.0.1) 14810.22ms
2021-06-04 17:26:54 WARNING	Thread-24 :: [4d9c792] GitHub returned an error "Not Found". If using a token, make sure the proper scopes are selected.
2021-06-04 17:26:54 DEBUG	Thread-24 :: [4d9c792] Issue submitter failed with error: UnknownObjectException(404, {'message': 'Not Found', 'documentation_url': 'https://docs.github.com/rest/reference/issues#create-an-issue'})
2021-06-04 17:26:53 DEBUG	Thread-24 :: [4d9c792] Creating issue data for error: 2021-06-04 16:20:05 ERROR    DOWNLOADHANDLER :: [4d9c792] Exception while checking torrent status. with error: division by zero
Traceback (most recent call last):
  File "C:\Medusa\Medusa\medusa\schedulers\download_handler.py", line 364, in run
    self._update_status(torrent_client)
  File "C:\Medusa\Medusa\medusa\schedulers\download_handler.py", line 173, in _update_status
    status = client.get_status(history_result['info_hash'])
  File "C:\Medusa\Medusa\medusa\clients\torrent\qbittorrent.py", line 413, in get_status
    client_status.progress = int(torrent['downloaded'] / torrent['size'] * 100)
ZeroDivisionError: division by zero
2021-06-04 17:26:53 DEBUG	Thread-24 :: [4d9c792] Creating gist for error: 2021-06-04 16:20:05 ERROR    DOWNLOADHANDLER :: [4d9c792] Exception while checking torrent status. with error: division by zero
Traceback (most recent call last):
  File "C:\Medusa\Medusa\medusa\schedulers\download_handler.py", line 364, in run
    self._update_status(torrent_client)
  File "C:\Medusa\Medusa\medusa\schedulers\download_handler.py", line 173, in _update_status
    status = client.get_status(history_result['info_hash'])
  File "C:\Medusa\Medusa\medusa\clients\torrent\qbittorrent.py", line 413, in get_status
    client_status.progress = int(torrent['downloaded'] / torrent['size'] * 100)
ZeroDivisionError: division by zero
2021-06-04 17:26:53 DEBUG	Thread-24 :: [4d9c792] Found 0 similar issues for 1 log lines.
2021-06-04 17:26:52 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 51.54ms
2021-06-04 17:26:51 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 50.54ms
2021-06-04 17:26:49 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 50.54ms
2021-06-04 17:26:48 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 50.54ms
2021-06-04 17:26:46 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 51.04ms
2021-06-04 17:26:44 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 51.54ms
2021-06-04 17:26:44 DEBUG	CHECKVERSION :: [4d9c792] User-Agent: Medusa/0.5.12 (Windows; 10; dadc2e36-c03c-11eb-b3af-3c7c3feff955)
2021-06-04 17:26:44 DEBUG	CHECKVERSION :: [4d9c792] GET URL: https://cdn.pymedusa.com/news/news.md [Status: 200]
2021-06-04 17:26:43 DEBUG	CHECKVERSION :: [4d9c792] Checking GitHub for latest news.
2021-06-04 17:26:43 DEBUG	CHECKVERSION :: [4d9c792] cur_commit = 4d9c7927ebeb425e386b122a230c849163d065c7, newest_commit = 4d9c7927ebeb425e386b122a230c849163d065c7, num_commits_behind = 0, num_commits_ahead = 0
2021-06-04 17:26:43 DEBUG	CHECKVERSION :: [4d9c792] git rev-list --left-right "@{upstream}"...HEAD : returned successful
2021-06-04 17:26:43 DEBUG	CHECKVERSION :: [4d9c792] Executing git rev-list --left-right "@{upstream}"...HEAD with your shell in C:\Medusa\Medusa
2021-06-04 17:26:43 DEBUG	CHECKVERSION :: [4d9c792] git rev-parse --verify --quiet "@{upstream}" : returned successful
2021-06-04 17:26:43 DEBUG	CHECKVERSION :: [4d9c792] Executing git rev-parse --verify --quiet "@{upstream}" with your shell in C:\Medusa\Medusa
2021-06-04 17:26:43 DEBUG	CHECKVERSION :: [4d9c792] git fetch --prune origin : returned successful
2021-06-04 17:26:43 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 75.06ms
2021-06-04 17:26:42 DEBUG	CHECKVERSION :: [4d9c792] Executing git fetch --prune origin with your shell in C:\Medusa\Medusa
2021-06-04 17:26:42 DEBUG	CHECKVERSION :: [4d9c792] git branch master --set-upstream-to origin/master : returned successful
2021-06-04 17:26:42 DEBUG	CHECKVERSION :: [4d9c792] Executing git branch master --set-upstream-to origin/master with your shell in C:\Medusa\Medusa
2021-06-04 17:26:42 DEBUG	CHECKVERSION :: [4d9c792] git config remote.origin.pushurl https://github.com/pymedusa/Medusa : returned successful
2021-06-04 17:26:42 DEBUG	CHECKVERSION :: [4d9c792] Executing git config remote.origin.pushurl https://github.com/pymedusa/Medusa with your shell in C:\Medusa\Medusa
2021-06-04 17:26:42 DEBUG	CHECKVERSION :: [4d9c792] git config remote.origin.url https://github.com/pymedusa/Medusa : returned successful
2021-06-04 17:26:42 DEBUG	CHECKVERSION :: [4d9c792] Executing git config remote.origin.url https://github.com/pymedusa/Medusa with your shell in C:\Medusa\Medusa
2021-06-04 17:26:42 DEBUG	CHECKVERSION :: [4d9c792] git rev-parse HEAD : returned successful
2021-06-04 17:26:42 DEBUG	CHECKVERSION :: [4d9c792] Executing git rev-parse HEAD with your shell in C:\Medusa\Medusa
2021-06-04 17:26:42 DEBUG	CHECKVERSION :: [4d9c792] git symbolic-ref -q HEAD : returned successful
2021-06-04 17:26:42 DEBUG	CHECKVERSION :: [4d9c792] Executing git symbolic-ref -q HEAD with your shell in C:\Medusa\Medusa
2021-06-04 17:26:42 DEBUG	CHECKVERSION :: [4d9c792] git ls-remote --heads origin : returned successful
2021-06-04 17:26:41 DEBUG	Thread-24 :: [4d9c792] Searching for issues similar to:
ZeroDivisionError: division by zero
2021-06-04 17:26:41 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 51.04ms
2021-06-04 17:26:41 DEBUG	CHECKVERSION :: [4d9c792] Executing git ls-remote --heads origin with your shell in C:\Medusa\Medusa
2021-06-04 17:26:41 DEBUG	CHECKVERSION :: [4d9c792] git symbolic-ref -q HEAD : returned successful
2021-06-04 17:26:41 DEBUG	CHECKVERSION :: [4d9c792] Executing git symbolic-ref -q HEAD with your shell in C:\Medusa\Medusa
2021-06-04 17:26:41 DEBUG	CHECKVERSION :: [4d9c792] git config remote.origin.pushurl https://github.com/pymedusa/Medusa : returned successful
2021-06-04 17:26:41 DEBUG	CHECKVERSION :: [4d9c792] Executing git config remote.origin.pushurl https://github.com/pymedusa/Medusa with your shell in C:\Medusa\Medusa
2021-06-04 17:26:41 DEBUG	CHECKVERSION :: [4d9c792] git config remote.origin.url https://github.com/pymedusa/Medusa : returned successful
2021-06-04 17:26:41 DEBUG	CHECKVERSION :: [4d9c792] Executing git config remote.origin.url https://github.com/pymedusa/Medusa with your shell in C:\Medusa\Medusa
2021-06-04 17:26:41 DEBUG	CHECKVERSION :: [4d9c792] Starting new thread: CHECKVERSION
2021-06-04 17:26:40 DEBUG	Thread-24 :: [4d9c792] cur_commit = 4d9c7927ebeb425e386b122a230c849163d065c7, newest_commit = 4d9c7927ebeb425e386b122a230c849163d065c7, num_commits_behind = 0, num_commits_ahead = 0
2021-06-04 17:26:40 DEBUG	Thread-24 :: [4d9c792] git rev-list --left-right "@{upstream}"...HEAD : returned successful
2021-06-04 17:26:40 DEBUG	Thread-24 :: [4d9c792] Executing git rev-list --left-right "@{upstream}"...HEAD with your shell in C:\Medusa\Medusa
2021-06-04 17:26:40 DEBUG	Thread-24 :: [4d9c792] git rev-parse --verify --quiet "@{upstream}" : returned successful
2021-06-04 17:26:40 DEBUG	Thread-24 :: [4d9c792] Executing git rev-parse --verify --quiet "@{upstream}" with your shell in C:\Medusa\Medusa
2021-06-04 17:26:40 DEBUG	Thread-24 :: [4d9c792] git fetch --prune origin : returned successful
2021-06-04 17:26:40 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 51.04ms
2021-06-04 17:26:39 DEBUG	Thread-24 :: [4d9c792] Executing git fetch --prune origin with your shell in C:\Medusa\Medusa
2021-06-04 17:26:39 DEBUG	Thread-24 :: [4d9c792] git branch master --set-upstream-to origin/master : returned successful
2021-06-04 17:26:39 DEBUG	Thread-24 :: [4d9c792] Executing git branch master --set-upstream-to origin/master with your shell in C:\Medusa\Medusa
2021-06-04 17:26:39 DEBUG	Thread-24 :: [4d9c792] git config remote.origin.pushurl https://github.com/pymedusa/Medusa : returned successful
2021-06-04 17:26:39 DEBUG	Thread-24 :: [4d9c792] Executing git config remote.origin.pushurl https://github.com/pymedusa/Medusa with your shell in C:\Medusa\Medusa
2021-06-04 17:26:39 DEBUG	Thread-24 :: [4d9c792] git config remote.origin.url https://github.com/pymedusa/Medusa : returned successful
2021-06-04 17:26:39 DEBUG	Thread-24 :: [4d9c792] Executing git config remote.origin.url https://github.com/pymedusa/Medusa with your shell in C:\Medusa\Medusa
2021-06-04 17:26:39 DEBUG	Thread-24 :: [4d9c792] git rev-parse HEAD : returned successful
2021-06-04 17:26:39 DEBUG	Thread-24 :: [4d9c792] Executing git rev-parse HEAD with your shell in C:\Medusa\Medusa
2021-06-04 17:26:39 DEBUG	Thread-24 :: [4d9c792] git symbolic-ref -q HEAD : returned successful
2021-06-04 17:26:39 DEBUG	Thread-24 :: [4d9c792] Executing git symbolic-ref -q HEAD with your shell in C:\Medusa\Medusa
2021-06-04 17:26:39 DEBUG	Thread-24 :: [4d9c792] git symbolic-ref -q HEAD : returned successful
2021-06-04 17:26:39 DEBUG	Thread-24 :: [4d9c792] Executing git symbolic-ref -q HEAD with your shell in C:\Medusa\Medusa
2021-06-04 17:26:39 DEBUG	Thread-24 :: [4d9c792] Using: git
2021-06-04 17:26:39 DEBUG	Thread-24 :: [4d9c792] git version : returned successful
2021-06-04 17:26:39 DEBUG	Thread-24 :: [4d9c792] Executing git version with your shell in C:\Medusa\Medusa
2021-06-04 17:26:39 DEBUG	Thread-24 :: [4d9c792] Checking if we can use git commands: git version
2021-06-04 17:26:38 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 51.54ms
2021-06-04 17:26:36 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 51.04ms
2021-06-04 17:26:34 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 50.54ms
2021-06-04 17:26:32 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 50.54ms
2021-06-04 17:26:30 INFO	TORNADO :: [4d9c792] 200 PATCH /api/v2/config/main (127.0.0.1) 23.52ms
2021-06-04 17:26:30 DEBUG	APIv2-Thread-42 :: [4d9c792] Broken providers already updated in the last hour
2021-06-04 17:26:30 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 50.54ms
2021-06-04 17:26:28 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 50.54ms
2021-06-04 17:26:26 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 51.04ms
2021-06-04 17:26:24 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 55.55ms
2021-06-04 17:26:22 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 51.04ms
2021-06-04 17:26:20 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 50.54ms
2021-06-04 17:26:18 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 50.04ms
2021-06-04 17:26:16 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 50.04ms
2021-06-04 17:26:14 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 52.04ms
2021-06-04 17:26:12 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 53.05ms
2021-06-04 17:26:08 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 53.05ms
2021-06-04 17:26:06 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 50.54ms
2021-06-04 17:26:04 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 52.04ms
2021-06-04 17:26:02 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 51.04ms
2021-06-04 17:26:00 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 50.54ms
2021-06-04 17:25:58 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 50.54ms
2021-06-04 17:25:56 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 50.54ms
2021-06-04 17:25:54 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 50.54ms
2021-06-04 17:25:52 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 50.54ms
2021-06-04 17:25:50 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 51.54ms
2021-06-04 17:25:48 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 51.54ms
2021-06-04 17:25:46 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 50.54ms
2021-06-04 17:25:44 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 50.42ms
2021-06-04 17:25:42 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 50.54ms
2021-06-04 17:25:40 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 50.04ms
2021-06-04 17:25:38 INFO	TORNADO :: [4d9c792] 200 GET /api/v2/log?level=DEBUG&thread=&period=one_day&query=&limit=1000 (127.0.0.1) 52.04ms
2021-06-04 17:25:36 INFO	SEARCHQUEUE-DAILY-SEARCH :: [4d9c792] No needed episodes found
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: [4d9c792] No results to sort.
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: [4d9c792] Combining single and multi-episode results
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] No episodes [16] of season 4 are needed with this quality for Station 19
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] 341852: Ignoring found result for 'Station 19' S04E16 with unwanted quality 'SDTV'
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] 341852: Allowed, Preferred = [ None ] [ None ] Found = [ SDTV ]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] Using cache item for Station.19.S04E16.WEBRip.x264-ION10
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] No episodes [16] of season 4 are needed with this quality for Station 19
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] 341852: Ignoring found result for 'Station 19' S04E16 with unwanted quality '720p WEB-DL'
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] 341852: Allowed, Preferred = [ None ] [ None ] Found = [ 720p WEB-DL ]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] Using cache item for Station.19.S04E16.720p.WEB.h264-GOSSIP[rartv]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] No episodes [16] of season 4 are needed with this quality for Station 19
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] 341852: Ignoring found result for 'Station 19' S04E16 with unwanted quality '1080p WEB-DL'
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] 341852: Allowed, Preferred = [ None ] [ None ] Found = [ 1080p WEB-DL ]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] Using cache item for Station.19.S04E16.1080p.WEB.h264-GOSSIP[rartv]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] No episodes [18] of season 3 are needed with this quality for The Neighborhood
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] 348851: Ignoring found result for 'The Neighborhood' S03E18 with unwanted quality '1080p WEB-DL'
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] 348851: Allowed, Preferred = [ None ] [ None ] Found = [ 1080p WEB-DL ]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] Using cache item for The.Neighborhood.S03E18.1080p.WEB.H264-GGEZ[rartv]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] No episodes [18] of season 3 are needed with this quality for The Neighborhood
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] 348851: Ignoring found result for 'The Neighborhood' S03E18 with unwanted quality '720p WEB-DL'
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] 348851: Allowed, Preferred = [ None ] [ None ] Found = [ 720p WEB-DL ]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] Using cache item for The.Neighborhood.S03E18.720p.WEB.H264-GGEZ[rartv]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] No episodes [18] of season 3 are needed with this quality for The Neighborhood
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] 348851: Ignoring found result for 'The Neighborhood' S03E18 with unwanted quality 'SDTV'
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] 348851: Allowed, Preferred = [ None ] [ None ] Found = [ SDTV ]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] Using cache item for The.Neighborhood.S03E18.WEBRip.x264-ION10
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] No episodes [11] of season 2 are needed with this quality for Zoey's Extraordinary Playlist
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] 363815: Ignoring found result for 'Zoey's Extraordinary Playlist' S02E11 with unwanted quality 'SDTV'
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] 363815: Allowed, Preferred = [ 4K UHD TV, 4K UHD WEB-DL, 4K UHD BluRay, 8K UHD TV, 8K UHD WEB-DL, 8K UHD BluRay ] [ None ] Found = [ SDTV ]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] Using cache item for Zoeys.Extraordinary.Playlist.S02E11.WEBRip.x264-ION10
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] No episodes [11] of season 2 are needed with this quality for Zoey's Extraordinary Playlist
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] 363815: Ignoring found result for 'Zoey's Extraordinary Playlist' S02E11 with unwanted quality '720p WEB-DL'
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] 363815: Allowed, Preferred = [ 4K UHD TV, 4K UHD WEB-DL, 4K UHD BluRay, 8K UHD TV, 8K UHD WEB-DL, 8K UHD BluRay ] [ None ] Found = [ 720p WEB-DL ]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] Using cache item for Zoeys.Extraordinary.Playlist.S02E11.720p.AMZN.WEBRip.DDP5.1.x264-TEPES[rartv]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] No episodes [11] of season 2 are needed with this quality for Zoey's Extraordinary Playlist
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] 363815: Ignoring found result for 'Zoey's Extraordinary Playlist' S02E11 with unwanted quality '720p WEB-DL'
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] 363815: Allowed, Preferred = [ 4K UHD TV, 4K UHD WEB-DL, 4K UHD BluRay, 8K UHD TV, 8K UHD WEB-DL, 8K UHD BluRay ] [ None ] Found = [ 720p WEB-DL ]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] Using cache item for Zoeys.Extraordinary.Playlist.S02E11.720p.WEB.H264-CAKES[rartv]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] No episodes [11] of season 2 are needed with this quality for Zoey's Extraordinary Playlist
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] 363815: Ignoring found result for 'Zoey's Extraordinary Playlist' S02E11 with unwanted quality '1080p WEB-DL'
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] 363815: Allowed, Preferred = [ 4K UHD TV, 4K UHD WEB-DL, 4K UHD BluRay, 8K UHD TV, 8K UHD WEB-DL, 8K UHD BluRay ] [ None ] Found = [ 1080p WEB-DL ]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] Using cache item for Zoeys.Extraordinary.Playlist.S02E11.1080p.AMZN.WEBRip.DDP5.1.x264-TEPES[rartv]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] No episodes [11] of season 2 are needed with this quality for Zoey's Extraordinary Playlist
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] 363815: Ignoring found result for 'Zoey's Extraordinary Playlist' S02E11 with unwanted quality '1080p WEB-DL'
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] 363815: Allowed, Preferred = [ 4K UHD TV, 4K UHD WEB-DL, 4K UHD BluRay, 8K UHD TV, 8K UHD WEB-DL, 8K UHD BluRay ] [ None ] Found = [ 1080p WEB-DL ]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] Using cache item for Zoeys.Extraordinary.Playlist.S02E11.1080p.WEB.H264-CAKES[rartv]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] No episodes [8] of season 1 are needed with this quality for Big Shot
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] 96716: Ignoring found result for 'Big Shot' S01E08 with unwanted quality '1080p WEB-DL'
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] 96716: Allowed, Preferred = [ 4K UHD TV, 4K UHD WEB-DL, 4K UHD BluRay, 8K UHD TV, 8K UHD WEB-DL, 8K UHD BluRay ] [ None ] Found = [ 1080p WEB-DL ]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] Using cache item for Big.Shot.S01E08.1080p.DSNP.WEBRip.DDP5.1.Atmos.x264-NOGRP[rartv]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] No episodes [8] of season 1 are needed with this quality for Big Shot
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] 96716: Ignoring found result for 'Big Shot' S01E08 with unwanted quality 'SDTV'
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] 96716: Allowed, Preferred = [ 4K UHD TV, 4K UHD WEB-DL, 4K UHD BluRay, 8K UHD TV, 8K UHD WEB-DL, 8K UHD BluRay ] [ None ] Found = [ SDTV ]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] Using cache item for Big.Shot.S01E08.WEBRip.x264-ION10
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] Transaction with 20 queries executed
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] No episodes [16] of season 4 are needed with this quality for Station 19
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] 341852: Ignoring found result for 'Station 19' S04E16 with unwanted quality '720p WEB-DL'
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] 341852: Allowed, Preferred = [ None ] [ None ] Found = [ 720p WEB-DL ]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] Using cache item for Station.19.S04E16.720p.WEB.h264-GOSSIP[rartv]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] No episodes [16] of season 4 are needed with this quality for Station 19
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] 341852: Ignoring found result for 'Station 19' S04E16 with unwanted quality '1080p WEB-DL'
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] 341852: Allowed, Preferred = [ None ] [ None ] Found = [ 1080p WEB-DL ]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] Using cache item for Station.19.S04E16.1080p.WEB.h264-GOSSIP[rartv]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] No episodes [18] of season 3 are needed with this quality for The Neighborhood
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] 348851: Ignoring found result for 'The Neighborhood' S03E18 with unwanted quality '1080p WEB-DL'
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] 348851: Allowed, Preferred = [ None ] [ None ] Found = [ 1080p WEB-DL ]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] Using cache item for The.Neighborhood.S03E18.1080p.WEB.H264-GGEZ[rartv]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] No episodes [18] of season 3 are needed with this quality for The Neighborhood
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] 348851: Ignoring found result for 'The Neighborhood' S03E18 with unwanted quality '720p WEB-DL'
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] 348851: Allowed, Preferred = [ None ] [ None ] Found = [ 720p WEB-DL ]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] Using cache item for The.Neighborhood.S03E18.720p.WEB.H264-GGEZ[rartv]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] No episodes [11] of season 2 are needed with this quality for Zoey's Extraordinary Playlist
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] 363815: Ignoring found result for 'Zoey's Extraordinary Playlist' S02E11 with unwanted quality '720p WEB-DL'
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] 363815: Allowed, Preferred = [ 4K UHD TV, 4K UHD WEB-DL, 4K UHD BluRay, 8K UHD TV, 8K UHD WEB-DL, 8K UHD BluRay ] [ None ] Found = [ 720p WEB-DL ]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] Using cache item for Zoeys.Extraordinary.Playlist.S02E11.720p.WEB.H264-CAKES[rartv]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] No episodes [11] of season 2 are needed with this quality for Zoey's Extraordinary Playlist
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] 363815: Ignoring found result for 'Zoey's Extraordinary Playlist' S02E11 with unwanted quality '720p WEB-DL'
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] 363815: Allowed, Preferred = [ 4K UHD TV, 4K UHD WEB-DL, 4K UHD BluRay, 8K UHD TV, 8K UHD WEB-DL, 8K UHD BluRay ] [ None ] Found = [ 720p WEB-DL ]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] Using cache item for Zoeys.Extraordinary.Playlist.S02E11.720p.AMZN.WEBRip.DDP5.1.x264-TEPES[rartv]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] No episodes [11] of season 2 are needed with this quality for Zoey's Extraordinary Playlist
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] 363815: Ignoring found result for 'Zoey's Extraordinary Playlist' S02E11 with unwanted quality '1080p WEB-DL'
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] 363815: Allowed, Preferred = [ 4K UHD TV, 4K UHD WEB-DL, 4K UHD BluRay, 8K UHD TV, 8K UHD WEB-DL, 8K UHD BluRay ] [ None ] Found = [ 1080p WEB-DL ]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] Using cache item for Zoeys.Extraordinary.Playlist.S02E11.1080p.WEB.H264-CAKES[rartv]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] No episodes [11] of season 2 are needed with this quality for Zoey's Extraordinary Playlist
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] 363815: Ignoring found result for 'Zoey's Extraordinary Playlist' S02E11 with unwanted quality '1080p WEB-DL'
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] 363815: Allowed, Preferred = [ 4K UHD TV, 4K UHD WEB-DL, 4K UHD BluRay, 8K UHD TV, 8K UHD WEB-DL, 8K UHD BluRay ] [ None ] Found = [ 1080p WEB-DL ]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] Using cache item for Zoeys.Extraordinary.Playlist.S02E11.1080p.AMZN.WEBRip.DDP5.1.x264-TEPES[rartv]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] No episodes [8] of season 1 are needed with this quality for Big Shot
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] 96716: Ignoring found result for 'Big Shot' S01E08 with unwanted quality '1080p WEB-DL'
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] 96716: Allowed, Preferred = [ 4K UHD TV, 4K UHD WEB-DL, 4K UHD BluRay, 8K UHD TV, 8K UHD WEB-DL, 8K UHD BluRay ] [ None ] Found = [ 1080p WEB-DL ]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] Using cache item for Big.Shot.S01E08.1080p.DSNP.WEBRip.DDP5.1.Atmos.x264-NOGRP[rartv]
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] Transaction with 20 queries executed
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Rarbg :: [4d9c792] Last update was too soon, using old cache. Last update ran 600 seconds ago. Updated less than 15 minutes ago.
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] Transaction with 3 queries executed
2021-06-04 17:25:36 DEBUG	SEARCHQUEUE-DAILY-SEARCH :: Jacket - Rarbg :: [4d9c792] Hit old cached items, not parsing any more for: jacket___rarbg
```
</details>

**Additional context**
Add any other context about the problem here.



Discussion:
This happens because qbittorrent does not resolve metadata and torrent size when queueing magnets. I can create a pull request for a fix.

Resolving patch:
diff --git a/medusa/clients/torrent/qbittorrent.py b/medusa/clients/torrent/qbittorrent.py
--- a/medusa/clients/torrent/qbittorrent.py
+++ b/medusa/clients/torrent/qbittorrent.py
@@ -402,7 +402,7 @@ def get_status(self, info_hash):
         client_status.ratio = torrent['ratio'] * 1.0
 
         # Store progress
-        client_status.progress = int(torrent['downloaded'] / torrent['size'] * 100)
+        client_status.progress = int(torrent['downloaded'] / torrent['size'] * 100) if torrent['size'] else 0
 
         # Store destination
         client_status.destination = torrent['save_path']


Test patch: