TMdB skill - testing please


#1

Hello all,

This is my first real working skill.

It uses tmdbv3api to search and give info on movies, actors and such. Right now, my skill only searches movie info, but more will be added later.

How to Install:

mycroft-msm install https://github.com/builderjer/tmdb-skill.git

requirements.txt should work, but if not, “pip install tmdbv3api” should do the trick.
or get the source here on github

This does require a FREE account to be made at “https://www.themoviedb.org/” and an api key acquired.

How to test tmdb-skill

  • Create a FREE account and register for a FREE api key here
    https://www.themoviedb.org/account/signup

  • Configure the Skill Settings in home.mycroft.ai

    • Insert api key
    • Other settings are self explanitory
  • Speak Intent phrase

    • "Hey Mycroft, tell me about the movie Monty Python and the Holy Grail

    • "Hey Mycroft, who stars in the movie Life of Brian?

    • More examples in the README located here on github

  • Mycroft should `tell you information on the movie

Feedback can be here, or on github. I check both regularly.

You can check out the latest version in my dev branch
Thank you for all your help.


#2

What a nice skill. Looking forward to test it ad make Danish transltion.

I notice that you have a setting for language. You could instead get the language mycroft uses by using self.lang like this:

	def initialize(self):
		TMDB["tmdb"].api_key = self.settings.get("apiv3")
		TMDB["tmdb"].language = self.lang

#3

OK!! That is easy enough. Should I still leave a setting at home.mycroft.ai ?


#4

I would remve setting to s it isnt needed. Unless you would have posibility to set language different than the languge mycroft uses.
You could check if language mycroft uses is a language that tmdb supports - and if not fall back to English or tell the user that skill dosnt support that language.


#5

Ill made a quick translation to Danish, and are testing. It is a super skill.

I made a PR with the translations and will send more when/if I have changes to the translation.


#6

Nice!! Thank you.

I merged the pull request


#7

It seems like therre are mising a check if description is missing from results. If I ask for what some movie is about, and there isnt a description he just says
"the movie {movie} is about this. " but never says more than that :frowning:
I think it is because description/overvievis empty.

notice I am testing using Danish, and some movies dosnt have Danish descriptions, so maybe it isnt a problem in English…But implementing a check if overviev is empty and handle that could be a good idea.


#8

I am not having that issue. The issue that I am having is that with the online mimic2 voice, only the last sentence is played. If I change the voice, it works fine. Don’t get that one. And, it only happens when it plays the overview. Just basic info, it plays fine.

I believe that I do have error checking there, but maybe it is to general. It just checks for a valid movieID and if it returns an IndexError, it cannot find the movie.

check this by:

“Hey Mycroft. Tell me about the movie kljfdsajkfdsaj”

Should return:

“I can not find any information on the movie kljfdsajkfdsaj”


#9

yes that is correct, but if the movie exists, but there isnt any overview it returns en empty string. So maybe add a check for that like this

   try:
            overview = self.movieDetails.overview
            if overview is '':
                self.speak_dialog("no.info", {"movie": movie})
                return
            self.speak_dialog("movie.description", {"movie": movie, "overview": overview})
        except AttributeError:
            self.speak_dialog("no.info", {"movie": movie})

#10

You could try to split up the overviev text and speak each line once at a time.
something like this:

        try:
            overview = self.movieDetails.overview
            if overview is '':
                self.speak_dialog("no.info", {"movie": movie})
                return
            self.speak_dialog("movie.description", {"movie": movie, "overview": ''})
            for sentence in overview.split('.'):
                self.speak(sentence)

the speak_dialog should then be changed to not include the overview.


#11
 for sentence in overview.split('. '):
                self.speak(sentence, wait=True)
``

would be better :slight_smile:

You could also make movie.genre.multiple handle the list a little nicer by

The (movie|film|flick) can be found in one of the genres {genrelist} and {genrelist_last}

and call the dialog_file with the list minus last and the last. That would make the reply more human sound.


#12

@andlo, thank you so much for you input. These things have been implemented and other fixes around multiple answers such as genres and cast members have been made more human sounding.

I hope this skill is useful to someone. I will be adding to it soon.

How do I submit this to get on the marketplace?


#13

It is a super nice skill. That is for sure.

First you add a little more to the readme.md
a category like

## Category
**Information**

and maybe also some tags ike

## Tags
#movie 
#themoviedb
#cinema
#entertaiment

Also maybe add some more information on how to obtain the API key

then maybe some more replying positive back on this thred also would be nice.

and then comes the “go to market” stuf……

In the skillsdir you run

msk submit . 

(notise the dot to use current directory)
and follow the guide. Then it will dd the PR to the mycroft-skils-repo and then the testers will ook at it and reply throu GitHub. And when everything is fine it will be merged and it is on the market :slight_smile:

Later when you have changes you do msk submit . again and there will be made another PR with the the updates. and same procedure follows.

When translations comes from trnslate.mycroft.ai, you will get PR’s at GitHub and you can merge those.

Making skills is fun :slight_smile:


#14

Ohhh and add a license to your GitHub repo, and also in the _init_.py file.


#15

Making skills IS fun!!!