Accessing SansaClip via ActiveDeviceList?

This forum is for questions / discussions regarding development of addons / tweaks for MediaMonkey for Windows 4.

Moderators: Gurus, Addon Administrators

dubidu
Posts: 17
Joined: Mon Aug 06, 2007 3:35 am

Accessing SansaClip via ActiveDeviceList?

Post by dubidu »

Hello,

I just bought a Sansa Clip 8GB (v2) and found that MM is not syncing the ratings correctly.
I'd like to write a script that does sync the ratings from the Clip to MM.
MM is recognizing the Clip and it has got its own node in the tree view labeled 'Sansa Clip 8GB'.

But how can I access that node in a script? I just can't find how to do this.
I tried accessing the ActiveDeviceList, but it's always empty, even though the Clip is showing up in the tree view:

Dim devices : Set devices = SDB.Device.ActiveDeviceList("")

devices.Count will always be 0, no matter which argument is handed to ActiveDeviceList().

Could anyone enlighten me?

BTW I'm still using MM 2.5.5.998.

Thanks!
dubidu
Posts: 17
Joined: Mon Aug 06, 2007 3:35 am

Re: Accessing SansaClip via ActiveDeviceList?

Post by dubidu »

No idea anyone?
markstuartwalker
Posts: 931
Joined: Fri Jul 10, 2009 8:10 am

Re: Accessing SansaClip via ActiveDeviceList?

Post by markstuartwalker »

I have a similar experience has anyone got more details on what parameters are supposed to be passed to this function?

Mark
Windows 7,8 / Ubuntu 13.10 / Mavericks 10.9 / iOS 7.1 / iTunes 11.1
iTunes plugin (d_itunes & itunes4) http://www.mediamonkey.com/forum/viewto ... =2&t=45713
Running MM under Mac OS X with Wine http://www.mediamonkey.com/forum/viewto ... =4&t=58507
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Accessing SansaClip via ActiveDeviceList?

Post by trixmoto »

I'm suffering the same problem now - has anyone got this method to return anything?
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.
Ludek
Posts: 4959
Joined: Fri Mar 09, 2007 9:00 am

Re: Accessing SansaClip via ActiveDeviceList?

Post by Ludek »

This was designed mainly for device DLL plugins, and it must contain part of USB device ID, which is not in a human readable form.
You can use
Dim devices : Set devices = SDB.Device.ActiveDeviceList("VID")
because almost every device contains vendor ID in its USB string.

I added http://www.ventismedia.com/mantis/view.php?id=10625 so that it is possible to manage devices from a VB/JS script.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Accessing SansaClip via ActiveDeviceList?

Post by trixmoto »

Great, thanks.
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.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Accessing SansaClip via ActiveDeviceList?

Post by trixmoto »

Now that we have a StartAutoSynch method as well, is there any chance we could get an OnSynchComplete event?
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.
rusty
Posts: 8423
Joined: Tue Apr 29, 2003 3:39 am
Location: Montreal, Canada

Re: Accessing SansaClip via ActiveDeviceList?

Post by rusty »

Implemented for the next build.
http://www.ventismedia.com/mantis/view. ... 631#c35347

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

Re: Accessing SansaClip via ActiveDeviceList?

Post by trixmoto »

That's fantastic, thank you! :)
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.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Accessing SansaClip via ActiveDeviceList?

Post by trixmoto »

I've tested these new additions in 1628 and they seem to be working great - thanks again :)
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.
ceinj
Posts: 65
Joined: Sun Mar 22, 2009 4:36 pm

Re: Accessing SansaClip via ActiveDeviceList?

Post by ceinj »

I could not get DeviceHandle function to work properly on my XP and Windows 7 computers. Devices that show in MM returned no device handle. I reported this in a post http://www.mediamonkey.com/forum/viewto ... 76#p363876 How do I make sure it gets on the bug list?
Post Reply