mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-03 21:29:59 -05:00
Channels now have Channel.channel_downloads. A Channel can have many Downloads.
This commit is contained in:
parent
91d4d0d15b
commit
50d95dad19
43 changed files with 1401 additions and 658 deletions
|
|
@ -17,12 +17,12 @@ class MapFile(Base, ModelHelper):
|
|||
def __repr__(self):
|
||||
return f'<MapFile {self.path} imported={self.imported}>'
|
||||
|
||||
def __json__(self):
|
||||
return {
|
||||
'id': self.id,
|
||||
'imported': self.imported,
|
||||
'path': self.path,
|
||||
'seconds_to_import': (seconds := lib.seconds_to_import(self.size)),
|
||||
'size': self.size,
|
||||
'time_to_import': dates.seconds_to_timestamp(seconds),
|
||||
}
|
||||
def __json__(self) -> dict:
|
||||
return dict(
|
||||
id=self.id,
|
||||
imported=self.imported,
|
||||
path=self.path,
|
||||
seconds_to_import=(seconds := lib.seconds_to_import(self.size)),
|
||||
size=self.size,
|
||||
time_to_import=dates.seconds_to_timestamp(seconds),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue