Netflix, Amazon and others Naming Scheme

All about user-defined episode / movie / file name format expressions
Post Reply
deejayexe
Posts: 8
Joined: 19 Jun 2022, 23:41

Netflix, Amazon and others Naming Scheme

Post by deejayexe »

Hi!
I have been working for a long time with a script for movies and tv shows and I already have it almost as I want except for cases where the fields are not present:

Code: Select all

[{fn.match(/ATVP|ATVP[+]|ATV|AMZN|DSNP[+]|DSN[+]|DSNP|DSNY|Disney[+]|DisneyPlus|HBO|HMAX|HULU|NF|IMAX|FLMN/)}
And in my example:
Petite maman (2021) [WEB-DL 1080p AVC ES-FR DD 5.1 Subs]

As I have it, it returns this, with a space after [ -> Petite maman (2021) [ WEB-DL 1080p AVC AC3 5.1 AC3 5.1 Subs] [7.4 Mbps] {tmdb-749004}

Since in this case I don't have any streaming as NF, how could I not have a space between the "[" and WEB-DL?
In this example i dont have any problem:
Sex Appeal (2022) DSNP WEB-DL 1080p DDP5.1 H264 -> Sex Appeal (2022) [DSNP WEB-DL 1080p AVC EAC3 5.1 EAC3 5.1 Subs] [6.6 Mbps] {tmdb-803104}

Until now I have had it with two similar scripts one for when there are streaming fields and one without but now I want to do it directly in a single script, how i can solve it?

Thanks 8-)
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Netflix, Amazon and others Naming Scheme

Post by rednoah »

e.g. either "NF " or nothing:

Code: Select all

{ fn.match(/NF/) + ' ' }
:arrow: Learn how {expressions} work and useful Helper Functions



:idea: The {source} source match binding can probably replace your fn.match(/custom pattern/) code:

Code: Select all

{source}
:idea: Please read the FAQ and How to Request Help.
Post Reply