Add discovery

This commit is contained in:
Nirvana
2026-02-28 23:15:32 +01:00
parent 5a85cb8bca
commit 279c52ee5a
3 changed files with 21 additions and 0 deletions
+17
View File
@@ -10,6 +10,7 @@ from .catchup_operations import CatchupOperations
from .channel_operations import ChannelOperations
from .drm_operations import DRMOperations
from .epg_operations import EPGOperations
from .event_operations import EventOperations
from .models import StreamingChannel
from .provider_registry import ProviderRegistry
from .subscription_operations import SubscriptionOperations
@@ -32,6 +33,7 @@ class ProviderManager:
self.drm_ops = DRMOperations(self.registry)
self.catchup_ops = CatchupOperations(self.registry, self.drm_ops)
self.subscription_ops = SubscriptionOperations(self.registry)
self.event_ops = EventOperations(self.registry)
# Backward compatibility - expose managers directly
self.drm_plugin_manager = self.drm_ops.drm_plugin_manager
@@ -207,6 +209,21 @@ class ProviderManager:
def get_all_catchup_capabilities(self) -> Dict[str, Dict]:
return self.catchup_ops.get_all_catchup_capabilities()
# ==========================================================================
# EVENT OPERATIONS (delegate to EventOperations)
# ==========================================================================
def get_events(
self,
provider_name: str,
start_time=None,
end_time=None,
):
return self.event_ops.get_events(provider_name, start_time, end_time)
def get_all_events(self, start_time=None, end_time=None):
return self.event_ops.get_all_events(start_time, end_time)
# ==========================================================================
# SUBSCRIPTION OPERATIONS (delegate to SubscriptionOperations)
# ==========================================================================
+2
View File
@@ -18,6 +18,7 @@ from .config import setup_config_routes
from .drm import setup_drm_routes
from .epg import setup_epg_routes
from .m3u import setup_m3u_routes
from .events import setup_events_routes
# Now import the route setup functions
from .providers import setup_provider_routes
@@ -31,4 +32,5 @@ __all__ = [
"setup_cache_routes",
"setup_config_routes",
"setup_epg_routes",
"setup_events_routes",
]
+2
View File
@@ -1615,6 +1615,7 @@ class UltimateService:
from routes.cache import setup_cache_routes
from routes.config import setup_config_routes
from routes.epg import setup_epg_routes
from routes.events import setup_events_routes
# Setup routes from separate modules
setup_provider_routes(self.app, self.manager, self)
@@ -1624,6 +1625,7 @@ class UltimateService:
setup_cache_routes(self.app, self.manager, self)
setup_config_routes(self.app, self.manager, self)
setup_epg_routes(self.app, self.manager, self)
setup_events_routes(self.app, self.manager, self)
# Core UI routes
@self.app.route("/config")