{"record":{"id":"b0fdac2caa351718","repo":"tonhowtf/omniget","slug":"noopdownloader-cannot-fetch-media-info-this-item-is-driven","errorCode":null,"errorMessage":"NoopDownloader cannot fetch media info; this item is driven by an external plugin","messagePattern":"NoopDownloader cannot fetch media info; this item is driven by an external plugin","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src-tauri/src/platforms/noop.rs","lineNumber":31,"sourceCode":"\nimpl Default for NoopDownloader {\n    fn default() -> Self {\n        Self::new()\n    }\n}\n\n#[async_trait]\nimpl PlatformDownloader for NoopDownloader {\n    fn name(&self) -> &str {\n        \"external\"\n    }\n\n    fn can_handle(&self, _url: &str) -> bool {\n        false\n    }\n\n    async fn get_media_info(&self, _url: &str) -> anyhow::Result<MediaInfo> {\n        Err(anyhow::anyhow!(\n            \"NoopDownloader cannot fetch media info; this item is driven by an external plugin\"\n        ))\n    }\n\n    async fn download(\n        &self,\n        _info: &MediaInfo,\n        _opts: &DownloadOptions,\n        _progress: tokio::sync::mpsc::Sender<omniget_core::models::progress::ProgressUpdate>,\n    ) -> anyhow::Result<DownloadResult> {\n        Err(anyhow::anyhow!(\n            \"NoopDownloader cannot drive download; this item is driven by an external plugin\"\n        ))\n    }\n}\n","sourceCodeStart":13,"sourceCodeEnd":47,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/src/platforms/noop.rs#L13-L47","documentation":"`NoopDownloader` is a placeholder implementation of the platform trait: `can_handle` always returns false and `get_media_info` is a hard error. Items routed to it are expected to be driven entirely by an external plugin, so the built-in media-info path must never be invoked on them; calling it anyway surfaces this error.","triggerScenarios":"Calling `get_media_info` on a `NoopDownloader` instance — i.e. a download item whose platform resolved to the noop backend (external plugin ownership) but was sent through the normal built-in media-info pipeline instead of the plugin path.","commonSituations":"Dispatcher/routing bug that maps unknown or plugin-owned URLs to NoopDownloader and then calls the standard flow; external plugin not installed/loaded so the item fell back to noop; tests accidentally exercising the noop backend.","solutions":["Check `can_handle(url)` (or the item's plugin ownership flag) before calling `get_media_info`; route plugin-owned items to the external plugin driver instead","Verify the external plugin for this platform is installed and registered so items don't fall back to NoopDownloader","Fix the downloader-selection/dispatch logic that assigned NoopDownloader to a URL that should have matched a real platform","In tests, use a stub downloader rather than NoopDownloader when exercising media-info flows"],"exampleFix":"// before\nlet info = downloader.get_media_info(&url).await?;\n// after\nif downloader.is_noop() {\n    anyhow::bail!(\"item {} is plugin-driven; use plugin.get_media_info\", item_id);\n}\nlet info = downloader.get_media_info(&url).await?;","handlingStrategy":"type-guard","validationCode":"fn uses_builtin_media_info(d: &dyn PlatformDownloader, url: &str) -> bool {\n    d.can_handle(url) && !d.is_noop()\n}","typeGuard":"fn is_noop(d: &dyn PlatformDownloader) -> bool {\n    // NoopDownloader::can_handle always returns false; treat non-handling backends as plugin-driven\n    !d.can_handle(\"\")\n}\n\n// before calling:\n// if is_noop(&downloader) { route_to_plugin(&item)?; }","tryCatchPattern":"match downloader.get_media_info(&url).await {\n    Err(e) if e.to_string().contains(\"NoopDownloader cannot fetch media info\") => {\n        plugin_executor::get_media_info(&item).await.context(\"item is plugin-driven\")\n    }\n    other => other,\n}","preventionTips":["Check can_handle(url) before invoking get_media_info; never call built-ins on plugin-owned items","Ensure external plugins are installed and registered so items don't fall back to NoopDownloader","Mark items with their owning backend and branch on it in the scheduler","Add a dispatcher test asserting no plugin-owned item reaches NoopDownloader built-ins"],"tags":["noop","plugin","routing","placeholder"],"backgroundTag":"method-not-implemented","analyzedSha":"8600b91f4246848bac346874daa9e61c1fc5677a","analyzedAt":"2026-09-12T14:29:19.317Z","contentChangedAt":"2026-09-12T14:29:19.317Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}