Commit b845f12c authored by zh99998's avatar zh99998

版本0.5.0 ygocore头像,稳定

parent 3349bd95
......@@ -27,7 +27,7 @@ class User
yield result
Thread.new do
open("http://www.duelcn.com/uc_server/avatar.php?uid=#{id-100000}&size=#{size}", 'rb') {|io|open(cache, 'wb') {|c|c.write io.read}} rescue cache = "graphics/avatars/noavatar_#{size}.gif"
yield Surface.load(cache) if scene == $scene
(yield Surface.load(cache) if scene == $scene) rescue nil
end
else
result
......
......@@ -20,7 +20,7 @@ module Update
end
f.extract{true}
end
end
end rescue $log.error('安装更新出错'){file+$!.inspect+$!.backtrace.inspect}
Version.replace $2
File.delete file
@updated = true
......
......@@ -28,7 +28,7 @@ class User
Thread.new do
require 'cgi'
open("http://card.touhou.cc/users/#{CGI.escape @id.to_s}.png", 'rb') {|io|open(cache, 'wb') {|c|c.write io.read}} rescue cache = "graphics/avatars/noavatar_#{size}.gif"
yield Surface.load(cache) if scene == $scene
(yield Surface.load(cache) if scene == $scene) rescue nil
end
else
result
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment