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?
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.
Again, so you want to be a programmer?
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.