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

Search titles or artists #3

Open
julenmerchan opened this issue Apr 19, 2019 · 1 comment
Open

Search titles or artists #3

julenmerchan opened this issue Apr 19, 2019 · 1 comment
Labels
good first issue Good for newcomers

Comments

@julenmerchan
Copy link

julenmerchan commented Apr 19, 2019

Hi, first of all, thanks for your job, your module is incredible. It works very well, however i want to know how can i search a title or an artist. I followed the steps of the tutorial but i can't search for a title or an artist. Can you clarify how I have to configure the module?.

P.D: I'm using a Raspberry pi 3b

@ptrk95
Copy link
Owner

ptrk95 commented May 6, 2019

Thank you :)
and sorry for the big delay.

Since this module was made to be used with a speech recognition software/module, it does not have the ability to get the information of the title you search for.

To control the features you have to send messages to this module with an other module.
There is no other way to use this module for the moment. Also I am not working on improving its abilities at the near future if no one wants to get more abilities.

Let's say you want to search for the song "The Drunken Warbler" and your "other module" is for example the Grove Gesture module. When you swipe left you want to search for the song, so you change his config entry which looks somehow like this:

...
"LEFT": {
          notificationExec: {
            notification: "ARTICLE_PREVIOUS",
            payload: null,
          }
        },
...

To that:

...
"LEFT": {
          notificationExec: {
            notification: "AtMusicOnDemand",
            payload: {
                         message: "Title", 
			 Title: "The Drunken Warbler",	},
          }
        },
...

But you can also add this nice line of code to the function of an other module in its "ModuleName".js file, if you want to search for the song and the module does not provide the ability to send notifications with the config.txt entry like the example above does. But this means you have to do a little dig into the code of the other module to find the right place for this line:

this.sendNotification('AtMusicOnDemand', {message: "Title", Title: "The Drunken Warbler"});

So with this two options you can only search for this one specific title.
In the "sendNotification"-option you may be able to get the information about the title in the other module and execute this line with your title, instead of the hardcoded string: "The Drunken Warbler". Sorry if I complicate things a bit.

In the description I mention the use of a speach recognition software/module. This is just to get the
information about the title you want to search for. You can of course use any other module to get the information about the title and send it with the line of code above.

Hope this helps and does not confuse you.
Have a nice day!

@ptrk95 ptrk95 added the good first issue Good for newcomers label May 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants