Ejemplo n.º 1
0
    def play_film_by_search(self, film_search):
        """
        Search for films using the query, then play if only one result,
        otherwise tell the user about the results.

        Parameters
        ----------

        mycroft : `MycroftSkill` instance
            The current Mycroft instance.

        film_search : `string` A string to search the library for.
        """
        results = kodi.find_films_matching(film_search)
        if len(results) == 1:
            kodi.play_film(results[0]['movieid'])
        elif len(results):
            self.speak_multi_film_match(film_search, results)
        else:
            self.speak("I found no results for the search: {}.".format(film_search))
Ejemplo n.º 2
0
    def play_film_by_search(self, film_search):
        """
        Search for films using the query, then play if only one result,
        otherwise tell the user about the results.

        Parameters
        ----------

        mycroft : `MycroftSkill` instance
            The current Mycroft instance.

        film_search : `string` A string to search the library for.
        """
        results = kodi.find_films_matching(film_search)
        if len(results) == 1:
            kodi.play_film(results[0]['movieid'])
        elif len(results):
            self.speak_multi_film_match(film_search, results)
        else:
            self.speak(
                "I found no results for the search: {}.".format(film_search))
Ejemplo n.º 3
0
 def handle_film_search_intent(self, message):
     results = kodi.find_films_matching(self.kodi, message.metadata['Film'])
     self.speak_multi_film_match(message.metadata['Film'], results)
Ejemplo n.º 4
0
 def handle_film_search_intent(self, message):
     results = kodi.find_films_matching(self.kodi, message.metadata['Film'])
     self.speak_multi_film_match(message.metadata['Film'], results)