mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-27 11:45:44 +00:00
allow favicon.png
This commit is contained in:
parent
0b09c6563c
commit
0f94cf2316
@ -38,7 +38,7 @@ import pkg_resources
|
|||||||
|
|
||||||
import deluge.component as component
|
import deluge.component as component
|
||||||
import deluge.common
|
import deluge.common
|
||||||
from deluge.tracker_icons import TrackerIcons
|
from deluge.ui.tracker_icons import TrackerIcons
|
||||||
from deluge.log import LOG as log
|
from deluge.log import LOG as log
|
||||||
from deluge.ui.client import aclient
|
from deluge.ui.client import aclient
|
||||||
from deluge.configmanager import ConfigManager
|
from deluge.configmanager import ConfigManager
|
||||||
|
@ -51,7 +51,7 @@ import os
|
|||||||
from deluge import component
|
from deluge import component
|
||||||
from deluge.ui.client import sclient as proxy
|
from deluge.ui.client import sclient as proxy
|
||||||
from deluge.configmanager import ConfigManager
|
from deluge.configmanager import ConfigManager
|
||||||
from deluge.tracker_icons import TrackerIcons
|
from deluge.ui.tracker_icons import TrackerIcons
|
||||||
|
|
||||||
page_manager = component.get("PageManager")
|
page_manager = component.get("PageManager")
|
||||||
config = ConfigManager("webui06.conf")
|
config = ConfigManager("webui06.conf")
|
||||||
@ -456,7 +456,10 @@ class tracker_icon:
|
|||||||
if filename:
|
if filename:
|
||||||
log.debug("file-name=%s" % name)
|
log.debug("file-name=%s" % name)
|
||||||
web.header("Cache-Control" , "public, must-revalidate, max-age=86400")
|
web.header("Cache-Control" , "public, must-revalidate, max-age=86400")
|
||||||
web.header("Content-Type", "image/x-icon")
|
if filename.endswith(".ico"):
|
||||||
|
web.header("Content-Type", "image/x-icon")
|
||||||
|
elif filename.endswith(".png"):
|
||||||
|
web.header("Content-Type", "image/png")
|
||||||
data = open(filename, "rb").read()
|
data = open(filename, "rb").read()
|
||||||
print data
|
print data
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user