mirror of
https://github.com/RustyRaptor/doge_cogs.git
synced 2026-12-03 15:55:21 -07:00
`[p]watch <title>` asks the home lab's media-preload service to cache a movie, a season, some episodes or the next N unwatched episodes, and keeps a progress message (with a Cancel button) updated until done. `link`/`unlink` store a Jellyfin user name for "next"; `status` and `cancel` work on request ids. The API client in clients/media-preload-client is generated from the service's OpenAPI spec with openapi-python-client (`mise run generate-client`); the cog installs it from this repo via info.json. Also: ruff target py311 (Red 3.5's Python), a dev group with the client, pytest, ruff and ty, and mise tasks. Lint and type checks cover the new cog; doge_alignment is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GUebqhE8dK19vyn4Ct5g1L
16 lines
424 B
Python
16 lines
424 B
Python
"""Red cog: preload movies and episodes into the media cache."""
|
|
|
|
from redbot.core.bot import Red
|
|
|
|
from .watch import Watch
|
|
|
|
__red_end_user_data_statement__ = (
|
|
"This cog stores the Jellyfin user name you link with `watch link`, "
|
|
"to find your next unwatched episodes. `watch unlink` deletes it."
|
|
)
|
|
|
|
|
|
async def setup(bot: Red) -> None:
|
|
"""Red's entry point."""
|
|
await bot.add_cog(Watch(bot))
|