Doing some optimizing in my media library. For subtitles i have 3 options available at the most. Some titles may have 1 while others may have all 3 language options. Those subtitle language options are
.nl, .en, and .en.cc
However i noticed that for some they're .en[cc].srt and for others .en.cc.srt
For playback i primarily use plex and just now noticed it properly tags .en.cc as English HH (Hard of Hearing), but on first glance it doesn't for files named .en[cc].srt
I can't figure out how to rename all .en[cc] to .en.cc, AND keep the .cc tag. My current format "{n} - {s00e00} - {t}{'.'+lang.ISO2}" strips the language to .en entirely. Any quick way to fix that?
keep / rename cc tag
Re: keep / rename cc tag
e.g.
We use the \b word boundary because we want to match [cc] but not accent.
[SNIPPET] Match information from the file path
You can use if-then-else if you want to add .HI to files that match the given cc pattern:
Code: Select all
{ '.' + fn.match(/\b(cc)\b/) }


You can use if-then-else if you want to add .HI to files that match the given cc pattern:
Code: Select all
{ fn =~ /\b(cc)\b/ ? '.HI' : null }