mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 10:51:36 -04:00
Domains and Playlists are Collections, so the Other tab searches both with the existing /api/collections/search (by kind) instead of a Domain-only endpoint. The search and the estimate share search_collections_query. The search now loads each Collection's Downloads up front instead of once per Collection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
60 lines
1.1 KiB
Python
60 lines
1.1 KiB
Python
from dataclasses import dataclass, field
|
|
from typing import List, Optional
|
|
|
|
|
|
@dataclass
|
|
class ArchiveDict:
|
|
id: int
|
|
url_id: int
|
|
domain_id: int
|
|
singlefile_path: str
|
|
readability_path: str
|
|
readability_json_path: str
|
|
readability_txt_path: str
|
|
screenshot_path: str
|
|
title: str
|
|
|
|
|
|
@dataclass
|
|
class ArchiveSearchRequest:
|
|
search_str: Optional[str] = None
|
|
domain: Optional[str] = None
|
|
offset: Optional[int] = None
|
|
limit: Optional[int] = None
|
|
order_by: Optional[str] = None
|
|
tag_names: List[str] = field(default_factory=list)
|
|
headline: bool = False
|
|
deep: bool = False # When True, search all text including page contents (d_text)
|
|
|
|
|
|
@dataclass
|
|
class ArchiveSearchResponse:
|
|
file_groups: List[ArchiveDict]
|
|
totals: dict
|
|
|
|
|
|
@dataclass
|
|
class ArchiveFileFormatRequest:
|
|
archive_file_format: str
|
|
|
|
|
|
@dataclass
|
|
class ArchiveStatistics:
|
|
archives: int
|
|
week: int
|
|
month: int
|
|
year: int
|
|
sum_size: int
|
|
max_size: int
|
|
|
|
|
|
@dataclass
|
|
class DomainStatistics:
|
|
domains: int
|
|
tagged_domains: int
|
|
|
|
|
|
@dataclass
|
|
class ArchiveStatisticsResponse:
|
|
archives: ArchiveStatistics
|
|
domains: DomainStatistics
|