-
Notifications
You must be signed in to change notification settings - Fork 132
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
Cant fetch thumbnails #206
Comments
Hey |
Hey @NowakJR. I'd also be interested for the monkey patch while we wait for a fix, thanks :) |
Hi guys here is how I did the monkey patch: In file where i am fetching thumbnail URL i added these lines of code in Base class
I know variables names are kinda bad but I left them like that for a while until i have time to change them. |
@NowakJR Thank you! I will test this |
Yeah, it works! Thanks! I created the file: config/initializers/video_info.rb with the following code:
|
Thanks for the patch @NowakJR. I found that it fails on certain videos so here's a cleaned up version which works with all the videos I've tested: VideoInfo::Providers::VimeoAPI.module_eval do
THUMBNAIL_LINK_REGEX = /.*\/(\d+\-[^_]+)/
def thumbnail_id
@thumbnail_id ||= _parse_picture_id(_video.dig("pictures", "sizes").first["link"])
end
private
def _parse_picture_id(uri)
uri.match(THUMBNAIL_LINK_REGEX)[1]
end
end |
Awesome man! This also looks much better. Thank you very much for contributing @asgerb |
Hi guys, thanks for the inputs! I couldnt find much time to work on it for the last weeks just released v3.0.2 🚀 |
Hey, so lately I've gotten into a problem with fetching thumbnails from vimeo, every single thumbnail in a project was vertical bars in colours of a rainbow. It turned out vimeo changed their url format, and didnt bother to tell anyone(thread: https://community.roku.com/t5/Roku-Developer-Program/Vimeo-Thumbnail-is-not-showing-in-any-channel/td-p/721844)
So to get to the real thumbnails which are here, under pictures/sizes/link I had to monkeypatch this gem.
"pictures": {
"uri": "/videos/604925161/pictures/1241392221",
"active": true,
"type": "custom",
"sizes": [
{
"width": 100,
"height": 75,
"link": "https://i.vimeocdn.com/video/1241392221-cd13a462737b76c8d54c15bf8d38b15575bc04d18031d4653c97d0b2c8eb6db3-d_100x75?r=pad",
Are you planning on fixing this issue?
Cheers.
The text was updated successfully, but these errors were encountered: