mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Use yt-dlp instead of youtube-dl (#94625)
* Update to use yt-dlp instead of youtube-dl * Update homeassistant/components/media_extractor/__init__.py Co-authored-by: Martin Hjelmare <marhje52@gmail.com> --------- Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
parent
732ce34a66
commit
dcf8db36b7
@ -2,8 +2,8 @@
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
from youtube_dl import YoutubeDL
|
||||
from youtube_dl.utils import DownloadError, ExtractorError
|
||||
from yt_dlp import YoutubeDL
|
||||
from yt_dlp.utils import DownloadError, ExtractorError
|
||||
|
||||
from homeassistant.components.media_player import (
|
||||
ATTR_MEDIA_CONTENT_ID,
|
||||
@ -127,7 +127,7 @@ class MediaExtractor:
|
||||
_LOGGER.error("Could not extract stream for the query: %s", query)
|
||||
raise MEQueryException() from err
|
||||
|
||||
return requested_stream["url"]
|
||||
return requested_stream["webpage_url"]
|
||||
|
||||
return stream_selector
|
||||
|
||||
@ -147,7 +147,7 @@ class MediaExtractor:
|
||||
if entity_id:
|
||||
data[ATTR_ENTITY_ID] = entity_id
|
||||
|
||||
self.hass.async_create_task(
|
||||
self.hass.create_task(
|
||||
self.hass.services.async_call(MEDIA_PLAYER_DOMAIN, SERVICE_PLAY_MEDIA, data)
|
||||
)
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
"dependencies": ["media_player"],
|
||||
"documentation": "https://www.home-assistant.io/integrations/media_extractor",
|
||||
"iot_class": "calculated",
|
||||
"loggers": ["youtube_dl"],
|
||||
"loggers": ["yt_dlp"],
|
||||
"quality_scale": "internal",
|
||||
"requirements": ["youtube-dl==2021.12.17"]
|
||||
"requirements": ["yt-dlp==2023.3.4"]
|
||||
}
|
||||
|
@ -2727,7 +2727,7 @@ yolink-api==0.2.9
|
||||
youless-api==1.0.1
|
||||
|
||||
# homeassistant.components.media_extractor
|
||||
youtube-dl==2021.12.17
|
||||
yt-dlp==2023.3.4
|
||||
|
||||
# homeassistant.components.zamg
|
||||
zamg==0.2.2
|
||||
|
Loading…
x
Reference in New Issue
Block a user