topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • September 21, 2018, 07:02 PM
  • Proudly celebrating 13 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: IDEA: Need an .MPCPL file editor  (Read 2786 times)

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,973
    • View Profile
    • Donate to Member
Re: IDEA: Need an .MPCPL file editor
« Reply #25 on: April 03, 2018, 04:15 PM »
Okay, so let me give you the short version of the results. It works great! I'll admit it threw me for a moment when I loaded up an MPCPL file that used LABEL and SUBTITLE because each "line" is in a separate column. But admittedly, that probably makes it even easier to code. If the column is blank, you don't need to "write" that line to the final file. Very elegant.

Correct.  At first I was going to code it using a treeview but shifting lines in a listview is a lot easier than a treeview (with its parent and child components).

Now, being the kind of person that I am, I'd like to request one more feature. Is it possible to either allow creating new lines? Or better still, allow dragging and dropping media files into the window so that they simply get added in as lines (probably at the bottom of the list)? True, you'd (by default) only fill in TYPE and FILENAME, but that's okay. If I need to I could add the LABEL when necessary and/or add a SUBTITLE file if needed. Aside from that, it really works great!

This is already in my private build that I haven't uploaded yet because I'm not quite decided on how to handle things.  Here are some thought points:
  • Do I restrict the dropped files to known media file types?  MP3, MP4, AVI, MKV, etc.  If so, who handles this list?  Me, internally?  The user?  What happens when a new format comes out? Either I have to create an update to add or the user has to remember to add the new extension to a list (probably would not happen).  Neither is an elegant. 
  • Or, do I just go ahead and add anything the user drops and let them delete files they didn't intend?  This is probably the way I will go.  Basically, only the filename and type columns will get populated but you will be able to add label and/or subtitle data like you can now.
  • Now...how to handle MPCPL files that are included in a group of media files?  Just skip?  Or, add the MPCPL contents to the list, too?

Oh, the joys of trying to predict and handle user interaction...so you want to be a programmer, eh?   ;D ;D ;D

On a weird side note, I tried dragging a media file into the editor, and it DID give me the cursor with a (+) symbol beneath the arrow just like if I was dragging a file from one folder to another. But when I let go of the mouse button, nothing happened. I'm guessing that's only because of the window class that you used that the (+) sign got carried along.

Yep, right now it's coded to only process the first MPCPL file it sees out of whatever you drop.  I plan to change the code to process all MPCPL files that are dropped, adding all the contents to the list.

P.S. What caused the error, by the way?

I realised that I had forgotten to update the Help > Contents section so I quickly updated it and recompiled without testing it.  Unfortunately, I was missing an end parenthesis ")".  Boom.   :down:  Again, so you want to be a programmer?   :P :P :P

Oh, one more thing. I really like the fact that you provided an INI file, because I really wanted to put the LABEL column to the RIGHT of the FILENAME column, and I CAN!.

You can simply drag-and-drop the columns around and their order and width should be saved.  No need to manually edit the INI file.

I've tested it out on over a dozen (copies) of my MPCPL library, and no problems at all.

Awesome.  That's encouraging to hear at this early stage.

Oh, by the way, just for aesthetic purposes, you might want to make the "Save MPC Playlist" line instead say:

"Save MPC Playlist as"
That way it more closely indicates what it does, because the first time I saved it, I worried for a minute... "Is this going to overwrite the original?"

I actually waffled back and forth on this a bit.  I've added the "as" back in my build.

maybe make the CTRL-S key combo work for that? I mention that last because CTRL-O opens an MPCPL file, so CTRL-S would be a perfect match to it.

This was an oversight on my part and has been added to my build.

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,973
    • View Profile
    • Donate to Member
Re: IDEA: Need an .MPCPL file editor
« Reply #26 on: April 05, 2018, 01:45 PM »
I've uploaded the v1.0.1 build with the following:

v1.0.1 - 2018-04-05
    + Added ability to handle multiple MPCPL files dropped on the form.
    + Non-MPCPL files get added to the list now as well.
    + Added "Always on Top" option to the View menu.


Get it here: http://www.dcmembers.../mpcpled/MPCPLed.zip
« Last Edit: July 18, 2018, 01:32 PM by skwire »