View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0014621 | MMW v4 | Framework: Scripts/Extensions | public | 2018-01-19 03:21 | 2018-01-19 21:32 |
Reporter | peke | Assigned To | |||
Priority | high | Severity | feature | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Target Version | 4.1.20 | ||||
Summary | 0014621: Search scripts: Ability to have multiple searches from one VBS | ||||
Description | Currently for WEBSearch and scripts ini value "ProcName=SearchAMG" is never called and SearchAMG.vbs can't contain multiple search options or make init of setup websearch, instead "Sub StartSearch( Panel, SearchTerm, SearchArtist, SearchAlbum)" is directly called. We should add that apron initiating WebSearch MMW should start "Sub SearchAMG( Panel, SearchTerm, SearchArtist, SearchAlbum)" and if "sub SearchAMG" doesn't exist in "FileName=SearchAMG.vbs" VBS then start "Sub StartSearch( Panel, SearchTerm, SearchArtist, SearchAlbum)" for backward compatibility. Using http://www.mediamonkey.com/wiki/index.php/Sample_AMG_Search_script as example script for Framework. | ||||
Tags | No tags attached. | ||||
Fixed in build | |||||
|
Please triage, I think that there should be no regression risks for implementation. I'm asking this as instead of separating MusicBrainz and Discogs searches to two separate scripts with this implementation existing one should be easily modified so that MMW have Two Searches instead of one. here is a sample of the implementation in scripts.ini: [SearchAMG1] FileName=SearchAMG.vbs ProcName=SearchAMG1 Order=10 DisplayName=Search All Music Guide 1 Language=VBScript ScriptType=3 [SearchAMG1] FileName=SearchAMG.vbs ProcName=SearchAMG2 Order=10 DisplayName=Search All Music Guide 1 Language=VBScript ScriptType=3 --- SearchAMG.vbs ---- Sub SearchAMG1(Panel, SearchTerm, SearchArtist, SearchAlbum) 'set parameters fro AMG search 1 '.... 'Execute actual Search StartSearch(Panel, SearchTerm, SearchArtist, SearchAlbum) End Sub Sub SearchAMG2(Panel, SearchTerm, SearchArtist, SearchAlbum) 'set parameters fro AMG search 1 '.... 'Execute actual Search StartSearch(Panel, SearchTerm, SearchArtist, SearchAlbum) End Sub Sub StartSearch(Panel, SearchTerm, SearchArtist, SearchAlbum) 'Search Script End Sub --- |
|
In case of auto-tag from web type scripts (ScriptType=3) there are actually three procedures called: 'StartSearch', 'ShowResults', 'FinishSearch'. So we would need to give the choice to define all three in Scripts.ini, but I don't see a benefit. I don't understand the reason why one would want to join two scripts into one file? i.e. what is point of joining MusicBrainz and Discogs into one script? Also I don't agree that it is regression less change, there can be scripts that have the ProcName defined (together with 'StartSearch'), but StartSearch is supposed to be called. i.e. it could throws error for such a scripts. I think that no change is required ATM. Resolving... |
|
I removed "ProcName=SearchAMG" from here: http://www.mediamonkey.com/wiki/index.php/Sample_AMG_Search_script so that it is not confusing. |
|
As talked offline and from my tests you are right it is fairly easy to use multiple VBS files with single main VBS to have multi search engines in Options of Auto Tag from web. As talked I confirmed my suspicion that http://www.mediamonkey.com/wiki/index.php/ISDBScriptControl::Include is the simplest solution for including/importing common VBS Closing |