Script to run Google search with Artist & Album?

Is it possible to call an external program from a script in Picard?

I wonder how it would be possible to call a search-URL with an existing Artist and Album name for example?

Do we already have a similar script which I can adjust?

None that I know of, but if you do write something you could (should) probably use the util/webbrowser2 module already built into Picard to display the web page.

2 Likes

Not with a script, but this would be functionality that would be implemented using a plugin. What exactly do you have in mind?

2 Likes

Thanks @rdswift, I’ll take a closer look at that.

@outsidecontext
I have loaded a complete album into Picard, but neather a Lookup nor a Scan found a release at MB.
Therefore I would search for this album online as the next step.

Google seems to be the logical first place to search for it.
(Of course I can copy & paste the information manually, but a right click on the album -> Run Scripts -> and something like “Search for more informations with Google” would be much easier.)

Do you mean Picard automatically searching for stuff (like crawling websites for possible information), or a web window open up and let you select stuff to copy to the fields (more like a browser extension)?

1 Like

I would be happy if I could let Google search for artist and album, something like
https://www.google.com/search?q=Canserbero+album+Eterno

Okay, I hacked together a quick plugin for this. For more information or to download a copy please visit my GitHub repository. It currently is hard coded to use Google for the lookup, but if there is enough interest I can set it up so that you can select from other search providers (e.g.: DuckDickGo or Bing).

UPDATE: I decided to go ahead and add the setting screen (under Options > Options > Plugins > Search Engine Lookup) to allow you to select the search engine provider that you want to use. The options are currently Google, Bing or DuckDuckGo.

Please let me know if this is what you were looking for, and whether I should submit it to the official list of Picard plugins.

5 Likes

Wow, that was fast! Your plugin works great, thank you very much for your effort!
This is just what I was looking for.

Yes, please submit it to the official list of plugins, I’m sure other users can also benefit from it.

Update 25.06.2020:
Thank you @rdswift for your new version 1.0.0, again another very helpful addition!

2 Likes