mirror of
https://github.com/Radarr/Radarr.git
synced 2026-03-02 22:57:34 -05:00
Generate and Store titleSlug in the Database #9264
Labels
No labels
Area: API
Area: Database
Area: Db-migration
Area: Download Clients
Area: Extras
Area: Import Lists
Area: Indexer
Area: Metadata API
Area: Notifications
Area: Organizer
Area: Parser
Area: Scanning
Area: Tooling
Area: UI
Area: Unit Tests
On Hold: MetadataAPI Blocking
On Hold: MetadataAPI Blocking
Priority: High
Priority: Low
Priority: Medium
Status: Accepted
Status: Cannot Reproduce
Status: Confirmed
Status: Help Wanted
Status: In Progress
Status: Indexer - need invite
Status: Info Needed
Status: Investigating
Status: Logs Needed
Status: Maybe One Day
Status: Needs Triage
Status: On Hold
Status: Ready for Review
Status: Unlikely
Status: Waiting for OP
Status: Won't Fix
Type: Bug
Type: Documentation
Type: Duplicate
Type: Enhancement
Type: External Bug
Type: Feature Request
Type: Regression
Type: Support
Type: Support.
conflict
lidarr-pull
no-conflict
not-pulled
readarr-pull
readarr-pull
sonarr upstream
sonarr-pull
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Radarr#9264
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mbrownnycnyc on GitHub (Sep 2, 2025).
Is there an existing issue for this?
Is your feature request related to a problem? Please describe
Description
When adding a movie via the API, Radarr does not consistently generate or return a
titleSlugin the response. ThetitleSlugis a crucial piece of information for third-party applications like Overseerr, which rely on it to create predictable and readable URLs for movies.Currently, the
titleSlugis not stored in the database alongside other movie metadata. This proposal outlines the steps to correctly generate and store thetitleSlugin the database, ensuring it is the single source of truth.Proposed Solution
To resolve this issue, Radarr should be updated to always generate and store a
titleSlugwhen a movie is added or updated. The slug should be generated using the existingParser.ToUrlSlugmethod.Benefits
titleSlugwill be stored in the database, making it the single source of truth and readily available to any part of the application.titleSlugwill be a reliable and consistent part of the API, making it easier for developers to build robust integrations.titleSlugto create clean and predictable URLs, improving the user experience.Describe the solution you'd like
Proposed Code Changes
File:
src/NzbDrone.Core/Movies/Movie.csAdd the
TitleSlugproperty to theMovieclass to store the slug in the database.File:
src/NzbDrone.Core/Movies/MovieService.csUpdate the
AddMovie,AddMovies,UpdateMovie, andUpdateMoviesmethods to generate thetitleSlugbefore saving the movie to the database.Add the following
usingstatement at the top of the file:In the
AddMoviemethod, add the following line before_movieRepository.Insert(newMovie);:In the
AddMoviesmethod, add the following lines before_movieRepository.InsertMany(newMovies);:In the
UpdateMoviemethod, add the following line before_movieRepository.Update(movie);:In the
UpdateMovie(bulk) method, add the following line inside theforeachloop:File:
src/Radarr.Api.V3/Movies/MovieResource.csIn the
ToResourceextension method, modify the line that sets theTitleSlugproperty to use the new property from theMoviemodel.Current Code:
Proposed Change:
Describe alternatives you've considered
None.
Anything else?
None. I will likely use some LLM magic to solve and submit a PR against this issue.
@bakerboy448 commented on GitHub (Sep 2, 2025):
given tmdb is the metadata source of truth a tmdb id would always exist
changing the slug is not the correct solution here - https://xyproblem.info/
@mbrownnycnyc commented on GitHub (Sep 2, 2025):
@bakerboy448 Given my specific use case, an overseerr MCP, as per the method of exposing the title in the titleSlug that sonarr does include, the new method described above is a proposed solution. I'll open a new issue with this, and if you wish to discuss further on that issue, I'd appreciate any further input.
The context of why I'm asking for this as a feature is important... I do NOT want my client facing front end's front end to rely on anything outside of what overseerr knows, and overseerr is provided this information via it's integration with sonarr and radarr.
Thank you!
@bakerboy448 commented on GitHub (Sep 2, 2025):
No plans to change the titleSlug
overseerr has it's own metadata source from tmdb.
this seems to be an overseerr FR / problem to solve not a radarr one
radarr uses the tmdbid for the slug; sonarr uses a title based slug
predictable urls are already possible
@mbrownnycnyc commented on GitHub (Sep 2, 2025):
@bakerboy448 got it, thank you for the feedback.
@mbrownnycnyc commented on GitHub (Sep 2, 2025):
For point of reference: https://github.com/sct/overseerr/issues/4234