From c061d2681b9885602d5dea0ba9b00cb0dba69a0c Mon Sep 17 00:00:00 2001 From: JakeBreath Date: Thu, 17 Sep 2026 19:28:19 -0500 Subject: [PATCH] Fix Download to Library crashing with a NameError MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit run_download_task sets e621_match_status from MediaItem, but the module only imported DownloadTask — every download that carried e621 metadata failed right after indexing, leaving the file in the library unlinked. Verified the runner end-to-end with a stubbed fetch. --- backend/apps/library/downloads.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/apps/library/downloads.py b/backend/apps/library/downloads.py index 3c9752d..e9a93a7 100644 --- a/backend/apps/library/downloads.py +++ b/backend/apps/library/downloads.py @@ -12,7 +12,7 @@ from django.db import connection from django.utils import timezone from . import services -from .models import DownloadTask +from .models import DownloadTask, MediaItem logger = logging.getLogger(__name__)