-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
add a refresh param to /api/v1/videos/:id #4441
base: master
Are you sure you want to change the base?
Conversation
I don't see how this is possible. The default arg value for |
I have removed my comment, I thought it was the reverse, asking to always refresh but I guess that's already the case? I thought invidious would refresh only if the cache for the video is older than 10 minutes or something: https://github.com/iv-org/invidious/blob/master/src/invidious/videos.cr#L366 |
@unixfox I'm looking again at invidious/src/invidious/videos.cr Line 361 in e8a3698
get_video function not use the region parameter at all? It looks to me that if the region is provided, it is guaranteed to not return any db hit, and instead do a fetch always. On top of that, if the region is specified, the fetched video is not added to the DB. I don't see the fetch_video function use the region in any meaningful way.
|
This is now tested and works well iBicha/playlet#300 |
This pull request has been automatically marked as stale and will be closed in 30 days because it has not had recent activity and is much likely abandoned or outdated. If you think this pull request is still relevant and applicable, you just have to post a comment and it will be unmarked. |
Unstale |
I found myself needing to fetch video info without caring about the freshness of the details.
Use cases are many, but includes casting from YouTube app (Lounge) iBicha/playlet#276
When user adds a video to the queue, only the video id(s) are sent, so we'd need to make a request to be able to display the video queue.
It would be nice to have an API endpoint (perhaps in v2) where the caller can indicate the details and/or accuracy is not needed, so in that case, older cached videos in the DB are fine, and also, there would be no need to hit the
next
endpoint. So fetching would need a single request when callingfetch_video
But until then, I thought adding a
refresh
arg to to the endpoint would be already an improvement and should save processing time and bandwidth.PS:
I haven't tested this (yet)yes I did