Compare commits
3 Commits
a3972e55b6
...
47926290a2
Author | SHA1 | Date |
---|---|---|
Fabio Manganiello | 47926290a2 | |
Fabio Manganiello | 71e32e4775 | |
Fabio Manganiello | 6b20c2083b |
|
@ -220,7 +220,7 @@ class Event(Message):
|
||||||
:param condition: The platypush.event.hook.EventCondition object
|
:param condition: The platypush.event.hook.EventCondition object
|
||||||
"""
|
"""
|
||||||
|
|
||||||
result = EventMatchResult(is_match=False, parsed_args=self.args)
|
result = EventMatchResult(is_match=False)
|
||||||
match_scores = []
|
match_scores = []
|
||||||
|
|
||||||
if not isinstance(self, condition.type):
|
if not isinstance(self, condition.type):
|
||||||
|
|
|
@ -255,6 +255,8 @@ class MusicMopidyPlugin(RunnablePlugin):
|
||||||
ret = self._add(resource, position=0)
|
ret = self._add(resource, position=0)
|
||||||
if not ret:
|
if not ret:
|
||||||
self.logger.warning('Failed to add %s to the tracklist', resource)
|
self.logger.warning('Failed to add %s to the tracklist', resource)
|
||||||
|
elif isinstance(ret, list):
|
||||||
|
track_id = ret[0].get('tlid')
|
||||||
elif isinstance(ret, dict):
|
elif isinstance(ret, dict):
|
||||||
track_id = ret.get('tlid')
|
track_id = ret.get('tlid')
|
||||||
elif position is not None:
|
elif position is not None:
|
||||||
|
|
|
@ -59,10 +59,12 @@ class TextConversionUtils:
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def convert(cls, text: str) -> str:
|
def convert(cls, text: str) -> str:
|
||||||
|
text = cls._convert_digits(text)
|
||||||
|
|
||||||
for pattern, replacement in TextConversionUtils._conversions_map:
|
for pattern, replacement in TextConversionUtils._conversions_map:
|
||||||
text = pattern.sub(replacement, text)
|
text = pattern.sub(replacement, text)
|
||||||
|
|
||||||
return cls._convert_digits(text)
|
return text
|
||||||
|
|
||||||
|
|
||||||
class TtsPicovoicePlugin(TtsPlugin):
|
class TtsPicovoicePlugin(TtsPlugin):
|
||||||
|
|
Loading…
Reference in New Issue