INTERACT FORUM

Please login or register.

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

Author Topic: MC XML Export beta 2  (Read 2288 times)

scott_r

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 306
MC XML Export beta 2
« on: November 03, 2003, 08:18:07 am »

OK.

I decided to release what I've got working so far, which is slightly less than what's shown in the preview screenshot in the 0.1.0 thread.

Make sure you un-install beta 1 before installing beta 2.
Uninstalling will cause you to lose settings. Sorry, this won't happen in future releases (I hope).

Here's beta 2:
http://homepages.paradise.net.nz/~scottray/mcxml/MC XML Export beta2.msi

Changes:
-You can now apply an XSL transformation and save the output.
For XSL transforms you'll need the .NET Framework version 1.1
-Added ability to select view schemes as well as playlists.
-Tree-view style selection of import files.
-Re-worked GUI to make future stuff possible.
-A few bug fixes.
-Lots of messing around with internal stuff.
-Maybe some other stuff I've forgotten about.

Stuff I'm Working On For The Next Beta:
-Ability to have preset configurations
-Ability to save coverart to a certain folder which will be referenced by the XML output - allows publishing of XAlbum output.
-Other suggestions welcome.

Have a great day.

Scott.
Logged

nila

  • Guest
Re:MC XML Export beta 2
« Reply #1 on: November 03, 2003, 09:51:50 am »

OT - But how do you do the view schemes in your plugin?
Tried doing it for a plugin and couldn't get it to work?
Logged

NoCodeUK

  • Citizen of the Universe
  • *****
  • Posts: 1820
Re:MC XML Export beta 2
« Reply #2 on: November 03, 2003, 03:24:17 pm »

Scott...you are amazing!! Thank you very much!

Adam
Logged
"It's called No Code because it's full of code. It's misinformation." - Eddie Vedder

sraymond

  • Guest
Re:MC XML Export beta 2
« Reply #3 on: November 03, 2003, 09:14:42 pm »

Scott.,

This version works great for me...  just two small issues.

1)  Firebird doesn't seem to like the xml-stylesheet processing instruction:
Code: [Select]
<?xml-stylesheet type='text/xsl' href='C:\Program Files\J River\Media Center\XMLDevelopment\AlbumGroupIE6.xsl'?>But if you prefix the href with "file://", it works fine (in both IE6 and Firebird).  For example:
Code: [Select]
<?xml-stylesheet type='text/xsl' href='file://C:\Program Files\J River\Media Center\XMLDevelopment\AlbumGroupIE6.xsl'?>
2)  Might it be useful to provide a specific option to save (or not) the exported XML?  I'm thinking that in the case of applying an XSLT transformation, the intermediate export doesn't always serve a purpose.  So perhaps the plugin menu could look something like:
Quote
+ Export XML
    [] Save As <>
    [] Include xsl-stylesheet Processing Instruction <>
    + Character Encoding <>

[] Apply XSLT Transformation
   - XSLT to Apply <>
   - Save Output as <>

[] Launch Output File
where the "+" are always required, the "[]" is an option, and the "-" is required whenever the parent option is selected.

Again, the plugin is great!  A know at least a handful of us *really* appreciate it...  and with preconfigured options, a lot more will come to use it.

I wonder if there's a way to do Nila's Website Creator with XSLT...  the only issue would be creating separate pages (if they're really needed?).  Man!  I'm starting to see XML as a solution to everything.  I need to temper that a bit!

Scott-
Logged

scott_r

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 306
Re:MC XML Export beta 2
« Reply #4 on: November 03, 2003, 09:51:02 pm »

Quote
OT - But how do you do the view schemes in your plugin?
Tried doing it for a plugin and couldn't get it to work?

For the playlists, I used the MJViewItemAutomation interface to recursively step through the Playlist tree and add nodes to a TreeNode object in VB.NET, then assigned the TreeNode as a root node of a TreeView control. MJViewItem lets you see if a node has children, what their names are, etc.
For some reason the MJViewItemAutomation interface didnt work for ViewSchemes, so I had to write a separate recursive function to step through the View Schemes tree using a MJSchemeAutomation interface.

I don't know how VB6 handles trees, so I wouldn't know how to do it in VB6.

It went a little something like this: (in VB.NET)
Quote
Private Function populatePlaylists()
  Dim viewitem As MediaJukebox.MJViewItemAutomation
  Dim rootnode As New TreeNode()
  viewitem = g_MJ.GetViewItem("Playlists")
  rootnode = treViewSchemes.Nodes.Add("Playlists")
  rootnode.Nodes.Add(nextNodeItem(rootnode, viewitem))
End Function

Where nextNodeItem is defined as:
Quote
Private Function  nextNodeItem(ByVal currentnode as TreeNode, ByVal currentviewitem as MJViewItemAutomation) As TreeNode
...
End Function

nextNodeItem builds the tree recursively under currentnode using currentviewitem as it's starting point in the MC tree.

Similarly for ViewSchemes, except use a MJSchemeAutomation instead of a MJViewItemAutomation.

Hope this helps,

Scott.
Logged
Pages: [1]   Go Up