INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Get list of MP3 files in MJ's database  (Read 2328 times)

mi5

  • Regular Member
  • Recent member
  • *
  • Posts: 16
Get list of MP3 files in MJ's database
« on: September 13, 2003, 09:14:29 am »

I'm new here, but I thought this must have been
done by now:  I'd like to access the MJ master
database directly, to get titles, artist name, etc.

Is this possible?  If so, has source been posted?

mi
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20062
Re: Get list of MP3 files in MJ's database
« Reply #1 on: September 13, 2003, 09:30:34 am »

are you talking about exporting the database to another format? and then maybe printing it?

you can access the database by using the SDK if you wish to program somthing for it.
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

mi5

  • Regular Member
  • Recent member
  • *
  • Posts: 16
Re: Get list of MP3 files in MJ's database
« Reply #2 on: September 13, 2003, 10:38:44 am »

Quote
are you talking about exporting the database to another format? and then maybe printing it?

you can access the database by using the SDK if you wish to program somthing for it.


Thanks for your reply, KS.

Yes, print it or alter it for display or cataloging.

I guess the SDK 'CMJSchemeAutomation' calls can
access the library (right?), but I was wondering if anyone with experience with the JRiver interface has
already written similar programs and posted source
for them. That would provide useful perspective.
Logged

Soundman

  • Regular Member
  • World Citizen
  • ***
  • Posts: 155
  • Go Music!
Re: Get list of MP3 files in MJ's database
« Reply #3 on: September 15, 2003, 07:33:14 am »

Hello, mi5.

You can dump the entire database to a delimited ASCII file by doing this:

Select "Media Library" in the tree, so that your entire library is included in the lsit.

Under the File menu, choose "Export Playlist..."
Pick "ASCII Delimited" format, and choose "All Fields".

This will dump your entire database to the file in such a way that it is easy to import it into other software.

If you want to use the SDK, I may be able to post some sample code tomorrow in JavaScript or Perl.  If you want a C++ example, look at the web_remote plugin in the developers Zone: http://www.musicex.com/mediajukebox/developers.html

That URL goes to the MJ8 Developers Zone.  The MC9 Developers Zone is here, but it does not include the web_remote example: http://www.musicex.com/mediacenter/devzone.html

Good Luck!
Soundman
Logged

Polonio

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 324
Re: Get list of MP3 files in MJ's database
« Reply #4 on: September 19, 2003, 06:51:35 pm »

Quote
I'm new here, but I thought this must have been
done by now:  I'd like to access the MJ master
database directly, to get titles, artist name, etc.

Is this possible?  If so, has source been posted?

mi


Here is a sample. It is my first MC development, so probably things could be made better, but it works. It is written in Visual Basic .NET

   Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
       Dim n As Int32
       Dim i As Int32

       Dim mc As MediaJukebox.IMJAutomation
       Dim fs As MediaJukebox.IMJFilesAutomation
       Dim f As MediaJukebox.IMJFileAutomation

       mc = New MediaJukebox.MJAutomation()
       fs = mc.GetViewScheme("Audio").GetFiles
       n = fs.GetNumberFiles

       Me.ProgressBar1.Maximum = n
       Me.ProgressBar1.Minimum = 0
       Me.ProgressBar1.Value = 0

       For i = 0 To n - 1
           f = fs.GetFile(i)
           Debug.WriteLine f.Artist & " - " & f.Name
           Me.ProgressBar1.Value = i
           Me.Refresh()
       Next

   End Sub

Logged

sraymond

  • Guest
Re: Get list of MP3 files in MJ's database
« Reply #5 on: October 02, 2003, 09:43:40 pm »

Soundman,

You wrote:
Quote
If you want to use the SDK, I may be able to post some sample code tomorrow in JavaScript or Perl.


I've been thinking about this topic for another thread (http://www.musicex.com/cgi-bin/yabb/YaBB.cgi?board=MediaCenter;action=display;num=1065142102).

How hard do you think it would be to use JavaScript to create an XML object from the MC database (conforming to the "Export to XML" schema) using the SDK.  I haven't programmed seriously in about ten years (and then it was C++) and I have just a little experience with JavaScript (mostly what I needed to work with ASP generated by Dreamweaver) - but this sounds like something that might be interesting.

Of course, I'd need a bit of a nudge (i.e.  some sample code in JavaScript)...  or maybe someone would be willing to do this for the community?

Am I the only one that thinks it'd be great to be able to use an HTML document and client-side script (JavaScript) to get a real-time hook to the MC database, create an XML object, apply an XSLT and display the result in a new window?  A great model of how this works is the "FeedDemon" RSS feed aggregator (http://www.feeddemon.com).  Users have written some great XSLT to customize how the feeds are displayed.

Scott-
Logged

Soundman

  • Regular Member
  • World Citizen
  • ***
  • Posts: 155
  • Go Music!
Re: Get list of MP3 files in MJ's database
« Reply #6 on: October 07, 2003, 07:33:33 pm »

Scott,

OK. I was wanting to refine my JavaScript some more before posting it, but that may be weeks away.  So I'll try to get it together and post it asap.  My code is for a totally different purpose than what you describe, but it should provide a basis for some JavaScript syntax, looping through the media library, and the like.

Soundman
Logged

sraymond

  • Guest
Re: Get list of MP3 files in MJ's database
« Reply #7 on: October 07, 2003, 08:03:00 pm »

Soundman,

I'd greatly appreciate it...  it should give me some ideas for creating an XML object of the MC database directly from IE.  Thanks!

Scott-
Logged

sraymond

  • Guest
Re:Get list of MP3 files in MJ's database
« Reply #8 on: October 12, 2003, 06:31:03 pm »

Soundman,

I read about your interest with WebRemote.  Is there a possibility that its functionality would someday be expanded to allow a playlist export (in MPL format) functinoality?

Scott-
Logged
Pages: [1]   Go Up