More fixes.

This commit is contained in:
ArabCoders 2023-11-27 15:43:44 +03:00
parent 7d31df4cd4
commit 8902c124db
4 changed files with 5 additions and 5 deletions

View file

@ -22,7 +22,7 @@ class ItemDTO:
output_template: str = None
timestamp: float = time.time_ns()
is_live: bool = None
datetime: str = formatdate(time.time())
datetime: str = field(default_factory=lambda: str(formatdate(time.time())))
# yt-dlp injected fields.
tmpfilename: str = None

View file

@ -92,7 +92,7 @@ class DataStore:
VALUES (?, ?, ?, ?)
ON CONFLICT DO UPDATE SET "type" = ?, "url" = ?, "data" = ?
"""
item.datetime = None
delattr(item, 'datetime')
with sqlite3.connect(self.db_file) as db:
db.execute(sqlStatement.strip(), (
item._id,

View file

@ -105,11 +105,11 @@ class DownloadQueue:
ytdlp_config=ytdlp_config,
output_template=output_template if output_template else self.config.output_template,
error=error,
datetime=formatdate(datetime.now(
timezone.utc).timetuple()),
is_live=entry['is_live'] if 'is_live' in entry else None,
)
logging.info(f'adding {dl.json()}')
try:
dldirectory = calcDownloadPath(
basePath=self.config.download_path,

View file

@ -3179,7 +3179,7 @@
.button.is-static {
background-color: #ecf0f1;
border-color: #5e6d6f;
color: #fff;
color: #5c2c2c;
box-shadow: none;
pointer-events: none
}