mirror of
https://github.com/nirvana-7777/script.service.ultimate.git
synced 2026-09-22 00:52:36 +02:00
Add discovery
This commit is contained in:
@@ -93,6 +93,10 @@ class DiscoveryVodManager:
|
||||
if not content_id:
|
||||
return self._root()
|
||||
|
||||
# Restore leading slash stripped by Bottle's :path wildcard.
|
||||
if "/" in content_id and not content_id.startswith("/") and ":" not in content_id:
|
||||
content_id = "/" + content_id
|
||||
|
||||
logger.debug(f"DiscoveryVodManager: get_vod_category({content_id!r})")
|
||||
return self._fetch_children(content_id)
|
||||
|
||||
|
||||
@@ -111,6 +111,12 @@ class RTLPlusVodManager:
|
||||
if not content_id:
|
||||
return self._list_root()
|
||||
|
||||
# Restore leading slash stripped by Bottle's :path wildcard for
|
||||
# watch-path style IDs (e.g. "video-tv/filme" → "/video-tv/filme").
|
||||
# Opaque IDs (rrn:, lane:, season: …) never start with "/" anyway.
|
||||
if "/" in content_id and not content_id.startswith("/") and ":" not in content_id:
|
||||
content_id = "/" + content_id
|
||||
|
||||
if content_id.startswith(RTLPlusDefaults.VOD_MOVIES_ROOT_WATCH_PATH):
|
||||
return self._dispatch_movies([content_id])
|
||||
|
||||
|
||||
@@ -72,6 +72,7 @@ def setup_vod_routes(app, manager):
|
||||
"""
|
||||
if not content_id:
|
||||
return get_vod_root(provider)
|
||||
|
||||
try:
|
||||
entries = manager.get_vod_node(
|
||||
provider_name=provider,
|
||||
|
||||
Reference in New Issue
Block a user