From a9a3cc4337066479b8b1fbad1ec9fc3038edb4fd Mon Sep 17 00:00:00 2001 From: Philipp Zabel Date: Fri, 20 Nov 2009 14:11:13 +0100 Subject: [PATCH] Google poster downloader: tweak search URI to subjectively improve results There are still a lot of false positives and sometimes just plain wrong results where Google Search returns a lot of correct posters, only the first one (which we take) is wrong. --- src/poster/google-poster-downloader.vala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/poster/google-poster-downloader.vala b/src/poster/google-poster-downloader.vala index 29f52ad..129fb98 100644 --- a/src/poster/google-poster-downloader.vala +++ b/src/poster/google-poster-downloader.vala @@ -26,7 +26,7 @@ public class GoogleImageSearch : Soup.Message { public GoogleImageSearch (string search, bool _thumbnail = false) { Object (method: "GET"); - uri = new URI ("http://images.google.com/images?imgsz=m&q=" + Uri.escape_string (search, "+", false)); + uri = new URI ("http://images.google.com/images?imgsz=m&imgar=t&q=" + Uri.escape_string (search, "+", false)); thumbnail = _thumbnail; got_chunk.connect (this.on_got_chunk); } @@ -74,7 +74,7 @@ public class GooglePosterDownload : Object { private bool cancelled = false; public GooglePosterDownload (string title, string year, bool thumbnail, int _handle, GooglePosterDownloader _downloader) { - var search = title + " movie poster " + year; + var search = title + "+" + year + "+movie+poster"; handle = _handle; downloader = _downloader; -- 1.7.9.5