Some cleaning up

This commit is contained in:
MoonGoblin
2025-04-04 08:34:33 +07:00
parent 5538777351
commit f57cb413ee
7 changed files with 397 additions and 487 deletions
+1 -2
View File
@@ -1,7 +1,6 @@
# ================================================
# File: config.py
# ================================================
# Civicomfy/config.py
import os
import folder_paths # Use ComfyUI's folder_paths
@@ -65,7 +64,7 @@ CIVITAI_API_TYPE_MAP = {
"motionmodule": "MotionModule",
"poses": "Poses",
"wildcards": "Wildcards",
# "upscaler": None, # Upscalers aren't typically a primary search type on Civitai
"upscaler": "Upscaler",
# "other": None,
}
File diff suppressed because it is too large Load Diff
-1
View File
@@ -1,7 +1,6 @@
# ================================================
# File: downloader/manager.py
# ================================================
# Civicomfy/downloader/manager.py
import threading
import time
import datetime
+1 -4
View File
@@ -1,7 +1,4 @@
# ================================================
# File: server/routes.py
# ================================================
# ================================================
# File: server/routes.py (Updated)
# This file needs to pass more info (model_info, version_info, primary_file)
# to the DownloadManager.
@@ -9,7 +6,7 @@
import server # ComfyUI server instance
import os
import traceback
import urllib.parse # Needed for thumbnail processing
import urllib.parse
import re
from aiohttp import web
+2 -3
View File
@@ -1,12 +1,11 @@
# ================================================
# File: utils/helpers.py
# ================================================
# Civicomfy/utils/helpers.py
import os
import urllib.parse
import re # Import re for sanitization
import re
from pathlib import Path
import folder_paths # Use ComfyUI's folder_paths
import folder_paths
# Import config values needed here
from ..config import MODELS_DIR, MODEL_TYPE_DIRS
-3
View File
@@ -1,6 +1,3 @@
/* ComfyUI_Civitai_Downloader/web/css/civitaiDownloader.css */
/* Paste the complete CSS content below */
.civitai-downloader-modal {
position: fixed;
z-index: 1001; /* Above ComfyUI elements */
+1 -5
View File
@@ -1,7 +1,3 @@
// ComfyUI_Civitai_Downloader/web/js/civitaiDownloader.js
// Paste the complete Javascript content below
// Civicomfy UI for ComfyUI
import { app } from "../../../scripts/app.js";
import { api } from "../../../scripts/api.js";
@@ -157,7 +153,7 @@ class CivitaiDownloaderAPI {
throw error;
}
// Handle empty response body for success codes like 204
if (response.status === 204 || response.headers.get('content-length') === '0') {
if (response.status === 204 || response.headers.get('Content-Length') === '0') {
return null;
}
// Assume JSON response for other success codes