Scripting Functionality Thread (NO Script Requests Here!)

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

Fellow scripters/coders/...: Do you feel the need for a wishlist for enhanced scripting functionality?

You may select 1 option

 
 
View results

onkel_enno
Posts: 2146
Joined: Fri Jan 14, 2005 1:45 am
Location: Germany
Contact:

Post by onkel_enno » Tue Feb 14, 2006 1:37 am

The Cover Type (Front, Back, Inlay, ...) would be interesting :)
SansaMonkey - for SanDisk Sansa and Rockbox Users

Please no PMs for Questions which should be asked in the Forum. Thx

mockturtle
Posts: 8
Joined: Wed Jun 18, 2008 4:49 pm

Post by mockturtle » Wed Feb 15, 2006 12:11 pm

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:

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 Sub
Jiri

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto » Wed Feb 15, 2006 1:45 pm

Excellent - 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.

psyXonova
Posts: 785
Joined: Fri May 20, 2005 3:57 am
Location: Nicosia, Cyprus
Contact:

Post by psyXonova » Thu Feb 16, 2006 5:48 am

Really beautifull,
Thanks Jiri

Steegy
Posts: 3452
Joined: Sat Nov 05, 2005 7:17 pm
Location: Belgium
Contact:

Post by Steegy » Tue Feb 21, 2006 6:31 pm

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
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto » Wed Feb 22, 2006 4:36 am

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.

revbob
Posts: 22
Joined: Wed Feb 22, 2006 10:44 am
Location: Decatur AL, USA
Contact:

Node for stream URLs, other user-supplied lists?

Post by revbob » Wed Feb 22, 2006 11:33 am

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.

Steegy
Posts: 3452
Joined: Sat Nov 05, 2005 7:17 pm
Location: Belgium
Contact:

Post by Steegy » Wed Feb 22, 2006 2:08 pm

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?
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.
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).

Steegy
Posts: 3452
Joined: Sat Nov 05, 2005 7:17 pm
Location: Belgium
Contact:

Post by Steegy » Wed Feb 22, 2006 2:44 pm

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
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).

revbob
Posts: 22
Joined: Wed Feb 22, 2006 10:44 am
Location: Decatur AL, USA
Contact:

Post by revbob » Thu Feb 23, 2006 12:23 am

Wrt Steegy's question on tweaking the text, most streams come with descriptions that scream "Akron Ohio's NUMBER ONE polka station. FM 109.9, the top of the dial!!!! Polka, Polka, Polka!!!!!!!!!"

I prefer something a little more sedate: "Jazz - KLON - Long Beach".

psyXonova
Posts: 785
Joined: Fri May 20, 2005 3:57 am
Location: Nicosia, Cyprus
Contact:

Post by psyXonova » Fri Feb 24, 2006 7:45 am

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 :lol:

Teknojnky
Posts: 5533
Joined: Tue Sep 06, 2005 11:01 pm
Contact:

Scripting Wishlist Idea: script auto-update

Post by Teknojnky » Mon Feb 27, 2006 1:47 pm

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.

Steegy
Posts: 3452
Joined: Sat Nov 05, 2005 7:17 pm
Location: Belgium
Contact:

Post by Steegy » Mon Feb 27, 2006 3:31 pm

This (global MediaMonkey) feature *is* coming...
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto » Tue Feb 28, 2006 4:17 am

@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.

mockturtle
Posts: 8
Joined: Wed Jun 18, 2008 4:49 pm

Post by mockturtle » Tue Feb 28, 2006 4:33 am

Yes, there are plans to add some better means of installing scripts, it will probably included other related issues like uninstallation, check for new version, etc.

Jiri

Post Reply