Add the original info URL to the release object stored for Newznab/Torznab search results#12207
Open
juandjara wants to merge 1 commit into
Open
Add the original info URL to the release object stored for Newznab/Torznab search results#12207juandjara wants to merge 1 commit into
juandjara wants to merge 1 commit into
Conversation
…wznab/Torznab search results and expose this in the providers API You can get this information from the XML of Newznab and Torznab responses, using the <comments> element. This is useful to inspect the details of the release you are grabbing when doing manual episode searches.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi team! I wanted to contribute this feature I have created while working on my alternative React-based client for Medusa.
Motivation
When picking between candidates in a manual search, users often want to open a release on the indexer's site to check the file list or see bundled subtitles. Today Medusa exposes only the download URL on cached results, so a frontend can let you snatch a release but not preview it.
This information is already available to use: Newznab and Torznab XML responses include a
<comments>element pointing to the release's info page.I considered recovering the URL on the frontend by rewriting the download URL or querying the configured Prowlarr server at
/api/v1/searchbut the solution would be sub-optimal and end up as a half-assed fix rather than a good feature. Plumbing<comments>through the API to the DB is the smallest change with the broadest reach: every Newznab/Torznab provider gets a real per-release info link with no extra requests.Changes
A new
info_urlfollows the same pathurldoes today:SearchResult(medusa/classes.py) gains aninfo_urlattribute, populated from the parser on live results and from the cache row on reload.GenericProvider._get_info_urlreadsitem['info_url']by default — any provider whoseparse()adds that key gets piped through automatically.<comments>into the item dict.medusa/tv/cache.py) gains aninfo_url TEXTcolumn. New installs get it fromCREATE TABLE; existing tables pick it up via the same auto-add-column loopalready handling
release_group,proper_tags, etc. — no DB migration version bump. INSERT/UPDATE persist it alongsideurl./api/v2/providers/<id>/resultsexposes the field asinfoUrl, returningnullfor rows written before the column existed so consumers fall back gracefully.Test plan
info_url; the Prowlarr-fronted case points to the upstream tracker domain, not the Prowlarr host.infoUrl: nullwithout errors.No existing issue tracking this but happy to file one if the maintainers would prefer a reference