View Issue Details

IDProjectCategoryView StatusLast Update
0017590MediaMonkey 5Extensions frameworkpublic2021-02-27 05:45
Reporterdrakinite Assigned To 
PriorityhighSeverityfeatureReproducibilityN/A
Status resolvedResolutionfixed 
Product Version5.0 
Target Version5.0Fixed in Version5.0 
Summary0017590: Allow addons to use custom search engines
DescriptionI think it would be relatively simple (hopefully) to retrofit the app.utils.web.openSearchWeb method to allow addons to add support for whatever search engine they want.

The method could take a string as its first argument, instead of an integer, to determine the URL that the method opens. It can then replace "%s" or "%S" with the search query that it determines from the second and third parameters. For example:
https://open.spotify.com/search/%s -> app.utils.web.openSearchWeb('https://open.spotify.com/search/%s', type, item);
https://napster.com/search?query=%s -> app.utils.web.openSearchWeb('https://napster.com/search?query=%s', type, item);
https://www.jamendo.com/search?q=%s -> app.utils.web.openSearchWeb('https://www.jamendo.com/search?q=%s', type, item);

Vivaldi does that for its custom search engines, and it works great. (see attached)
Assigning to Jiri for evaluation on the idea.
TagsNo tags attached.
Fixed in build

Relationships

related to 0017589 resolveddrakinite Add Spotify as an option in showLinks addon 

Activities

drakinite

2021-02-21 03:25

developer  

vivaldi_2021-02-20_22-06-36.png (34,141 bytes)   
vivaldi_2021-02-20_22-06-36.png (34,141 bytes)   

jiri

2021-02-21 10:51

administrator   ~0062066

Don't you wanna try to prepare a small test/sample implementation to evaluate? Maybe as an addon?

drakinite

2021-02-21 16:01

developer   ~0062069

I can't, unfortunately, because the openSearchWeb method appears to be native code.

Ludek

2021-02-21 21:22

developer   ~0062081

Last edited: 2021-02-21 21:25

View 2 revisions

See my code re 0017589 -- I did not need to use any native code to add Spotify.

(openSearchWeb was rather a survival from MM4)

Ludek

2021-02-22 14:56

developer   ~0062087

Re-opened for tweaking per IM discussion with Drakinite

drakinite

2021-02-22 22:34

developer   ~0062098

Committed new generic function to SVN; Will wait for the next build to be released before uploading new version of showLinks to the addons website.

drakinite

2021-02-27 05:45

developer   ~0062169

New version of Show Links is up on the addons site.