Scripting Functionality Thread (NO Script Requests Here!)
-
onkel_enno
- Posts: 2158
- Joined: Fri Jan 14, 2005 1:45 am
- Location: Germany
- Contact:
A more complete support of Album art in scripts will be in the next release. Here's a short example that can add an image or remove all images:
Jiri
Code: Select all
Sub OnStartup
Set UI = SDB.UI
Set Mnu = UI.AddMenuItem( UI.Menu_View, 0, 0)
Mnu.Caption = "Add AA"
Mnu.UseScript = Script.ScriptPath
Mnu.OnClickFunc = "AddAA"
Set Mnu = UI.AddMenuItem( UI.Menu_View, 0, 0)
Mnu.Caption = "Remove All AA"
Mnu.UseScript = Script.ScriptPath
Mnu.OnClickFunc = "RemoveAA"
End Sub
Sub AddAA( Itm)
Set SL = SDB.CurrentSongList
If SL.Count>0 Then
Set Track = SL.Item(0)
Set AAList = Track.AlbumArt
Set AA = AAList.AddNew
AA.PicturePath = "D:\test.jpg"
AA.Description = "Test"
AA.ItemType = 5
AA.ItemStorage = 0
AAList.UpdateDB
End If
End Sub
Sub RemoveAA( Itm)
Set SL = SDB.CurrentSongList
If SL.Count>0 Then
Set Track = SL.Item(0)
Set AAList = Track.AlbumArt
While AAList.Count>0
AAList.Delete(0)
WEnd
AAList.UpdateDB
End If
End SubExcellent - thank you very much! 
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.
Maybe a little thingy:
Get/Let Comment property for the SDBAlbum object.
( http://www.mediamonkey.com/forum/viewtopic.php?t=8309 , off course sql is a usable workaround for now)
Cheers
Steegy
Get/Let Comment property for the SDBAlbum object.
( http://www.mediamonkey.com/forum/viewtopic.php?t=8309 , off course sql is a usable workaround for now)
Cheers
Steegy
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
I also notice that there is a database field Albums.Year but this is not available in SDBAlbum. Will this functionality be incorporated at some point?
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.
Node for stream URLs, other user-supplied lists?
Newb here, so if the capability already exists, apologies.
I've got a pretty good sized list of bookmarks from WinAmp that I've added by hand. Several of them are extracted from websites that want you to tie up your web browser and watch their ads, so what's in my WinAmp bookmark is the URL for the stream. Even if I don't have to dig out the node, I usually tweak the text, so simply copying Shoutcast stations isn't going to cut it.
I haven't found any place in the tree where you can hang user-supplied stuff like shortcuts for streams. Do you suppose a script could do that? Right now it's the only thing I have to open WinAmp's librarian to access.
I've got a pretty good sized list of bookmarks from WinAmp that I've added by hand. Several of them are extracted from websites that want you to tie up your web browser and watch their ads, so what's in my WinAmp bookmark is the URL for the stream. Even if I don't have to dig out the node, I usually tweak the text, so simply copying Shoutcast stations isn't going to cut it.
I haven't found any place in the tree where you can hang user-supplied stuff like shortcuts for streams. Do you suppose a script could do that? Right now it's the only thing I have to open WinAmp's librarian to access.
??Even if I don't have to dig out the node, I usually tweak the text, so simply copying Shoutcast stations isn't going to cut it.
This can be done by adding a node (various examples here in the Scripts forum) to the tree and let it execute the URL for the Shoutcast stream when you click it. If MM is associated with streams (if this is already possible?), it will play the stream.I haven't found any place in the tree where you can hang user-supplied stuff like shortcuts for streams. Do you suppose a script could do that?
A node / node structure can be added anywhere in the tree. See "Magic Nodes" script or some other to see how you need to code it. Of course, you'll probably want to use the scripting reference (as sticky in this forum) for information.
EDITED: Code removed. See the "StreamsTreeNode" script ( http://www.mediamonkey.com/forum/viewtopic.php?p=37608 )
Please next time post general MM questions in the other forums, or wishes in the "Wishlist" forum.
Cheers
Steegy
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
Together with the above message, I would like to request a way to directly let the MediaMonkey player play any internet stream or local/remote file, using on "Open" method for the player.
(add streams/files directly to the now playing list, as you could do by dragging a file on the internal player or in the Now Playing window).
Also, a way to do this directly from within MM would be very good, as many people seem to want to replace their external Winamp player by the internal player. For that, the basic features should also be present. (this would have to go in the "Wishlist" forum, but I hope the dev's read this here, as it comes along with this other wish.)
Drag-and-dropping is possible, but this is a more advanced feature and the basic feature "open/play... (File/Location/Directory)" seems to be missing.
I use Winamp in the above script, as I don't associate pls files with MediaMonkey so it won't open them if I just call them by their filename. Passing it through the command line is also not possible.
Even if pls files were associated with MM, then still an Internet Explorer window would need to open to dowload the pls file from the web (and then hand it over to the MM player).
And how would it be possible to directly open streams without playlist file (like "http://160.79.128.40:7050")?
Cheers
Steegy
(add streams/files directly to the now playing list, as you could do by dragging a file on the internal player or in the Now Playing window).
Also, a way to do this directly from within MM would be very good, as many people seem to want to replace their external Winamp player by the internal player. For that, the basic features should also be present. (this would have to go in the "Wishlist" forum, but I hope the dev's read this here, as it comes along with this other wish.)
Drag-and-dropping is possible, but this is a more advanced feature and the basic feature "open/play... (File/Location/Directory)" seems to be missing.
I use Winamp in the above script, as I don't associate pls files with MediaMonkey so it won't open them if I just call them by their filename. Passing it through the command line is also not possible.
Even if pls files were associated with MM, then still an Internet Explorer window would need to open to dowload the pls file from the web (and then hand it over to the MM player).
And how would it be possible to directly open streams without playlist file (like "http://160.79.128.40:7050")?
Cheers
Steegy
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
Revbob
This thread if for wishes regarding scripting functionality, is not for requesting scripts or modifications to existing scripts.
Please post your comments to a relative thread.
Any other post from you or anyone else that dont fit the topic will be deleted in order to keep the thread clean and usefull (as it should be)
Many thanks
p.s. You dont need to answer to this post as it will be considered as not relative to the topic and will be deleted
This thread if for wishes regarding scripting functionality, is not for requesting scripts or modifications to existing scripts.
Please post your comments to a relative thread.
Any other post from you or anyone else that dont fit the topic will be deleted in order to keep the thread clean and usefull (as it should be)
Many thanks
p.s. You dont need to answer to this post as it will be considered as not relative to the topic and will be deleted
Scripting Wishlist Idea: script auto-update
Scripting wishlist:
I think it would be really cool if MM supported (optional of course) a standardized way for scripts to check for updates and update automatically.
Ideally, it would support installers like trixmoto's super install files, or simply updating the script VBS file via http d/l from the script writer web page (or the MM website if they were to host them).
While the forum is a great place to discuss and develop new scripts and features, it leaves a great deal to desire regarding script installation and updating.
Using a standard script template with version info and website update url's and update check intervals, it would seem easy for MM or the scripts themselves to check for updates and d/l as needed.
This would be superb feature for those who are not so technically inclined to muck around in the scripts.ini and other files in order to get scripts working properly.
I think it would be really cool if MM supported (optional of course) a standardized way for scripts to check for updates and update automatically.
Ideally, it would support installers like trixmoto's super install files, or simply updating the script VBS file via http d/l from the script writer web page (or the MM website if they were to host them).
While the forum is a great place to discuss and develop new scripts and features, it leaves a great deal to desire regarding script installation and updating.
Using a standard script template with version info and website update url's and update check intervals, it would seem easy for MM or the scripts themselves to check for updates and d/l as needed.
This would be superb feature for those who are not so technically inclined to muck around in the scripts.ini and other files in order to get scripts working properly.
New script:
Last.FM Node Now with DJ Mode!
Last.fm + MediaMonkey = Scrobbler DJ!
Tag with MusicBrainz ~ Get Album Art!
Tweak the Monkey! ~ My Scripts Page

Last.fm + MediaMonkey = Scrobbler DJ!
Tag with MusicBrainz ~ Get Album Art!
Tweak the Monkey! ~ My Scripts Page

This (global MediaMonkey) feature *is* coming...
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
@Steegy: is it? I'm currently working on an application that will allow you to keep track of my scripts, allow you to check automatically for updates and download the latest version at the click of a button. I didn't know MM was working on an official system?
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.