OK, before the beta goes public, here's a corrected version of mb.xml, which
had a little glitch (wrong link).

Thanks for any CVS-aware dev to upload it (promise, someday, I'll re-set
this up).

MLL
<search function="mb">
  <name>MusicBrainz.org</name>
  <category>Entertainment</category>
  <contributor>MLL</contributor>
  <link>http://musicbrainz.org/</link>
  <description>
  Search the online user-contributed MusicBrainz music database
    <div class="helpboxDescLabels">Switches:</div>
    <table class="helpboxDescTable">
      <tr style="font-weight:bolder;"><td>/artist</td><td> - </td><td>search for an artist name (default)</td></tr>
      <tr><td>/album</td><td> - </td><td>search for an album name</td></tr>
      <tr><td>/track</td><td> - </td><td>search for a track name</td></tr>
    </table>
    <div class="helpboxDescLabels">Examples:</div>
    <table class="helpboxDescTable">
      <tr><td>mb bach</td></tr>
      <tr><td>mb ting /album</td></tr>
      <tr><td>mb jennifer she said /track</td></tr>
    </table>
  </description>
  <form name="mbf"
        method="get"
        action="http://musicbrainz.org/search/textsearch.html";>
    <input type="hidden" name="limit" value="25" />
    <input type="hidden" name="type" value="" />
    <input type="hidden" name="query" value="" />
  </form>
  <script><![CDATA[
    function mb(q)
    {

      document.mbf.type.value = "artist";
      var args = parseArgs(q, "artist, album, track");
      if( nullArgs("mb", args.q) ) return;

      //eliminate cases where you got more than 1 switch
      if( args.switches.length > 1 )
      {
        nullArgs( "mb", "?" );
        return false;
      }

      if ( args.switches.length == 1 )
      {
        //albums correction due to new search filed name "release"
        if ( args.switches[0].name=="album" ) {args.switches[0].name = "release"; }
        document.mbf.type.value = args.switches[0].name;
      }

      // Force UTF-8 encoding
      args.q = utf8(args.q);
      document.mbf.query.value = args.q;

      submitForm(mbf);
    }
  ]]></script>
  <copyright>
    The following applies if this file is included and distributed with Dave's Quick Search Deskbar:
    Copyright (c) 2002 David Bau; Distributed under the terms of the GNU Public License, Version 2 (http://www.gnu.org/copyleft/gpl.txt)
  </copyright>
  <created_by>
    This search file was initially created on 12/04/04 at 18:12:35
    by Dave's Quick Search Deskbar Search Wizard version 1.3,
    Copyright (c) 2002 Glenn Carr; Distributed under the terms of the GNU General Public License, Version 2
  </created_by>
</search>

Reply via email to