signing for extension deployment, tuning for download crawl depth, and dependency version visibility in settings view
This commit is contained in:
@@ -266,3 +266,58 @@ async def get_logs():
|
||||
})
|
||||
|
||||
return jsonify({"logs": logs, "count": len(logs)})
|
||||
|
||||
|
||||
@bp.route("/system-info", methods=["GET"])
|
||||
async def get_system_info():
|
||||
"""Get system information including dependency versions."""
|
||||
import sys
|
||||
import importlib.metadata
|
||||
|
||||
config = get_settings()
|
||||
|
||||
# Get all installed packages (preserve original names for display)
|
||||
all_packages = {}
|
||||
# Also build a normalized lookup (lowercase, underscores normalized to hyphens)
|
||||
normalized_lookup = {}
|
||||
for dist in importlib.metadata.distributions():
|
||||
name = dist.metadata["Name"]
|
||||
if name:
|
||||
all_packages[name] = dist.version
|
||||
# Normalize: lowercase and replace underscores with hyphens
|
||||
normalized = name.lower().replace("_", "-")
|
||||
normalized_lookup[normalized] = dist.version
|
||||
|
||||
def get_version(name):
|
||||
"""Get version with case-insensitive and underscore/hyphen-insensitive lookup."""
|
||||
normalized = name.lower().replace("_", "-")
|
||||
return normalized_lookup.get(normalized, "not installed")
|
||||
|
||||
# Key packages to highlight (sorted alphabetically)
|
||||
key_package_names = [
|
||||
"alembic",
|
||||
"asyncpg",
|
||||
"celery",
|
||||
"gallery-dl",
|
||||
"hypercorn",
|
||||
"pydantic",
|
||||
"quart",
|
||||
"redis",
|
||||
"sqlalchemy",
|
||||
]
|
||||
|
||||
key_packages = {
|
||||
name: get_version(name)
|
||||
for name in key_package_names
|
||||
}
|
||||
|
||||
return jsonify({
|
||||
"version": "1.0.0",
|
||||
"python_version": f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}",
|
||||
"python_full": sys.version,
|
||||
"gallery_dl_version": get_version("gallery-dl"),
|
||||
"key_packages": key_packages,
|
||||
"all_packages": all_packages,
|
||||
"download_path": config.download_path,
|
||||
"config_path": config.config_path,
|
||||
})
|
||||
|
||||
@@ -144,17 +144,21 @@ class GalleryDLService:
|
||||
# Additional options
|
||||
"videos": True, # Download video content
|
||||
"embeds": True, # Download embedded URLs (YouTube, etc.)
|
||||
# Deep crawling options
|
||||
"cursor": True, # Enable cursor-based pagination for complete history
|
||||
},
|
||||
"subscribestar": {
|
||||
"content_types": ["all"],
|
||||
"directory": ["{date:%Y-%m-%d}_{id}_{title[:40]}"],
|
||||
"filename": "{num:>02}_{filename}.{extension}",
|
||||
# Automatic infinite scroll pagination is built-in
|
||||
},
|
||||
"hentaifoundry": {
|
||||
"content_types": ["pictures"],
|
||||
"directory": [], # Flat structure within platform folder
|
||||
"filename": "{category}_{index:>03}_{title[:50]}.{extension}",
|
||||
"include": "all", # Include all content types
|
||||
"include": "all", # Include all content types (pictures, scraps, stories)
|
||||
# Automatic pagination through all pages (25 items/page)
|
||||
},
|
||||
"discord": {
|
||||
"content_types": ["all"],
|
||||
@@ -164,6 +168,8 @@ class GalleryDLService:
|
||||
"embeds": True, # Download embedded URLs
|
||||
"stickers": True, # Download stickers
|
||||
"reactions": False, # Skip reaction images
|
||||
# Deep crawling options
|
||||
"threads": True, # Include thread content for complete history
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user