Channels now have Channel.channel_downloads. A Channel can have many Downloads.

This commit is contained in:
Roland 2024-06-25 22:12:13 -06:00
parent 91d4d0d15b
commit 50d95dad19
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
43 changed files with 1401 additions and 658 deletions

View file

@ -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),
)