Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support JSON-encoded X-TITLE header from thumbnail cache #100

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mini-bomba
Copy link

@mini-bomba mini-bomba commented Jul 13, 2023

  • I agree to license my contribution under LGPL-3.0 or my contribution is from another project with a license compatible with LGPL-3.0

To test this pull request, follow the instructions in the wiki.


This PR allows the X-Title header received from thumbnail cache to be JSON-encoded as a way to transmit unicode characters.
This doesn't replace the raw ASCII format (yet), only decodes the header as JSON if it starts & ends with a ", then checks if a string was decoded (so we don't accidentally end up decoding an object or something like that)

This is the client-side part for solving ajayyy/DeArrowThumbnailCache#3. Server-side part is in ajayyy/DeArrowThumbnailCache#9.

@ajayyy
Copy link
Owner

ajayyy commented Jul 13, 2023

The invidious userscript uses the old behavior already. Maybe we should version it (change /api/v1 to /api/v{version}, pass that number to function)

@mini-bomba
Copy link
Author

Good point, I forgot about the whole versioned api thing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants