Support for Ubuntu and other Desktop Linux distributions
Jerome2626
Posts: 25 Joined: 07 Mar 2020, 12:56
Post
by Jerome2626 » 11 Aug 2022, 12:28
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.
rednoah
The Source
Posts: 21496 Joined: 16 Nov 2011, 08:59
Post
by rednoah » 11 Aug 2022, 16:23
e.g.
viewtopic.php?t=12643
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:
Jerome2626
Posts: 25 Joined: 07 Mar 2020, 12:56
Post
by Jerome2626 » 12 Aug 2022, 12:49
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.
rednoah
The Source
Posts: 21496 Joined: 16 Nov 2011, 08:59
Post
by rednoah » 12 Aug 2022, 15:15
e.g.
Code: Select all
{ source.replace('WEB-DL', 'WEBDL') }
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 }
Jerome2626
Posts: 25 Joined: 07 Mar 2020, 12:56
Post
by Jerome2626 » 16 Aug 2022, 10:21
If I use the first suggestion I get
filename (WEB-dl-1080p) WEB-dl.mkv
Jerome2626
Posts: 25 Joined: 07 Mar 2020, 12:56
Post
by Jerome2626 » 16 Aug 2022, 10:43
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/) }
rednoah
The Source
Posts: 21496 Joined: 16 Nov 2011, 08:59
Post
by rednoah » 16 Aug 2022, 10:44
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}
Jerome2626
Posts: 25 Joined: 07 Mar 2020, 12:56
Post
by Jerome2626 » 16 Aug 2022, 10:50
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.