Repository navigation
Redirect /medialist/<media_type> to the user's own media list - #1804
Open
julienbeugras wants to merge 1 commit into
Open
julienbeugras wants to merge 1 commit into
julienbeugras wants to merge 1 commit into
Conversation
Since FuzzyGrim#1251 media lists live at /<username>/<media_type>, but the PWA shortcuts in site.webmanifest still point to /medialist/<media_type> and open a 404 (FuzzyGrim#1460). Older bookmarks break the same way. /medialist/<media_type> now redirects the logged-in user to their own list, keeping the query string, and sends anonymous visitors to login first. A user actually named "medialist" keeps their list at that URL. A test opens every shortcut in the manifest, so a shortcut that stops resolving fails the suite. Closes FuzzyGrim#1460
This branch has not been deployed
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.
Closes #1460
Since #1251 media lists live at
/<username>/<media_type>, but the PWA shortcuts instatic/favicon/site.webmanifeststill point to/medialist/<media_type>, so every media shortcut opens a 404. Bookmarks from before #1251 break the same way.Changes
medialist/<media_type>(own_medialist), placed before<username>/<media_type>, handled byviews.own_media_list:/<their username>/<media_type>, with the query string kept (?status=Completedfrom an old bookmark still applies);next=/medialist/<media_type>, then lands on their own list;medialist, the view serves their list as before, so the new route takes nothing away from an existing account.Tests
OwnMediaListRedirectTests: the redirect for every media type, query string kept, anonymous user sent to login, a user namedmedialistkeeps their list, and every shortcut URL insite.webmanifestopens with a 200 when followed, so a shortcut that stops resolving fails the suite. All but themedialist-user case fail againstdev.app(excluding live provider tests),users,listsandeventspass, as doruff check src,ruff format --check srcand the pre-commit hooks. I couldn't complete the integrations suite locally: the Goodreads import test was rate-limited by the live API (asked to wait ~4 hours), which is unrelated to this change. Also checked on a local instance that an anonymous request to/medialist/tvis sent to login withnext=/medialist/tv.