Updated to newest version

This commit is contained in:
UrloMythus
2025-04-29 18:52:23 +02:00
parent c54be91e39
commit 323ca2d1b6
11 changed files with 358 additions and 237 deletions

View File

@@ -23,6 +23,34 @@ class GenerateUrlRequest(BaseModel):
None, description="API password for encryption. If not provided, the URL will only be encoded."
)
ip: Optional[IPvAnyAddress] = Field(None, description="The IP address to restrict the URL to.")
filename: Optional[str] = Field(None, description="Filename to be preserved for media players like Infuse.")
class MultiUrlRequestItem(BaseModel):
endpoint: Optional[str] = Field(None, description="The specific endpoint to be appended to the base URL.")
destination_url: Optional[str] = Field(
None, description="The destination URL to which the request will be proxied."
)
query_params: Optional[dict] = Field(
default_factory=dict, description="Query parameters to be included in the request."
)
request_headers: Optional[dict] = Field(default_factory=dict, description="Headers to be included in the request.")
response_headers: Optional[dict] = Field(
default_factory=dict, description="Headers to be included in the response."
)
filename: Optional[str] = Field(None, description="Filename to be preserved for media players like Infuse.")
class GenerateMultiUrlRequest(BaseModel):
mediaflow_proxy_url: str = Field(..., description="The base URL for the mediaflow proxy.")
api_password: Optional[str] = Field(
None, description="API password for encryption. If not provided, the URL will only be encoded."
)
expiration: Optional[int] = Field(
None, description="Expiration time for the URL in seconds. If not provided, the URL will not expire."
)
ip: Optional[IPvAnyAddress] = Field(None, description="The IP address to restrict the URL to.")
urls: list[MultiUrlRequestItem] = Field(..., description="List of URL configurations to generate.")
class GenericParams(BaseModel):
@@ -37,10 +65,6 @@ class HLSManifestParams(GenericParams):
)
class ProxyStreamParams(GenericParams):
destination: str = Field(..., description="The URL of the stream.", alias="d")
class MPDManifestParams(GenericParams):
destination: str = Field(..., description="The URL of the MPD manifest.", alias="d")
key_id: Optional[str] = Field(None, description="The DRM key ID (optional).")
@@ -63,9 +87,9 @@ class MPDSegmentParams(GenericParams):
class ExtractorURLParams(GenericParams):
host: Literal["Doodstream", "Mixdrop", "Uqload", "Streamtape", "Supervideo", "VixCloud", "Okru", "Maxstream", "LiveTV"] = Field(
..., description="The host to extract the URL from."
)
host: Literal[
"Doodstream", "Mixdrop", "Uqload", "Streamtape", "Supervideo", "VixCloud", "Okru", "Maxstream", "LiveTV"
] = Field(..., description="The host to extract the URL from.")
destination: str = Field(..., description="The URL of the stream.", alias="d")
redirect_stream: bool = Field(False, description="Whether to redirect to the stream endpoint automatically.")
extra_params: Dict[str, Any] = Field(