I am working on a playlist/library uploader that will sync mediamonkey and google music, but I may need some help.
Simon Weber recently released an unofficial API for google music at https://github.com/simon-weber/Unoffici ... -Music-API
The API is written in python, so I just downloaded python and will be working with it for the first time. What I could really use advice on is how to integrate mediamonkey and python. So far this is all the information I was able to find:
http://www.mediamonkey.com/wiki/index.p ... _scripting
http://mediamonkey.com/wiki/index.php/P ... t_handling
I'm not sure if it is going to be enough to figure out everything based on. Could allow me to see an example of their python plug-in or point me in the right direction?
Working with Python (Google Music API)
Moderators: Gurus, Addon Administrators
Working with Python (Google Music API)
MM to Grooveshark Playlist Sync w/ MonkeyShark.
http://lysle.net/projects/monkeyshark.php
http://lysle.net/projects/monkeyshark.php
Re: Working with Python (Google Music API)
If nothing else works there is a loose alternative....
Using vbscript write all the variables in a text file and then call your Python Script (from within .vbs) to read the variables and execute the calculations !!!!
Using vbscript write all the variables in a text file and then call your Python Script (from within .vbs) to read the variables and execute the calculations !!!!
Re: Working with Python (Google Music API)
There are different things you'll need to do depending on how the script is run. Those two pages you are looking at should be enough to get you accessing MM from Python code. If you're just going to launch the script in parallel to MM (from a desktop icon, say) there isn't much else you need to do.
To launch a Python script from within MM, I use this technique:
You'll need the pywin32 package for MM access, which means you'll have the PythonWin IDE to work in. With that, you can try various bits of code interactively; and if you type the name of a MM interface object, and then a dot (.), PythonWin will put up a code-completion window that shows all the accessible member elements. Select one and <tab> to enter that element name as if you'd typed it. (Note that the window also shows a handful of members that you can't actually access: CLSID, AddRef, GetTypeInfo. These are elements of the COM interface that, as a rule, you don't need.)
To launch a Python script from within MM, I use this technique:
Code: Select all
Sub StartPyScript
Set WshShell = CreateObject("WScript.Shell")
Set oFSO = CreateObject("Scripting.FileSystemObject")
' Example: path to the script, in the MM Scripts folder... but could be anywhere
path = SDB.ScriptsPath & "PyScript.pyw"
' Launch the script...
paths = oFSO.GetFile(path).ShortPath
WshShell.Run paths
End Sub
Re: Working with Python (Google Music API)
Yes but I think mcow's solution will invoke the Windows UAC message !!!
Re: Working with Python (Google Music API)
Hey, all. I'm Simon - the one who made the linked api.
I just posted in another thread about creating a syncing tool: http://www.mediamonkey.com/forum/viewto ... 83#p335183. Head over there to check it out; I'm fairly confident my plan will work.
I just posted in another thread about creating a syncing tool: http://www.mediamonkey.com/forum/viewto ... 83#p335183. Head over there to check it out; I'm fairly confident my plan will work.
Re: Working with Python (Google Music API)
I can't specifically say no because I'm not using Windows 7, but on XP I run as an ordinary user and run my scripts all the time with no permissions failure.Thanasis wrote:Yes but I think mcow's solution will invoke the Windows UAC message !!!
Re: Working with Python (Google Music API)
Just an update... I did get started learning Python and playing with all that, but I just have been too busy with gradschool to do a lot. This is something I plan to do someday though. Hopefully someone will come along and do it first
MM to Grooveshark Playlist Sync w/ MonkeyShark.
http://lysle.net/projects/monkeyshark.php
http://lysle.net/projects/monkeyshark.php
Re: Working with Python (Google Music API)
I use Windows 7, but I also did not succeed, and this has always been a problem.mcow wrote:I can't specifically say no because I'm not using Windows 7, but on XP I run as an ordinary user and run my scripts all the time with no permissions failure.Thanasis wrote:Yes but I think mcow's solution will invoke the Windows UAC message !!!