small bugfix
This commit is contained in:
@@ -145,9 +145,9 @@ python server.py
|
|||||||
| `SEGMENT_DURATION` | `4` | HLS segment length (seconds) |
|
| `SEGMENT_DURATION` | `4` | HLS segment length (seconds) |
|
||||||
| `PREFETCH_SEGMENTS` | `4` | Segments to prefetch ahead |
|
| `PREFETCH_SEGMENTS` | `4` | Segments to prefetch ahead |
|
||||||
| `SCHEME` | `auto` | URL scheme (`http`, `https`, `auto`) |
|
| `SCHEME` | `auto` | URL scheme (`http`, `https`, `auto`) |
|
||||||
| `META_SORT_WEBDAV_URL` | - | WebDAV URL for file access (e.g., `http://meta-sort/webdav`) |
|
| `META_CORE_WEBDAV_URL` | - | WebDAV URL for file access (e.g., `http://meta-core/webdav`) |
|
||||||
|
|
||||||
**WebDAV File Access**: When `META_SORT_WEBDAV_URL` is set, meta-stremio reads files via HTTP from meta-sort's WebDAV server instead of direct filesystem access. This enables access to SMB/rclone mounts that are dynamically mounted inside meta-sort.
|
**WebDAV File Access**: When `META_CORE_WEBDAV_URL` is set, meta-stremio reads files via HTTP from meta-core's WebDAV server instead of direct filesystem access. This enables access to SMB/rclone mounts that are dynamically mounted inside meta-core.
|
||||||
|
|
||||||
## API Endpoints
|
## API Endpoints
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
"""
|
"""
|
||||||
WebDAV Client for Meta-Stremio
|
WebDAV Client for Meta-Stremio
|
||||||
|
|
||||||
Provides HTTP-based file access to meta-sort's WebDAV server.
|
Provides HTTP-based file access to meta-core's WebDAV server.
|
||||||
This allows meta-stremio to access files without direct volume mounts.
|
This allows meta-stremio to access files without direct volume mounts.
|
||||||
|
|
||||||
Environment Variables:
|
Environment Variables:
|
||||||
- META_SORT_WEBDAV_URL: Base URL for WebDAV access (e.g., http://meta-sort/webdav)
|
- META_CORE_WEBDAV_URL: Base URL for WebDAV access (e.g., http://meta-core/webdav)
|
||||||
- FILES_PATH: Local files path prefix to strip when building WebDAV URLs (default: /files)
|
- FILES_PATH: Local files path prefix to strip when building WebDAV URLs (default: /files)
|
||||||
"""
|
"""
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
@@ -18,14 +18,14 @@ from urllib.parse import quote
|
|||||||
import requests
|
import requests
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
WEBDAV_URL = os.environ.get('META_SORT_WEBDAV_URL', '').rstrip('/')
|
WEBDAV_URL = os.environ.get('META_CORE_WEBDAV_URL', '').rstrip('/')
|
||||||
FILES_PATH = os.environ.get('FILES_PATH', '/files')
|
FILES_PATH = os.environ.get('FILES_PATH', '/files')
|
||||||
|
|
||||||
# Check if WebDAV is enabled
|
# Check if WebDAV is enabled
|
||||||
WEBDAV_ENABLED = bool(WEBDAV_URL)
|
WEBDAV_ENABLED = bool(WEBDAV_URL)
|
||||||
|
|
||||||
if WEBDAV_ENABLED:
|
if WEBDAV_ENABLED:
|
||||||
print(f"[WebDAV] Using meta-sort WebDAV at {WEBDAV_URL}")
|
print(f"[WebDAV] Using meta-core WebDAV at {WEBDAV_URL}")
|
||||||
else:
|
else:
|
||||||
print("[WebDAV] Not configured, using direct filesystem access")
|
print("[WebDAV] Not configured, using direct filesystem access")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user