{"record":{"id":"d101ada2346ad33f","repo":"tonhowtf/omniget","slug":"torrent-was-added-in-list-only-mode","errorCode":null,"errorMessage":"Torrent was added in list-only mode","messagePattern":"Torrent was added in list-only mode","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/platforms/magnet.rs","lineNumber":213,"sourceCode":"            Some(list)\n        } else {\n            None\n        };\n        let torrent_opts = AddTorrentOptions {\n            overwrite: true,\n            only_files,\n            trackers,\n            ..Default::default()\n        };\n\n        tracing::info!(\"[magnet] adding torrent, output: {}\", output_dir.display());\n        let (torrent_id, managed_torrent) =\n            match session.add_torrent(add_torrent, Some(torrent_opts)).await {\n                Ok(resp) => match resp {\n                    librqbit::AddTorrentResponse::Added(id, handle) => (id, handle),\n                    librqbit::AddTorrentResponse::AlreadyManaged(id, handle) => (id, handle),\n                    librqbit::AddTorrentResponse::ListOnly(_) => {\n                        anyhow::bail!(\"Torrent was added in list-only mode\");\n                    }\n                },\n                Err(e) => anyhow::bail!(\"Failed to add torrent: {}\", e),\n            };\n\n        tracing::info!(\n            \"[magnet] torrent added (id={}), waiting for download...\",\n            torrent_id\n        );\n\n        if let Some(slot) = &opts.torrent_id_slot {\n            *slot.lock().await = Some(torrent_id);\n        }\n\n        let completion = managed_torrent.wait_until_completed();\n        tokio::pin!(completion);\n\n        let cancel_rx = opts.cancel_token.clone();","sourceCodeStart":195,"sourceCodeEnd":231,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/platforms/magnet.rs#L195-L231","documentation":"magnet.rs throws this when librqbit's add_torrent returns AddTorrentResponse::ListOnly instead of Added/AlreadyManaged. ListOnly means the torrent was registered only to fetch its metadata (list mode, e.g. only_metadata=true or a magnet in metadata-only mode) and no download was actually started, so download() cannot proceed.","triggerScenarios":"session.add_torrent(add_torrent, Some(torrent_opts)).await returns Ok(ListOnly(_)); the match at magnet.rs:213 bails on the ListOnly variant. Happens when AddTorrentOptions enable listing/metadata-only (e.g. only_metadata: true) or when the torrent options request list-only behavior.","commonSituations":"Resolver code path reuses the session in list-only mode for fetching metadata and then mistakenly calls the full download path; librqbit version/option change flips only_metadata; shared session configured for metadata listing is reused for downloading.","solutions":["Ensure AddTorrentOptions passed to add_torrent do not set only_metadata/list-only flags on the download path.","If the session was previously used for list-only lookups, create/reconfigure it with download-capable options before add_torrent.","Handle AddTorrentResponse::ListOnly explicitly by re-adding the torrent with full options instead of bailing.","Check librqbit upgrade notes — list-only semantics depend on the options struct and version."],"exampleFix":"// before\nlet mut add_opts = librqbit::AddTorrentOptions::default();\nadd_opts.only_metadata = true; // leftover from metadata lookup\nsession.add_torrent(add_torrent, Some(add_opts)).await\n// after\nlet add_opts = librqbit::AddTorrentOptions::default(); // download mode\nsession.add_torrent(add_torrent, Some(add_opts)).await","handlingStrategy":"validation","validationCode":"// ensure download-mode options before add_torrent\nlet opts = librqbit::AddTorrentOptions::default();\nassert!(!opts.only_metadata, \"list-only options must not be used on the download path\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never share AddTorrentOptions configured with only_metadata between metadata-lookup and download paths","Match explicitly on AddTorrentResponse::ListOnly and re-add with full options","After librqbit upgrades, review AddTorrentOptions defaults"],"tags":["torrent","librqbit","magnet","misconfiguration"],"backgroundTag":"unsupported-operation","analyzedSha":"8600b91f4246848bac346874daa9e61c1fc5677a","analyzedAt":"2026-09-12T14:29:19.317Z","contentChangedAt":"2026-09-12T14:29:19.317Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}