shadelinks.m 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*---------------------------------------------------
  2. -----------------------------------------------------
  3. Filename: syncbutton.m
  4. Version: 1.0
  5. Type: maki
  6. Date: 25. Jun. 2007 - 14:04
  7. Author: Martin Poehlmann aka Deimos
  8. E-Mail: [email protected]
  9. Internet: www.skinconsortium.com
  10. www.martin.deimos.de.vu
  11. -----------------------------------------------------
  12. ---------------------------------------------------*/
  13. #include <lib/std.mi>
  14. Function String getArtist ();
  15. Global Button nowplaying;
  16. System.onScriptLoaded ()
  17. {
  18. nowplaying = getScriptGroup().getObject("nowplaying");
  19. }
  20. nowplaying.onLeftClick ()
  21. {
  22. String artist = getArtist();
  23. if (artist == "") return;
  24. String icid = "winshadeiconmodern";
  25. System.navigateUrlBrowser("http://client.winamp.com/nowplaying/artist/?icid="+ icid +"&artistName=" + artist);
  26. }
  27. String getArtist ()
  28. {
  29. String artist = getPlayItemMetaDataString("artist");
  30. if (artist == "") artist = getPlayItemMetaDataString("uvox/artist");
  31. if (artist == "") artist = getPlayItemMetaDataString("cbs/artist");
  32. if (artist == "") artist = getPlayItemMetaDataString("streamtitle");
  33. if (artist == "") artist = getPlayItemDisplayTitle();
  34. return artist;
  35. }