mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-15 23:42:37 +03:00
Pass default date to KnownApks.recordapk()
... if --use-date-from-apks option is used
This commit is contained in:
parent
063d581b71
commit
b7f28fa576
2 changed files with 11 additions and 8 deletions
|
@ -1570,9 +1570,11 @@ class KnownApks:
|
|||
|
||||
# Record an apk (if it's new, otherwise does nothing)
|
||||
# Returns the date it was added.
|
||||
def recordapk(self, apk, app):
|
||||
def recordapk(self, apk, app, default_date=None):
|
||||
if apk not in self.apks:
|
||||
self.apks[apk] = (app, time.gmtime(time.time()))
|
||||
if default_date is None:
|
||||
default_date = time.gmtime(time.time())
|
||||
self.apks[apk] = (app, default_date)
|
||||
self.changed = True
|
||||
_, added = self.apks[apk]
|
||||
return added
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue