mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +00:00
Use stored last_update for conditional get.
This commit is contained in:
parent
8e69a82881
commit
85c32f0403
1 changed files with 2 additions and 4 deletions
|
@ -179,10 +179,8 @@ class Core(CorePluginBase):
|
||||||
if not url:
|
if not url:
|
||||||
url = self.config["url"]
|
url = self.config["url"]
|
||||||
|
|
||||||
blocklist = deluge.configmanager.get_config_dir("blocklist.cache")
|
if self.config["last_update"] and not self.force_download:
|
||||||
if os.path.exists(blocklist) and not self.force_download:
|
headers['If-Modified-Since'] = self.config["last_update"]
|
||||||
last_modified = datetime.datetime.utcfromtimestamp(os.path.getmtime(blocklist))
|
|
||||||
headers['If-Modified-Since'] = last_modified.strftime("%a, %d %b %Y %H:%M:%S GMT")
|
|
||||||
|
|
||||||
log.debug("Attempting to download blocklist %s", url)
|
log.debug("Attempting to download blocklist %s", url)
|
||||||
self.is_downloading = True
|
self.is_downloading = True
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue