Page 1 of 1

add WEBRip to a file but only if the source is unknown?

Posted: 06 Dec 2021, 14:46
by cagenuts
Hi there

I'm running 4.9.4

Two part question if I may please.

1. Is there a way to add WEBRip to a file but only if the source is unknown?
My preset looks like this;

Code: Select all

{fn}{".$source".upper()}{".$hpi"}{".$vcf"}{".$ac"}{".$channels"}{".$abr"}{".$textLanguages"}
and I'd like the output to be something like;

Code: Select all

{fn}.WEBRip{".$hpi"}{".$vcf"}{".$ac"}{".$channels"}{".$abr"}{".$textLanguages"}
I don't want to capitalize the word WEBRip though, hence my question.

2. If I have a file such as this;

Code: Select all

Bridget Riley Painting the Line (2021) - 720 rf-19.mp4
Is there a way to ignore everything past the name (delete space dash space 720 etc)? This works if matching a database but if it's a single episode documentary then it doesn't work using plain file.

Thank you.

Re: add WEBRip to a file but only if the source is unknown?

Posted: 06 Dec 2021, 15:36
by rednoah
1.
e.g.

Code: Select all

{ '.' + any{ vs }{ 'WEBRip' } }
:idea: viewtopic.php?t=1895


2.
If all your files follow the <name> - <clutter> pattern then a custom format for Plain File Mode should be rather straight-forward:

Code: Select all

{ fn.before(/ - /) }

Re: add WEBRip to a file but only if the source is unknown?

Posted: 06 Dec 2021, 16:07
by cagenuts
Thank you very much. Appreciate the quick response.