INNER CODE UNIT · Python
_backfill_identifiers
GHJJ123/brainrotguard · main.py:172
async def _backfill_identifiers(self) -> None:
"""One-shot backfill of all missing unique identifiers across all profiles."""
from youtube.extractor import (
resolve_channel_handle,
resolve_handle_from_channel_id,
extract_metadata,
)
profiles = self.video_store.get_profiles()
if not profiles:
profiles = [{"id": "default"}]
for profile in profiles:
pid = profile["id"]
cs = ChildStore(self.video_store, pid)
# 1) Channels missing channel_id
missing_cid = cs.get_channels_missing_ids()