Scripting Multi-part Extensions

Hi

What is the best approach to deal with multipart extensions, in my case I need .<lang code>.[forced].{ext} treated as a single extension? Could a scripted Addin be used to identify the extension?

Background....

I've worked with the multipart_extensions advanced setting, but it doesn't seem to be enough for what I need at the moment.

While ripping a number of DVD's, I end up with files like

episode 1.mp4
episode 1.sub
episode 1.idx

Where the "sub" and "idx" files are two parts of the same subtitle.

This is mostly fine, but the language detail is missing. I use 'Plex' regularly for media management, and it solves this by expecting

episode 1.<lang code>.<ext>

The problem is, when there are multiple languages, I need to end up with

episode 1.mp4
episode 1.en.sub
episode 1.en.idx
episode 1.fr.sub
episode 1.fr.idx
episode 1.de.sub
episode 1.de.idx

While I mostly don't care for english TV shows (I tend to discard the subtitles), when the spoken language is foreign (usually japanese), I want to keep the local language subtitles, and name them so plex knows they are local language and can apply them automatically when the audio track is tagged as a foreign language.

In addition, I have DVDs with english audio, but subtitled foreign parts..
To tell plex a particular subtitle should be enabled automatically despite the language appearing to be local, you simple add a forced keyword, as in

episode 1.en.forced.sub
episode 1.en.forced.idx

Is there a way to intelligently and programmatically deal with extensions containing lots of parts?
Even support for wildcards or regular expressions in the "multipart_extension" field would probably be sufficient.

Many Thanks

Sounds like a job for a custom column. Try this Add-in, it might be all you need:

1 Like

I use this sort of custom column to pick details out of filenames. Eg I have a custom column which takes Episode 1 - S01E02.mkv and gives me a season column containing "Season 1", or an episode column showing "S01E02". Grouping files by season works well, and grouping by episode is a quick way to visually deal with duplicates.

The problem is more with the mass "rename" functionality in Opus. It treats extensions specially, so I need to script the rename process if my idea of what the extension is doesn't match Opus's.

Also, hitting F2 and having the rename functionality highlight the main name, and skip the extended extension would be magic. I often rename one part manually, his F2 (to highlight the stem) Ctrl-C, then use the cursor keys to highlight each file which is part of that episode in order and paste the new name. None if this works if Opus and I can't agree on which part is the STEM and which part is the EXT.

This all works for tar.gz for example because Opus instinctively understands compressed and split archives, but to add ALL the extensions I need would be huge (and a lot of work).

I could always generate the entire list with a script and paste them into userprefs.oxc, then see if there was a noticable performance impact.

I scripted the creation of all the combinations of extensions from a couple of languages and a couple of extensions to get a total of 36 multipart extensions which I then pasted into the advanced settings.

No noticable performance change, but there is one thing I didn't count on.

An episode split across multiple files is handled via '-partX'..

So an episode in two parts is

Episode 1-part1.mp4
Episode 1-part2.mp4

Since the '-partX' is technically NOT part of the extension, is there any way for me to script DOpus to support something like this as if it were an extension?

Thanks again.

I think extensions have to start with a dot.