Files
offline-db/aniscrap_core/asgi.py
google-labs-jules[bot] e55b1de01e feat: Implement WatchParty and Anime4K features (#157)
- Fix backend ImportError in `aniscrap_core/asgi.py`.
- Fix frontend TypeScript error in `src/app/page.tsx`.
- Implement `watchPartyService` and `Room` interface in `src/services/api.ts`.
- Add "Create Party" button and Anime4K toggle in `VideoPlayer.tsx`.
- Create Watch Party page at `src/app/watch/room/[id]/page.tsx`.
- Refactor `useSyncManager` to fix dependency issues and use callbacks.
- Update dynamic route pages to await `params` and `searchParams` for Next.js 16 compatibility.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-01-23 20:54:53 +00:00

35 lines
1.1 KiB
Python

"""
ASGI config for AniScrap project.
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "aniscrap_core.settings")
# Initialize Django ASGI application early to ensure the AppRegistry
# is populated before importing code that may import ORM models.
django_asgi_app = get_asgi_application()
from channels.auth import AuthMiddlewareStack
from channels.routing import ProtocolTypeRouter, URLRouter
from django.urls import path
from core.consumers import ChatConsumer
from users.consumers import NotificationConsumer
from apps.watchparty.consumers import WatchPartyConsumer
from apps.watchparty import routing
application = ProtocolTypeRouter({
"http": django_asgi_app,
"websocket": AuthMiddlewareStack(
URLRouter(
routing.websocket_urlpatterns + [
path("ws/chat/<str:room_name>/", ChatConsumer.as_asgi()), # Keeping legacy chat for now if needed, or remove?
# Better to keep existing routes to avoid breaking other parts if any.
# However, the user asked for apps/watchparty as "The" module.
]
)
),
})