[MM2+3] Search Google, Wikipedia, Last.fm, ...
-
onkel_enno
- Posts: 2158
- Joined: Fri Jan 14, 2005 1:45 am
- Location: Germany
- Contact:
If you want to do an album search you'll need to change album to:
and the WshShell.Run to:
Code: Select all
Album = Replace(Song.AlbumName, " ", "")Code: Select all
WshShell.Run("http://www.allmusic.com/cg/amg.dll?P=amg&OPT1=2&SQL=" + Album) Download MediaMonkey ♪ License ♪ Knowledge Base ♪ MediaMonkey for Windows 2024 Help ♪ MediaMonkey for Android Help
Lowlander (MediaMonkey user since 2003)
Lowlander (MediaMonkey user since 2003)
Lowlander, you're almost right in those replace lines for allmusic.com...but the spaces need to be replaced by a "+" not blank "", so the correct syntax is:
there you go, and thanks for the help!!
btw...I'm having problems with artists that have a & in their name, like Hootie & THE BLOWFISH, as allmusic.com doesnt seem to understand the &. if & is replaced by AND it works, but i had no luck doing this in the script as replacing & breaks the string...it sure is how the language handles '&'
can you help me on that one please??
thanks,
judas
Code: Select all
Artist = Replace(Song.ArtistName, " ", "+")
Album = Replace(Song.AlbumName, " ", "+")
btw...I'm having problems with artists that have a & in their name, like Hootie & THE BLOWFISH, as allmusic.com doesnt seem to understand the &. if & is replaced by AND it works, but i had no luck doing this in the script as replacing & breaks the string...it sure is how the language handles '&'
can you help me on that one please??
thanks,
judas
Try:This is how most weblinks work (26 is the hexidecimal value for the & character).
Code: Select all
Artist = Replace(Song.ArtistName,"&","%26")Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
still no luck...it's breaking the string and the urls its sending to the browser is:
one question: is this correct?
thanks trix
Code: Select all
http://www.allmusic.com/cg/amg.dll?P=amg&uid=SEARCH&opt1=1&sql=HOOTIECode: Select all
Artist = Replace(Song.ArtistName, " ", "+")
Artist = Replace(Song.ArtistName,"&","%26")
Album = Replace(Song.AlbumName, " ", "+")Turns out allmusic are a bit non-standard and simply use % to represent &, so this should work:
Code: Select all
Artist = Replace(Song.ArtistName,"&","%")Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
-
MarineBrat
- Posts: 490
- Joined: Tue Jun 14, 2005 12:12 am
- Location: Loony left coast, USA.
@Marinebrat
This is what i use to get info from artist or album from allmusic.com
Just put the script (*.vbs) on mediamonkey\scripts\auto folder...and restart the monkey
hope is what ur looking for...
judas
This is what i use to get info from artist or album from allmusic.com
Just put the script (*.vbs) on mediamonkey\scripts\auto folder...and restart the monkey
Code: Select all
Sub OnStartUp
SDB.UI.AddMenuItemSep SDB.UI.Menu_Pop_TrackList_MoreFrom, -1, -1
SDB.UI.AddMenuItemSep SDB.UI.Menu_Pop_NP_MoreFrom, -1, -1
Dim MenuItem
Set MenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_Pop_TrackList_MoreFrom, -1, -1)
MenuItem.Caption = SDB.Localize("Artist") + " (allmusic.com)"
MenuItem.IconIndex = 37
MenuItem.OnClickFunc = "allmusic"
MenuItem.UseScript = Script.ScriptPath
MenuItem.Hint = "Artist"
Set MenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_Pop_NP_MoreFrom, -1, -1)
MenuItem.Caption = SDB.Localize("Artist") + " (allmusic.com)"
MenuItem.IconIndex = 37
MenuItem.OnClickFunc = "allmusic"
MenuItem.UseScript = Script.ScriptPath
MenuItem.Hint = "Artist"
Set MenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_Pop_TrackList_MoreFrom, -1, -1)
MenuItem.Caption = SDB.Localize("Album") + " (allmusic.com)"
MenuItem.IconIndex = 37
MenuItem.OnClickFunc = "allmusic"
MenuItem.UseScript = Script.ScriptPath
MenuItem.Hint = "Album"
Set MenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_Pop_NP_MoreFrom, -1, -1)
MenuItem.Caption = SDB.Localize("Album") + " (allmusic.com)"
MenuItem.IconIndex = 37
MenuItem.OnClickFunc = "allmusic"
MenuItem.UseScript = Script.ScriptPath
MenuItem.Hint = "Album"
Set MenuItem = Nothing
End Sub
Sub allmusic(MenuItem)
if SDB.SelectedSongList.Count > 0 then
Dim Song
Set Song = SDB.SelectedSongList.Item(0)
Dim Artist
Dim Album
Artist = Replace(Song.ArtistName, " ", "+")
Artist = Replace(Artist,"&","%")
Album = Replace(Song.AlbumName, " ", "+")
Album = Replace(Album,"&","%")
Dim WshShell
Set WshShell = CreateObject("WScript.Shell")
if MenuItem.Hint = "Artist" then
WshShell.Run("http://www.allmusic.com/cg/amg.dll?P=amg&uid=SEARCH&opt1=1&sql=" + Artist)
else
WshShell.Run("http://www.allmusic.com/cg/amg.dll?P=amg&uid=SEARCH&opt1=2&sql=" + Album)
end if
Set WshShell = Nothing
end if
end Subjudas
Define "all possible sites" 
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
2trixmoto:
Code: Select all
Sub OnStartUp
SDB.UI.AddMenuItemSep SDB.UI.Menu_Pop_TrackList_MoreFrom, -1, -1
SDB.UI.AddMenuItemSep SDB.UI.Menu_Pop_NP_MoreFrom, -1, -1
Dim MenuItem
Set MenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_Pop_TrackList_MoreFrom, -1, -1)
MenuItem.Caption = SDB.Localize("Album") + " [allmusic.com]"
MenuItem.IconIndex = 37
MenuItem.OnClickFunc = "allmusic"
MenuItem.UseScript = Script.ScriptPath
MenuItem.Hint = "Album"
Set MenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_Pop_NP_MoreFrom, -1, -1)
MenuItem.Caption = SDB.Localize("Album") + " [allmusic.com]"
MenuItem.IconIndex = 37
MenuItem.OnClickFunc = "allmusic"
MenuItem.UseScript = Script.ScriptPath
MenuItem.Hint = "Album"
Set MenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_Pop_TrackList_MoreFrom, -1, -1)
MenuItem.Caption = SDB.Localize("Artist") + " [allmusic.com]"
MenuItem.IconIndex = 37
MenuItem.OnClickFunc = "allmusic"
MenuItem.UseScript = Script.ScriptPath
MenuItem.Hint = "Artist"
Set MenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_Pop_NP_MoreFrom, -1, -1)
MenuItem.Caption = SDB.Localize("Artist") + " [allmusic.com]"
MenuItem.IconIndex = 37
MenuItem.OnClickFunc = "allmusic"
MenuItem.UseScript = Script.ScriptPath
MenuItem.Hint = "Artist"
Set MenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_Pop_TrackList_MoreFrom, -1, -1)
MenuItem.Caption = SDB.Localize("Artist") + " [Wikipedia.org]"
MenuItem.IconIndex = 37
MenuItem.OnClickFunc = "allmusic"
MenuItem.UseScript = Script.ScriptPath
MenuItem.Hint = "ArtistWikipedia"
Set MenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_Pop_NP_MoreFrom, -1, -1)
MenuItem.Caption = SDB.Localize("Artist") + " [Wikipedia.org]"
MenuItem.IconIndex = 37
MenuItem.OnClickFunc = "allmusic"
MenuItem.UseScript = Script.ScriptPath
MenuItem.Hint = "ArtistWikipedia"
Set MenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_Pop_TrackList_MoreFrom, -1, -1)
MenuItem.Caption = SDB.Localize("Artist") + " [Last.fm]"
MenuItem.IconIndex = 37
MenuItem.OnClickFunc = "allmusic"
MenuItem.UseScript = Script.ScriptPath
MenuItem.Hint = "ArtistFM"
Set MenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_Pop_NP_MoreFrom, -1, -1)
MenuItem.Caption = SDB.Localize("Artist") + " [Last.fm]"
MenuItem.IconIndex = 37
MenuItem.OnClickFunc = "allmusic"
MenuItem.UseScript = Script.ScriptPath
MenuItem.Hint = "ArtistFM"
Set MenuItem = Nothing
End Sub
Sub allmusic(MenuItem)
if SDB.SelectedSongList.Count > 0 then
Dim Song
Set Song = SDB.SelectedSongList.Item(0)
Dim Artist
Dim Album
Artist = Replace(Song.ArtistName, " ", "+")
Artist = Replace(Artist,"&","%")
Album = Replace(Song.AlbumName, " ", "+")
Album = Replace(Album,"&","%")
Dim WshShell
Set WshShell = CreateObject("WScript.Shell")
if MenuItem.Hint = "Artist" then
WshShell.Run("http://www.allmusic.com/cg/amg.dll?P=amg&uid=SEARCH&opt1=1&sql=" + Artist)
end if
if MenuItem.Hint = "ArtistWikipedia" then
WshShell.Run("http://en.wikipedia.org/wiki/Special:Search?search=" + Artist + "&go=Go")
end if
if MenuItem.Hint = "ArtistFM" then
WshShell.Run("http://www.last.fm/explore/search.php?q=" + Artist + "&m=artists")
end if
if MenuItem.Hint = "Album" then
WshShell.Run("http://www.allmusic.com/cg/amg.dll?P=amg&uid=SEARCH&opt1=2&sql=" + Album)
end if
Set WshShell = Nothing
end if
end Sub
this has been requested (me included) many times, but they dont provide an apy and i think is against their licence or something like that...besides that, the script doesnt actually communicates with allmusic...it just sends the search query to a browser.
i dont think this is coming in the near future...some players that USED to allow this sort of thing stopped working since allmusic changed...
judas
i dont think this is coming in the near future...some players that USED to allow this sort of thing stopped working since allmusic changed...
judas
For people who don't know yet:how difficult would it be to get the album art and other info from them as well
A solution exists to tag your files from web resources, using "Web Sources Tagger": http://www.mediamonkey.com/forum/viewto ... 1069#41069
For more information (history, possibilities), please take a look in that thread.
It currently works for Amazon (all sites), All Music Guide (AMG), FreeDB, Discogs, Walmart (covers) and DarkTown (covers).
Other scripts already exist but have to be improved (e.g. iTunes (covers), ArtistDirect and MusicBrainz.)
If you want other sites to be supported, please let us know. Or take a look at the above linked forum page to find information on how to create/edit sources scripts yourself (documentation from Mp3Tag).
Cheers
Steegy
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
-
jatsad
Google search vbs proble
I have tried to run the google search script, as well as the wikipedia,lastfm and allmusic.
In all cases I get the following error.
Error#-2147023241
File "E:\Program Files\MediaMonkey\Scripts\Auto\Google.vbs" Line: 50, Column: 9
When you press the OK button, the following is displayed.
Error happened during script execution:
No application is associated with the specified file for this operation.
The code with associated line numbers is:
37 Sub Google(MenuItem)
38 if SDB.SelectedSongL ist.Count > 0 then
39 Dim Song
40 Set Song = SDB.Se lectedSongList.Item(0)
41 Dim Artist
42 Dim Album
43
44 Artist = "%22" + Replace(Song.ArtistName, " ", "%20") + "%22"
45 Album = "%22" + R eplace(Song.AlbumName, " ", "%20") + "%22"
46
47 Dim WshShell
48 Set WshShell = Cr eateObject("WScript.Shell")
49 if MenuItem.Hint = "Artist" then
50 WshShell.Run(" www.google.com/search?q=" + Artist + "")
51 else
52 WshShell.Run(" www.google.com/search?q=" + Artist + "+" + Album)
53 end if
54 Set WshShell = No thing
55 end if
56 end Sub
Your help is appreciated in advance.
In all cases I get the following error.
Error#-2147023241
File "E:\Program Files\MediaMonkey\Scripts\Auto\Google.vbs" Line: 50, Column: 9
When you press the OK button, the following is displayed.
Error happened during script execution:
No application is associated with the specified file for this operation.
The code with associated line numbers is:
37 Sub Google(MenuItem)
38 if SDB.SelectedSongL ist.Count > 0 then
39 Dim Song
40 Set Song = SDB.Se lectedSongList.Item(0)
41 Dim Artist
42 Dim Album
43
44 Artist = "%22" + Replace(Song.ArtistName, " ", "%20") + "%22"
45 Album = "%22" + R eplace(Song.AlbumName, " ", "%20") + "%22"
46
47 Dim WshShell
48 Set WshShell = Cr eateObject("WScript.Shell")
49 if MenuItem.Hint = "Artist" then
50 WshShell.Run(" www.google.com/search?q=" + Artist + "")
51 else
52 WshShell.Run(" www.google.com/search?q=" + Artist + "+" + Album)
53 end if
54 Set WshShell = No thing
55 end if
56 end Sub
Your help is appreciated in advance.