Index: favicon.py ================================================================== --- favicon.py +++ favicon.py @@ -41,11 +41,11 @@ # walk through entries -def download_all(entries): +def download_all(entries, treestore=None, pix_i=None): t = Thread(target= download_thread, args= ([entries])) t.start() def download_thread(entries): for e in entries: # try just once @@ -61,11 +61,11 @@ # remember tried_urls.append(e.get("homepage")) pass # download a single favicon for currently playing station -def download_playing(row): +def download_playing(row, treestore_pix=None): if conf.google_homepage and not row.get("homepage"): google_find_homepage(row) if conf.load_favicon and row.get("homepage"): download_all([row]) pass @@ -210,11 +210,11 @@ headers = r.info() # abort on if r.getcode() >= 300: raise Error("HTTP error" + r.getcode()) - if not headers["Content-Type"].lower().find("image/"): + if not headers["Content-Type"].lower().find("image/") == 0: raise Error("can't use text/* content") # save file fn_tmp = fn+".tmp" f = open(fn_tmp, "wb") @@ -260,10 +260,11 @@ +#@obsolete since Pillow 2.1.x # # title: workaround for PIL.Image to preserve the transparency for .ico import # # http://stackoverflow.com/questions/987916/how-to-determine-the-transparent-color-index-of-ico-image-with-pil