diff options
author | Jochen Topf <jochen@topf.org> | 2013-01-09 21:39:39 +0100 |
---|---|---|
committer | Jochen Topf <jochen@topf.org> | 2013-01-09 21:39:39 +0100 |
commit | 3e12a769fd3c23532722409ab13d5d9ba251945b (patch) | |
tree | a26285171cf68ef966eec7b15b1e8e9f78e8667b /sources/wiki | |
parent | a3c931bdda7e6aba7521631d7b8132170ed69513 (diff) | |
download | taginfo-3e12a769fd3c23532722409ab13d5d9ba251945b.tar taginfo-3e12a769fd3c23532722409ab13d5d9ba251945b.tar.gz |
Improve thumbnail format detection
Diffstat (limited to 'sources/wiki')
-rwxr-xr-x | sources/wiki/get_image_info.rb | 3 |
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'], |