SQL query - now playing

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

Moderators: Gurus, Addon Administrators

gstark

SQL query - now playing

Post by gstark »

I'm wanting to develop a simple php script that lets me do stuff (like tweet) what I'm currently listening to.

I can find the record in the database for the tune that's just finished playing, but I cannot seem to find where the song that's currently played is recorded.

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

Re: SQL query - now playing

Post by trixmoto »

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.
gstar
Posts: 2
Joined: Mon Sep 08, 2014 8:56 pm

Re: SQL query - now playing

Post by gstar »

Thank you, but that looks like a VB script object. I'm wanting to grab this data using php.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: SQL query - now playing

Post by trixmoto »

You can access the object using php as well... http://php.net/manual/en/class.com.php

I don't think the database is updated when a track starts playing, but you could maybe create a script that did.

Or you could look at my Now Playing FTP script. This would use FTP to upload a file to your website with the details and then your php script could read the file.
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.
gstar
Posts: 2
Joined: Mon Sep 08, 2014 8:56 pm

Re: SQL query - now playing

Post by gstar »

Thanks for your help.

Like Thursdays, I never could get the hang of com objects; I guess I'm not a com object kind of guy - been doing this stuff way too long. And getting way too old. :)

That said, I've been able to get what I wanted done using the event logger's output, and I've now got some PHP script working using either MySQL or SQLite, and automatically posting the details of the current song being played to my Twitter account.

Should be portable across LAMP/WAMP/XAMP provided that there's access to the event logger's output.
Post Reply