{"record":{"id":"bc777459e6446dd8","repo":"Radarr/Radarr","slug":"failed-to-find-a-valid-download-url-in-the-feed","errorCode":null,"errorMessage":"Failed to find a valid download url in the feed.","messagePattern":"Failed to find a valid download url in the feed\\.","errorType":"exception","errorClass":"UnsupportedFeedException","httpStatus":null,"severity":"warning","filePath":"src/NzbDrone.Core/Indexers/TorrentRss/TorrentRssSettingsDetector.cs","lineNumber":265,"sourceCode":"        private void ValidateReleases(TorrentInfo[] releases, TorrentRssIndexerSettings indexerSettings)\n        {\n            if (releases == null || releases.Empty())\n            {\n                throw new UnsupportedFeedException(\"Empty feed, cannot check if feed is parsable.\");\n            }\n\n            var torrentInfo = releases.First();\n\n            _logger.Trace(\"TorrentInfo: \\n{0}\", torrentInfo.ToString(\"L\"));\n\n            if (releases.Any(r => r.Title.IsNullOrWhiteSpace()))\n            {\n                throw new UnsupportedFeedException(\"Feed contains releases without title.\");\n            }\n\n            if (releases.Any(r => !IsValidDownloadUrl(r.DownloadUrl)))\n            {\n                throw new UnsupportedFeedException(\"Failed to find a valid download url in the feed.\");\n            }\n\n            var total = releases.Where(v => v.Guid != null).Select(v => v.Guid).ToArray();\n            var distinct = total.Distinct().ToArray();\n\n            if (distinct.Length != total.Length)\n            {\n                throw new UnsupportedFeedException(\"Feed contains releases with same guid, rejecting malformed rss feed.\");\n            }\n        }\n\n        private void ValidateReleaseSize(TorrentInfo[] releases, TorrentRssIndexerSettings indexerSettings)\n        {\n            if (!indexerSettings.AllowZeroSize && releases.Any(r => r.Size == 0))\n            {\n                throw new UnsupportedFeedException(\"Feed doesn't contain the release content size.\");\n            }\n","sourceCodeStart":247,"sourceCodeEnd":283,"githubUrl":"https://github.com/Radarr/Radarr/blob/ca451608dc60c6cec754aba8d96bfa30e9468ed5/src/NzbDrone.Core/Indexers/TorrentRss/TorrentRssSettingsDetector.cs#L247-L283","documentation":"TorrentRssSettingsDetector.ValidateReleases throws an UnsupportedFeedException when any release's DownloadUrl fails IsValidDownloadUrl. IsValidDownloadUrl rejects null/whitespace and any URL that does not start with magnet:, http:, or https:. Without a usable download URL a release cannot be fetched, so the feed is rejected during detection.","triggerScenarios":"At least one TorrentInfo has a DownloadUrl that is null/empty or does not begin with magnet:, http:, or https: (e.g. a relative path like '/download/123', an ftp: link, or a javascript: link).","commonSituations":"The feed provides only a relative download path without a base; the enclosure URL is malformed; the feed requires login and the download link is a session-bound relative URL; a non-standard link scheme is used.","solutions":["Inspect the failing item's enclosure/link element in the raw feed to see the exact URL.","If the URL is relative, the parser must resolve it against the feed BaseUrl - ensure UseEnclosureUrl/GetDownloadUrl produces an absolute URL.","If the scheme is unsupported (ftp), switch the feed to provide magnet/http links.","Use a Torznab endpoint via Jackett which normalizes download URLs.","Report the malformed feed to the indexer operator."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Pre-check download URL validity per release\nforeach (var r in releases)\n    if (!IsValidDownloadUrl(r.DownloadUrl))\n        logger.Warn(\"Release '{0}' has invalid download URL: {1}\", r.Title, r.DownloadUrl);","typeGuard":"// Type guard for absolute http(s)/magnet URLs\nstatic bool IsValidDownloadUrl(string url) =>\n    !string.IsNullOrWhiteSpace(url) &&\n    (url.StartsWith(\"magnet:\", StringComparison.OrdinalIgnoreCase) ||\n     url.StartsWith(\"http://\", StringComparison.OrdinalIgnoreCase) ||\n     url.StartsWith(\"https://\", StringComparison.OrdinalIgnoreCase));","tryCatchPattern":"try { ValidateReleases(releases, indexerSettings); }\ncatch (UnsupportedFeedException ex) when (ex.Message.Contains(\"download url\"))\n{ logger.Warn(\"Feed has releases with invalid download URLs; resolve relative URLs in the parser.\"); }","preventionTips":["Ensure the parser emits absolute magnet/http(s) URLs","Resolve relative download paths against the feed BaseUrl","Use Torznab via Jackett which normalizes URLs"],"tags":["torrent-rss","indexer","detection","download-url","csharp"],"backgroundTag":null,"analyzedSha":"ca451608dc60c6cec754aba8d96bfa30e9468ed5","analyzedAt":"2026-08-13T17:21:54.115Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}