{"id":12,"date":"2007-03-08T20:11:25","date_gmt":"2007-03-08T18:11:25","guid":{"rendered":"http:\/\/joergnapp.de\/websearch-panels-for-mediamonkey\/"},"modified":"2013-09-17T08:06:46","modified_gmt":"2013-09-17T06:06:46","slug":"websearchpanels","status":"publish","type":"post","link":"https:\/\/joergnapp.de\/blog\/websearchpanels\/","title":{"rendered":"WebSearch Panels for MediaMonkey"},"content":{"rendered":"<p>The following script adds as many panels as defined to the MediaMonkey screen. Eeach of these panels performs a specific web search on Artist, Title of Album.The script needs a XML file as a configuration file.<\/p>\n<p><!--more--><\/p>\n<h2>Screenshots<\/h2>\n<p>(missing)<\/p>\n<h2>Installation<\/h2>\n<h3>Using the Installer<\/h3>\n<p>You can download and use this <a title=\"Websearchpanels\" href=\"http:\/\/code.google.com\/p\/mm-scripts\/downloads\/list\">installation program<\/a> Note: If you already have a site configuration file, this file won&#8217;t get overwritten!<\/p>\n<h3>Manual installation<\/h3>\n<h4>Installing script<\/h4>\n<p>Copy <a title=\"websearch.vbs\" href=\"http:\/\/joergnapp.de\/wp-content\/uploads\/2007\/10\/websearch.vbs\">this script code<\/a>, paste it to an empty text file and save it to &#8222;%MM_DIR%\/Scripts\/Auto\/WebSearch.vbs&#8220;.<\/p>\n<h4>Setting up the configuration file<\/h4>\n<p>The configuration file needs to be named WebSearch.xml and must be located in the same directory as the script.<\/p>\n<p>For each site, you need a entry in this file with the following parameters:<\/p>\n<table>\n<tbody>\n<tr>\n<th>parameter<\/th>\n<th>description<\/th>\n<th>example<\/th>\n<\/tr>\n<tr>\n<td>name<\/td>\n<td>a unique name for the site. This is used internally only, but must really be unique&#8230;<\/td>\n<td>&lt;name&gt; GoogleMusic &lt;\/name&gt;<\/td>\n<\/tr>\n<tr>\n<td>caption<\/td>\n<td>The caption of the panel<\/td>\n<td>&lt;caption&gt; Google Music &lt;\/caption&gt;<\/td>\n<\/tr>\n<tr>\n<td>description<\/td>\n<td>The desription is shown in the &#8222;Search&#8220; menu bar<\/td>\n<td>&lt;description&gt; Search current Artist in Google Music &lt;\/description&gt;<\/td>\n<\/tr>\n<tr>\n<td>start<\/td>\n<td>the start page that is shown when no title is played<\/td>\n<td>&lt;start&gt; http:\/\/www.google.com\/musicsearch?q= &lt;\/start&gt;<\/td>\n<\/tr>\n<tr>\n<td>url<\/td>\n<td>The &#8222;url&#8220; parameter is the Web Search URL, and the placeholders %artist%, %title% asd %album% are replaced accordingly.<\/td>\n<td>&lt;url&gt; http:\/\/www.google.com\/musicsearch?q=%artist%&amp;res=artist &lt;\/url&gt;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>As an example, see <a title=\"websearch.xml\" href=\"http:\/\/joergnapp.de\/wp-content\/uploads\/2007\/10\/websearch.xml\">this file<\/a>. You can use it as a starting point. Copy the xml code to an empy text file. Throw away the entries you don&#8217;t want or don&#8217;t need. Add new sites if you want.<\/p>\n<h2>Using the script<\/h2>\n<p>Start (or re-start) MediaMonkey. For each &lt;site&gt; entry you put in xml file, one panel will be opened. You can close those you don&#8217;t want to be open at the moment. To re-open a panel, in the Search Toolbar click on the &#8222;Search The Web&#8220; button and choose desired site.<\/p>\n<h3>Saving Lyrics and Comments<\/h3>\n<p>Let&#8217;s suppose you want to save the lyrics fetched from lyrics-songs.com site to ID3 tag. Just play a song a wait for the panel to show the lyrics. Select the lyrics text and press &#8222;Lyrics&#8220; button. Done! No CTRL+C is needed in this case. Same procedure to save a text to Comment field.<br \/>\nIf, for some reason, the text you want to paste is outside the panel (a text file, for example) do the following: DO NOT select any text inside the panel itself, just open the file, select the text and copy it (now CTRL+C is needed). Come back to MediaMonkey and press the &#8222;Lyrics&#8220; or &#8222;Comment&#8220; button. Done! Your text is saved in corresponding field.<\/p>\n<h3>Working with local html files<\/h3>\n<p>This method works with local files as well. As a POC use the following HTML file, save it somewhere and make an entry to WebSearch.xml for the file like<\/p>\n<pre><code>\r\n\r\n    SongInfo\r\n    SongInfo\r\n    Displays Information on the current song\r\n    about:blank\r\n    file:\/\/\/C:\/Programs\/MediaMonkey\/Scripts\/Song.htm\r\n\r\n<\/code><\/pre>\n<p>The corresponding HTML file:<\/p>\n<pre><code>\r\n\r\n    \"http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd\"&gt;<\/code><\/pre>\n<style type=\"text\/css\"><!--\n\/*< ![CDATA[*\/\nbody {\n  background-color: White;\n  font-family: Verdana;\n  font-size: 8pt;\n  margin: 0.1em;\n}\n--><\/style>\n<pre><code><script type=\"text\/vbscript\" language=\"VBScript\">\/\/ < ![CDATA[\r\n'< ![CDATA[\r\nOption Explicit\r\n\r\nSub Window_OnLoad \r\n    Dim SDB\r\n    Dim item\r\n\r\n    'Connect to MM\r\n    Set SDB = CreateObject(\"SongsDB.SDBApplication\")\r\n    Set item = SDB.Player.CurrentSong\r\n\r\n    document.getElementById(\"artist\").InnerHTML =  item.ArtistName\r\n    document.getElementById(\"title\").InnerHTML =  item.Title\r\n    document.getElementById(\"album\").InnerHTML =  item.AlbumName\r\n\r\n    Set SDB = Nothing\r\n    Set item = Nothing\r\nEnd Sub\r\n\/\/ ]]><\/script>Artist: <span id=\"artist\"><\/span> Title: <span id=\"title\"><\/span> Album: <span id=\"album\"><\/span> <\/code><\/pre>\n<h2>Known errors<\/h2>\n<h3>Error #424 &#8211; Microsoft VBScript runtime error<\/h3>\n<p>You&#8217;ll get this error without a valid configuration file in place<\/p>\n<h2>Support<\/h2>\n<p>Support is given at the <a href=\"http:\/\/www.mediamonkey.com\/forum\/viewtopic.php?t=11254\">MediaMonkey support forum<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The following script adds as many panels as defined to the MediaMonkey screen. Eeach of these panels performs a specific web search on Artist, Title of Album.The script needs a XML file as a configuration file.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[145,144,24,119,25,14,87],"class_list":["post-12","post","type-post","status-publish","format-standard","hentry","category-allgemein","tag-css","tag-font","tag-html","tag-media","tag-mediamonkey","tag-php","tag-screenshot"],"_links":{"self":[{"href":"https:\/\/joergnapp.de\/blog\/wp-json\/wp\/v2\/posts\/12","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/joergnapp.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/joergnapp.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/joergnapp.de\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/joergnapp.de\/blog\/wp-json\/wp\/v2\/comments?post=12"}],"version-history":[{"count":0,"href":"https:\/\/joergnapp.de\/blog\/wp-json\/wp\/v2\/posts\/12\/revisions"}],"wp:attachment":[{"href":"https:\/\/joergnapp.de\/blog\/wp-json\/wp\/v2\/media?parent=12"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/joergnapp.de\/blog\/wp-json\/wp\/v2\/categories?post=12"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/joergnapp.de\/blog\/wp-json\/wp\/v2\/tags?post=12"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}