INNER CODE UNIT · Python

notify_callback

GHJJ123/brainrotguard · main.py:76

        async def notify_callback(video: dict, profile_id: str = "default"):
            if self.bot:
                await self.bot.notify_new_request(video, profile_id=profile_id)

        async def time_limit_cb(used_min: float, limit_min: int,
                                category: str = "", profile_id: str = "default"):
            if self.bot:
                await self.bot.notify_time_limit_reached(
                    used_min, limit_min, category, profile_id=profile_id)

        state = fastapi_app.state
        state.video_store = self.video_store
        state.notify_callback = notify_callback
        state.time_limit_notify_cb = time_limit_cb
        state.youtube_config = self.config.youtube
        state.web_config = self.config.web
        state.wl_config = self.config.watch_limits
        state.locale = get_locale(self.config)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…