add high res thumbnail
This commit is contained in:
		@@ -381,6 +381,8 @@ class MainHandler(tornado.web.RequestHandler):
 | 
				
			|||||||
        meta = await handler.meta()
 | 
					        meta = await handler.meta()
 | 
				
			||||||
        image = meta.get("og:image")
 | 
					        image = meta.get("og:image")
 | 
				
			||||||
        if isinstance(image, str):
 | 
					        if isinstance(image, str):
 | 
				
			||||||
 | 
					            if handler.provider == "youtube":
 | 
				
			||||||
 | 
					                image = image.removesuffix("hqdefault.jpg") + "maxresdefault.jpg"
 | 
				
			||||||
            url = await handler.proxy.proxy_url(image, None)
 | 
					            url = await handler.proxy.proxy_url(image, None)
 | 
				
			||||||
            if isinstance(url, str):
 | 
					            if isinstance(url, str):
 | 
				
			||||||
                self.redirect(url, status=303)
 | 
					                self.redirect(url, status=303)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -18,6 +18,11 @@
 | 
				
			|||||||
        return url.href;
 | 
					        return url.href;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    const getProvider = () => {
 | 
				
			||||||
 | 
					        const search = new URLSearchParams(location.search);
 | 
				
			||||||
 | 
					        return search.get("provider");
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const upstream = findUpstreamVideo();
 | 
					    const upstream = findUpstreamVideo();
 | 
				
			||||||
    const xhr = new XMLHttpRequest();
 | 
					    const xhr = new XMLHttpRequest();
 | 
				
			||||||
    xhr.open("HEAD", upstream, true);
 | 
					    xhr.open("HEAD", upstream, true);
 | 
				
			||||||
@@ -47,7 +52,9 @@
 | 
				
			|||||||
        options.plugins.chromecast = {};
 | 
					        options.plugins.chromecast = {};
 | 
				
			||||||
        options.plugins.chromecast.addButtonToControlBar = false;
 | 
					        options.plugins.chromecast.addButtonToControlBar = false;
 | 
				
			||||||
        const player = videojs(video, options);
 | 
					        const player = videojs(video, options);
 | 
				
			||||||
        player.poster(findUpstreamPoster());
 | 
					        if(getProvider() !== "nextcloud") {
 | 
				
			||||||
 | 
					            player.poster(findUpstreamPoster());
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        const source = {};
 | 
					        const source = {};
 | 
				
			||||||
        source.type = ctype;
 | 
					        source.type = ctype;
 | 
				
			||||||
        source.src = upstream;
 | 
					        source.src = upstream;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user