Backend: - TempUpload model: staged files (pending / visual_match / completed / error) with resolution, e621 payload, custom metadata and IQDB data - Files land in a temp folder and only move into the watched library folder once resolved; duplicates resolve immediately without a copy - Endpoints: stage (multipart), list, retrieve, temp file, IQDB save, resolve (link to post or custom metadata), discard/dismiss - cleanup_temp_uploads command for old staged files - Replaces the old direct-to-library upload endpoint Frontend: - Upload page is now a three-column board (Pending & Unmatched / Visual Similarity Detected / Auto-uploaded & Indexed) - After upload: MD5s are batch-checked against e621 and matches auto-complete with full post metadata; remaining files run through IQDB and move to the similarity column when candidates exist - Metadata modal with IQDB candidates, post-ID linking and custom tags/rating/notes; discard and dismiss actions - e621 client gains fetchPostsByMd5 and iqdbSearch helpers Roadmap updated with the completed upload items.
19 lines
515 B
Python
19 lines
515 B
Python
from django.urls import include, path
|
|
from rest_framework.routers import DefaultRouter
|
|
|
|
from .uploads import TempUploadViewSet
|
|
from .views import DownloadToLibraryView, MediaItemViewSet
|
|
|
|
router = DefaultRouter()
|
|
router.register("files", MediaItemViewSet, basename="file")
|
|
router.register("uploads", TempUploadViewSet, basename="upload")
|
|
|
|
urlpatterns = [
|
|
path("", include(router.urls)),
|
|
path(
|
|
"online/downloads/",
|
|
DownloadToLibraryView.as_view(),
|
|
name="download_to_library",
|
|
),
|
|
]
|