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

Added newsfeed for the state of Hessen (Germany) #96

Open
wants to merge 4 commits into
base: 20.08
Choose a base branch
from
Open
Changes from 3 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
6 changes: 4 additions & 2 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from adapt.intent import IntentBuilder
from mycroft.audio import wait_while_speaking
from mycroft.messagebus.message import Message
from mycroft.skills.core import intent_handler, intent_file_handler
from mycroft.skills.core import MycroftSkill, intent_handler
from mycroft.skills.common_play_skill import CommonPlaySkill, CPSMatchLevel
from mycroft.util import get_cache_directory, LOG
from mycroft.util.parse import fuzzy_match
Expand Down Expand Up @@ -119,6 +119,8 @@ def gbp():
'WDR': ('WDR', 'https://www1.wdr.de/mediathek/audio/'
'wdr-aktuell-news/wdr-aktuell-152.podcast',
image_path('WDR')),
'hr-iNFO': ('hr-iNFO', 'https://podcast.hr-online.de/der_tag_in_hessen/podcast.xml',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the key could be shortened to HRI?
From memory this is only really used to match the Skill setting to the station. The voice commands are based on the first element of the tuple which would remain 'hr-info'

If there's other longer names that people might use to reference the station you can also add this into dialog/lang/alt.feed.name.value

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated PR based on your suggestions.

None),
'YLE': ('YLE', 'https://feeds.yle.fi/areena/v1/series/1-1440981.rss',
image_path('Yle.png')),
"GBP": ("Georgia Public Radio", gbp, None),
Expand Down Expand Up @@ -324,7 +326,7 @@ def get_media_url(self, station_url):
media_url = media_url.split('?')[0]
return media_url

@intent_file_handler("PlayTheNews.intent")
@intent_handler("PlayTheNews.intent")
def handle_latest_news_alt(self, message):
# Capture some alternative ways of requesting the news via Padatious
utt = message.data["utterance"]
Expand Down