Commit edd97ed8 authored by Cédric Bellegarde's avatar Cédric Bellegarde

Fix an issue where Eolie was unable to cache favicon

parent 645cf5f6
Pipeline #83001 failed with stage
in 22 minutes and 23 seconds
......@@ -80,8 +80,6 @@ def get_favicon_best_uri(favicons_path, uri):
favicon_uri = None
try:
parsed = urlparse(uri)
if parsed.path == "/":
return None
for uri in [parsed.netloc + parsed.path, parsed.netloc]:
sql = sqlite3.connect(favicons_path, 600.0)
result = sql.execute("SELECT url\
......
......@@ -119,7 +119,6 @@ class WebViewArtwork:
@param uri as str
@param initial_uri as str
"""
resized = None
# Save webview favicon
if surface is not None:
if surface.get_width() >= ArtSize.FAVICON:
......@@ -130,12 +129,10 @@ class WebViewArtwork:
exists = App().art.exists(uri, favicon_type)
if not exists:
resized = resize_favicon(surface)
# We wait for a better favicon
if resized is not None:
self.__save_favicon_to_cache(resized,
uri,
initial_uri,
favicon_type)
self.__save_favicon_to_cache(resized,
uri,
initial_uri,
favicon_type)
def __save_favicon_to_cache(self, surface, uri, initial_uri, favicon_type):
"""
......
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