add a 'clear cache' button in the settings
[mevemon] / package / src / fetchimg.py
index 6f78188..4480c58 100644 (file)
@@ -1,11 +1,13 @@
 import urllib
 import os.path
 
+from constants import CONFIG_DIR
+
 def portrait_filename( char_id, img_size ):
 
     err_img = "/usr/share/mevemon/imgs/error.jpg"
    
-    img_dir = os.path.expanduser("~/.mevemon/imgs/")
+    img_dir = os.path.join(CONFIG_DIR, "imgs/")
 
 
     # if asked for the large version, save it under a diff name --danny
@@ -23,7 +25,7 @@ def portrait_filename( char_id, img_size ):
         return filename
 
     # specify size and cid --danny
-    img_url = "http://img.eve.is/serv.asp?s=%s&c=%s" % ( str( img_size ), char_id )
+    img_url = "http://image.eveonline.com/Character/%s_%s.jpg" % ( str( char_id ), img_size )
 
     # fetch it, and hit the road. --danny
     try: