Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade youtube_dl to 2017.7.9 #8450

Merged
merged 1 commit into from
Jul 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions homeassistant/components/media_extractor.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
Decorator service for the media_player.play_media service.

Extracts stream url and sends it to the media_player.play_media
service.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/media_extractor/
"""
import logging
import os
Expand All @@ -12,28 +12,28 @@
MEDIA_PLAYER_PLAY_MEDIA_SCHEMA, SERVICE_PLAY_MEDIA)
from homeassistant.config import load_yaml_config_file

REQUIREMENTS = ['youtube_dl==2017.7.9']

_LOGGER = logging.getLogger(__name__)

DOMAIN = 'media_extractor'
DEPENDENCIES = ['media_player']
REQUIREMENTS = ['youtube_dl==2017.7.2']

_LOGGER = logging.getLogger(__name__)


def setup(hass, config):
"""Set up the media_extractor service."""
"""Set up the media extractor service."""
descriptions = load_yaml_config_file(
os.path.join(os.path.dirname(__file__),
'media_player', 'services.yaml'))

def play_media(call):
"""Get stream url and send it to the media_player.play_media."""
"""Get stream URL and send it to the media_player.play_media."""
media_url = call.data.get(ATTR_MEDIA_CONTENT_ID)

try:
stream_url = get_media_stream_url(media_url)
except YDException:
_LOGGER.error("Could not retrieve data for the url: %s",
_LOGGER.error("Could not retrieve data for the URL: %s",
media_url)
return
else:
Expand Down Expand Up @@ -62,7 +62,7 @@ class YDException(Exception):


def get_media_stream_url(media_url):
"""Extract stream url from the media url."""
"""Extract stream URL from the media URL."""
from youtube_dl import YoutubeDL
from youtube_dl.utils import DownloadError, ExtractorError

Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,7 @@ yeelight==0.3.0
yeelightsunflower==0.0.8

# homeassistant.components.media_extractor
youtube_dl==2017.7.2
youtube_dl==2017.7.9

# homeassistant.components.light.zengge
zengge==0.2
Expand Down