diff --git a/src/ytdl_sub/ytdl_additions/enhanced_download_archive.py b/src/ytdl_sub/ytdl_additions/enhanced_download_archive.py index 8177e0e4..50b12f42 100644 --- a/src/ytdl_sub/ytdl_additions/enhanced_download_archive.py +++ b/src/ytdl_sub/ytdl_additions/enhanced_download_archive.py @@ -680,11 +680,11 @@ class EnhancedDownloadArchive: # Set mtime if preserve_mtime is enabled and we have an entry with upload_date if preserve_mtime and entry and not self._file_handler.dry_run: - upload_date = entry.get(v.upload_date, str) + upload_date = entry.get(v.ytdl_sub_keep_files_date_eval, str) if upload_date: try: - # Convert YYYYMMDD to timestamp - upload_datetime = datetime.strptime(upload_date, "%Y%m%d") + # Convert YYYY-mm-dd to timestamp + upload_datetime = datetime.strptime(upload_date, "%Y-%m-%d") upload_timestamp = time.mktime(upload_datetime.timetuple()) # Set mtime on the output file