mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Return the actual media url from media extractor (#97408)
This commit is contained in:
parent
9d2f52dbc5
commit
2b4387f7c2
@ -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
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user