mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-04 09:59:41 +02:00
add basic download log json structure
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
from core.utils.data.models import Download, DownloadList
|
||||
import json
|
||||
|
||||
|
||||
|
||||
|
||||
def add_download_log(title, url, magnet_uri, completed) -> DownloadList:
|
||||
downloads: list[Download] = []
|
||||
downloads.append(Download(
|
||||
title=title,
|
||||
url=url,
|
||||
magnet_uri=magnet_uri,
|
||||
completed=completed
|
||||
))
|
||||
|
||||
return DownloadList(data=downloads, count=len(downloads))
|
||||
Reference in New Issue
Block a user