NORDIC included in the end of the name if the release have NORDIC in its name

Support for Ubuntu and other Desktop Linux distributions
Post Reply
Jerome2626
Posts: 25
Joined: 07 Mar 2020, 12:56

NORDIC included in the end of the name if the release have NORDIC in its name

Post by Jerome2626 »

Hi I'm using these AMC scripts and would like to have NORDIC included in the end of the name if the release have NORDIC in its name.

Code: Select all

/storage/local/googleFi_crypt/media/{f =~ /kidsmovies/ ? 'kidsmovies' : 'movies'}/{n} ({y})/{n} ({y}){' CD'+pi}{'.'+lang}

Code: Select all

/storage/local/googleSh_crypt/media/tv/{n} ({y})/{'Season '+s.pad(2)}/{n} - {s00e00} - {t} ({source}-{vf}){'.'+lang}
An example: For All Mankind S03E06 NORDiC 1080p ATVP WEB-DL DD5 1 should be renamed to have NORDIC.
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: NORDIC included in the end of the name if the release have NORDIC in its name

Post by rednoah »

e.g.

Code: Select all

{ fn.match(/NORDIC/) }
:arrow: viewtopic.php?t=12643



:idea: Alternatively, you can also re-use the Kids Movies if-then-else that you are already familiar with and adjust it for the task at hand:

Code: Select all

{ f =~ /NORDIC/ ? 'NORDIC' : '' }
:idea: Please read the FAQ and How to Request Help.
Jerome2626
Posts: 25
Joined: 07 Mar 2020, 12:56

Re: NORDIC included in the end of the name if the release have NORDIC in its name

Post by Jerome2626 »

That works perfect for the second suggestion.
The first I couldn't get to work in the script.
Second question.
Can you also help since Filebot names WEB-DL-xxxx but I want WEBDL-xxxx since that's the Sonarr naming.
Thanks for the help.
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: NORDIC included in the end of the name if the release have NORDIC in its name

Post by rednoah »

e.g.

Code: Select all

{ source.replace('WEB-DL', 'WEBDL') }


:idea: Alternatively, you can also re-use the Kids Movies if-then-else that you are already familiar with and adjust it for the task at hand:

Code: Select all

{ source =~ /WEB-DL/ ? 'WEBDL' : source }
:idea: Please read the FAQ and How to Request Help.
Jerome2626
Posts: 25
Joined: 07 Mar 2020, 12:56

Re: NORDIC included in the end of the name if the release have NORDIC in its name

Post by Jerome2626 »

If I use the first suggestion I get
filename (WEB-dl-1080p) WEB-dl.mkv
Jerome2626
Posts: 25
Joined: 07 Mar 2020, 12:56

Re: NORDIC included in the end of the name if the release have NORDIC in its name

Post by Jerome2626 »

Got it working:)

Code: Select all

/storage/local/googleSh_crypt/media/tv/{n} ({y})/{'Season '+s.pad(2)}/{n} - {s00e00} - {t} ({ source.replace('WEB-DL', 'WEBDL') }-{vf}){'.'+lang} { fn.match(/NORDIC/) }
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: NORDIC included in the end of the name if the release have NORDIC in its name

Post by rednoah »

The snippet above is of course just the code generates the WEBDL bit. You'll want to combine that with the format you already have that generate the other bits of the target file name.

e.g.

Code: Select all

/storage/local/googleSh_crypt/media/tv/
{n} ({y})/
{'Season '+s.pad(2)}/
{n} - {s00e00} - {t} 
({ source.replace('WEB-DL', 'WEBDL') }-{vf})
{ fn.match(/NORDIC/) }
{'.'+lang}
:idea: Please read the FAQ and How to Request Help.
Jerome2626
Posts: 25
Joined: 07 Mar 2020, 12:56

Re: NORDIC included in the end of the name if the release have NORDIC in its name

Post by Jerome2626 »

Yes you are correct I got it working, just overlooked it. I'm not normally working with coding.
Thanks for an excellent program and support.
Post Reply