mirror of
https://github.com/home-assistant/core.git
synced 2025-09-10 07:11:37 +02:00
Return the actual media url from media extractor (#97408)
This commit is contained in:
committed by
Franck Nijhof
parent
7f9db40390
commit
364e7b838a
@@ -127,7 +127,12 @@ class MediaExtractor:
|
|||||||
_LOGGER.error("Could not extract stream for the query: %s", query)
|
_LOGGER.error("Could not extract stream for the query: %s", query)
|
||||||
raise MEQueryException() from err
|
raise MEQueryException() from err
|
||||||
|
|
||||||
return requested_stream["webpage_url"]
|
if "formats" in requested_stream:
|
||||||
|
best_stream = requested_stream["formats"][
|
||||||
|
len(requested_stream["formats"]) - 1
|
||||||
|
]
|
||||||
|
return best_stream["url"]
|
||||||
|
return requested_stream["url"]
|
||||||
|
|
||||||
return stream_selector
|
return stream_selector
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user