mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-18 17:16:26 +00:00
- Add ProgramSearchResultSerializer with nested channel/stream data - Implement ProgramSearchAPIView with comprehensive filtering: * Text search with AND/OR operators and parenthetical grouping * Regex pattern matching support * Whole word matching to avoid partial matches * Time-based filtering (airing_at, start/end ranges) * Channel/stream/group filtering * Configurable field selection for response customization * Pagination (50 default, 500 max per page) - Add /api/epg/programs/search/ endpoint - Add comprehensive API documentation - Enhanced Swagger/OpenAPI schema with examples Examples: - Complex queries: (Newcastle OR NEW) AND (Villa OR AST) - Whole words: title=NEW&title_whole_words=true - Regex: title=^Premier&title_regex=true - Time filtering: airing_at=2026-02-14T20:00:00Z
19 lines
833 B
Python
19 lines
833 B
Python
from django.urls import path, include
|
|
from rest_framework.routers import DefaultRouter
|
|
from .api_views import EPGSourceViewSet, ProgramViewSet, EPGGridAPIView, EPGImportAPIView, EPGDataViewSet, CurrentProgramsAPIView, ProgramSearchAPIView
|
|
|
|
app_name = 'epg'
|
|
|
|
router = DefaultRouter()
|
|
router.register(r'sources', EPGSourceViewSet, basename='epg-source')
|
|
router.register(r'programs', ProgramViewSet, basename='program')
|
|
router.register(r'epgdata', EPGDataViewSet, basename='epgdata')
|
|
|
|
urlpatterns = [
|
|
path('grid/', EPGGridAPIView.as_view(), name='epg_grid'),
|
|
path('import/', EPGImportAPIView.as_view(), name='epg_import'),
|
|
path('current-programs/', CurrentProgramsAPIView.as_view(), name='current_programs'),
|
|
path('programs/search/', ProgramSearchAPIView.as_view(), name='program_search'),
|
|
]
|
|
|
|
urlpatterns += router.urls
|