Can i play song by ID?

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

Plazma
Posts: 52
Joined: Thu Nov 03, 2005 9:59 am

Can i play song by ID?

Post by Plazma »

Hey all, this may be my last question for awhile.

Can I play a song by its ID?
Or else, is there a different way that I can call up a song to play, not just to be added into the playlist, by calling up one of its attributes?

I am aware of the addtrackbyid Method - if I use this can I then play the specific track immediately?

Thanks
Plazma
Posts: 52
Joined: Thu Nov 03, 2005 9:59 am

Post by Plazma »

OK - In my attempt to answer my own question - I can figure out how to use NowPlaying CurrentSongIndex to get the number of the nowplaying track, relative to the now playing playlist. And then play the song according to the CurrentSongIndex...

However, say I get SDB.Player.CurrentSong.ID - and save the ID# in a variable - what command/method can I use to play that song again?

The only thing I can work out - which is kinda slow - is doing a for loop and checking each and every track in nowplaying to see if that track's ID corresponds to the CurrentSong.ID i have stored - and then play that track using CurrentSongIndex - and if the file isn't in the playlist then I have to add it to the nowplaying using addtrackbyID and then play that track... Is there a better method?
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Not that I know of. This is how my Bookmarker script does it.
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.
Post Reply