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

Any questions? Need some help?
Post Reply
cagenuts
Posts: 8
Joined: 28 Nov 2021, 17:20

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

Post 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.
User avatar
rednoah
The Source
Posts: 20487
Joined: 16 Nov 2011, 08:59

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

Post 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(/ - /) }
:idea: Please read the FAQ and How to Request Help.
cagenuts
Posts: 8
Joined: 28 Nov 2021, 17:20

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

Post by cagenuts »

Thank you very much. Appreciate the quick response.
Post Reply