How does sonarr learn about a completed download

Sonarr version (exact version): 4.0.15
Mono version (if Sonarr is not running on Windows): unknown
OS: Ubuntu 22.04
Debug logs: n/a
Description of issue: I try to get an understanding of the communication between sonadrr and indexer/downloader

I try to get a (medium-)level of understanding how sonarr communicates with mostly the downloaders. Does it maintain a connection with qbittorrent/sabnzb while the download is ongoing, thus getting progress information? Or are the downloader send messages to sonarr? I am particularly interested on how a qbittorrent running on windows tells sonarr on my linux box where to find completed downloads.
Thanks - Merlin

Sonarr polls the download clients, approximately every 60-90s.

Thanks, Markus!
And how does sonar know where the, for example, qbittorrent places the downloaded files? In my case qbittorrent places the files in c:\cpt, and this is something linux does not normally know and understand. But I also told sonarr the mapping of c:\cpt to /u/nuc/cpt (smb mapped to the windows download folder) but this is not a mapping only for that download client, so I wonder of my windows qbittorrent tells sonarr that it puts its files into c:\cpt and then sonarr looks in /u/nuc/cpt based on the mapping.

The response from the download client, Qbit in this case tells Sonarr where it is, then if a matching Remote Path Mapping exists it applies it.

Thank you, do you know if there is documentation for these protocols and where I might find it? Or is it the good old unix days of “Use the source, Luke!”

The download clients have their API documentation and some of this is explained on the wiki, but nothing in technical detail.

Very nice - thank you. With that info I was able to find a module for python that implements the api for qbittorrent and with a quick python script I could retrieve all the info about an active torrent.
In case sombody is interested, here is what the info of a random torrent look like:

TorrentDictionary({'added_on': 1756615146, 'amount_left': 16900217982, 'auto_tmm': False, 'availability': 2.0290000438690186, 'category': '', 'comment': '', 'completed': 517013504, 'completion_on': -1, 'content_path': 'C:\\cpt\\Adobe Illustrator Complete Mega Course - Beginner to Advance', 'dl_limit': 0, 'dlspeed': 1820854, 'download_path': '', 'downloaded': 515440426, 'downloaded_session': 517076916, 'eta': 9629, 'f_l_piece_prio': False, 'force_start': False, 'has_metadata': True, 'hash': 'cbacd2100485b8481cb69cc001fedaa4df4750d5', 'inactive_seeding_time_limit': -2, 'infohash_v1': 'cbacd2100485b8481cb69cc001fedaa4df4750d5', 'infohash_v2': '', 'last_activity': 1756615651, 'magnet_uri': 'magnet:?xt=urn:btih:MAGNET', 'max_inactive_seeding_time': -1, 'max_ratio': -1, 'max_seeding_time': -1, 'name': 'Adobe Illustrator Complete Mega Course - Beginner to Advance', 'num_complete': 11, 'num_incomplete': 2, 'num_leechs': 0, 'num_seeds': 2, 'popularity': 0, 'priority': 1, 'private': False, 'progress': 0.029684023228121893, 'ratio': 0, 'ratio_limit': -2, 'root_path': 'C:\\cpt\\Adobe Illustrator Complete Mega Course - Beginner to Advance', 'save_path': 'C:\\cpt', 'seeding_time': 0, 'seeding_time_limit': -2, 'seen_complete': 1756615651, 'seq_dl': False, 'size': 17417231486, 'state': 'downloading', 'super_seeding': False, 'tags': '', 'time_active': 505, 'total_size': 17532509310, 'tracker': 'udp://open.stealth.si:80/announce', 'trackers_count': 8, 'up_limit': 0, 'uploaded': 0, 'uploaded_session': 0, 'upspeed': 0, 'reannounce_in': 31})

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.