"""XIU2/TrackersListCollection collector. Daily aggregator of several upstream tracker lists (GPL-3.0). As with the GPLv2 trackerslist feed, only published data is consumed -- no GPL code is used. `all.txt` seeds endpoints; `best.txt` only sets the best-at-source flag. """ from __future__ import annotations import httpx from sqlalchemy.ext.asyncio import AsyncSession from app.collectors.base import EnrichmentFeed, ImportStats, import_source_feeds from app.config import Settings SOURCE_NAME = "xiu2" class Xiu2Collector: name = SOURCE_NAME async def import_once( self, session: AsyncSession, client: httpx.AsyncClient, settings: Settings ) -> ImportStats: return await import_source_feeds( session, client, source_name=SOURCE_NAME, primary_url=settings.xiu2_all_url, enrichments=[EnrichmentFeed(url=settings.xiu2_best_url, is_best=True)], )