Fix removed is_pinned flag on content.json update

This commit is contained in:
shortcutme 2017-10-05 19:24:39 +02:00
parent 59a04f101d
commit 07caaa6b48
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
2 changed files with 4 additions and 4 deletions

View file

@ -179,8 +179,7 @@ class ContentDbPlugin(object):
is_pinned = 0
cur.insertOrUpdate("file_optional", {
"hash_id": hash_id,
"size": int(file["size"]),
"is_pinned": is_pinned
"size": int(file["size"])
}, {
"site_id": site_id,
"inner_path": file_inner_path
@ -188,7 +187,8 @@ class ContentDbPlugin(object):
"time_added": int(time.time()),
"time_downloaded": int(time.time()) if is_downloaded else 0,
"is_downloaded": is_downloaded,
"peer": is_downloaded
"peer": is_downloaded,
"is_pinned": is_pinned
})
self.optional_files[site_id][file_inner_path[-8:]] = 1
num += 1

View file

@ -10,7 +10,7 @@ class Config(object):
def __init__(self, argv):
self.version = "0.6.0"
self.rev = 3094
self.rev = 3095
self.argv = argv
self.action = None
self.config_file = "zeronet.conf"