aboutsummaryrefslogtreecommitdiff
path: root/sources/wiki
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2013-01-09 21:39:39 +0100
committerJochen Topf <jochen@topf.org>2013-01-09 21:39:39 +0100
commit3e12a769fd3c23532722409ab13d5d9ba251945b (patch)
treea26285171cf68ef966eec7b15b1e8e9f78e8667b /sources/wiki
parenta3c931bdda7e6aba7521631d7b8132170ed69513 (diff)
downloadtaginfo-3e12a769fd3c23532722409ab13d5d9ba251945b.tar
taginfo-3e12a769fd3c23532722409ab13d5d9ba251945b.tar.gz
Improve thumbnail format detection
Diffstat (limited to 'sources/wiki')
-rwxr-xr-xsources/wiki/get_image_info.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/sources/wiki/get_image_info.rb b/sources/wiki/get_image_info.rb
index 06707ca..a6756e1 100755
--- a/sources/wiki/get_image_info.rb
+++ b/sources/wiki/get_image_info.rb
@@ -63,7 +63,7 @@ until image_titles.empty?
# puts some_titles.join(",") + "\n"
begin
- data = api.query(:prop => 'imageinfo', :iiprop => 'url|size|mime', :titles => some_titles.join('|'), :iiurlwidth => 200, :iiurlheight => 200)
+ data = api.query(:prop => 'imageinfo', :iiprop => 'url|size|mime', :titles => some_titles.join('|'), :iiurlwidth => 10, :iiurlheight => 10)
if !data['query']
STDERR.puts "Wiki API call failed (no 'query' field):"
@@ -93,6 +93,7 @@ until image_titles.empty?
else
prefix = nil
suffix = nil
+ puts "Wrong thumbnail format: '#{info['thumburl']}'"
end
db.execute("INSERT INTO wiki_images (image, width, height, size, mime, image_url, thumb_url_prefix, thumb_url_suffix) VALUES (?, ?, ?, ?, ?, ?, ?, ?)",
v['title'],