mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
Not sending Download.info_json to frontend.
This commit is contained in:
parent
86893ef7f1
commit
b5d5515174
1 changed files with 12 additions and 0 deletions
|
|
@ -61,6 +61,18 @@ class Download(ModelHelper, Base):
|
|||
f'next_download={self.next_download} frequency={self.frequency} attempts={self.attempts}>'
|
||||
return f'<Download id={self.id} status={self.status} url={repr(self.url)} attempts={self.attempts}>'
|
||||
|
||||
def __json__(self):
|
||||
d = dict(
|
||||
downloader=self.downloader,
|
||||
frequency=self.frequency,
|
||||
id=self.id,
|
||||
last_successful_download=self.last_successful_download,
|
||||
next_download=self.next_download,
|
||||
status=self.status,
|
||||
url=self.url,
|
||||
)
|
||||
return d
|
||||
|
||||
def increment_next_download(self):
|
||||
if self.frequency:
|
||||
delta = timedelta(seconds=self.frequency)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue