Search found 122 matches: conditional

Searched query: +conditional

by rednoah
04 Mar 2025, 09:47
Forum: Synology NAS & Embedded Linux
Topic: [ENTRYPOINT] Help creating custom automation (Noob)
Replies: 5
Views: 1601

Re: Help creating custom automation (Noob)

... VR / etc differently from other content, assuming there is some way to tell which is which. The {s3d} binding, the MediaInfo Inspector , and Conditional Structures (if-then-else) will get you started. B. FileBot does not have the concept of a confidence score. You'll want to use Strict Mode if ...
by rednoah
11 Jan 2025, 15:43
Forum: Episode / Movie Naming Scheme
Topic: Conditional titles using {localize} based on unique audio tracks
Replies: 3
Views: 1529

Re: Conditional titles using {localize} based on unique audio tracks

:arrow: I think you mean to name files based on the original language according to the database, and not the audio stream language: { language ==~ /deu/ ? localize.de.n : n } :arrow: Checking if the file only contains German language audio streams is of course possible too: { audioLanguages.ISO3 ...
by ye62dzec
11 Jan 2025, 01:52
Forum: Episode / Movie Naming Scheme
Topic: Conditional titles using {localize} based on unique audio tracks
Replies: 3
Views: 1529

Re: Conditional titles using {localize} based on unique audio tracks

This works almost perfectly. Is there a way to check whether it's the only languague?

This movie is not correctly renamed:

Code: Select all

N:\Filme\Flüstern des Meeres - Ocean Waves (1994) - [DE, JA] [1080p x264] [5.1GB]\Flüstern des Meeres - Ocean Waves (1994) - [DE, JA] [1080p x264] [5.1GB].mkv
by ye62dzec
10 Jan 2025, 14:32
Forum: Episode / Movie Naming Scheme
Topic: Conditional titles using {localize} based on unique audio tracks
Replies: 3
Views: 1529

Conditional titles using {localize} based on unique audio tracks

... know I can use the {localize} binding for German titles, but I'm not sure how to combine this with a check of unique {audioLanguages} to make it conditional. Can you help me modify my format to implement this logic? Currently getting: [deu]/[DE] → Should use German title anything else → Should keep En ...
by rednoah
10 Aug 2024, 04:25
Forum: Help and Support
Topic: Help with sorting to different drives
Replies: 4
Views: 6369

Re: Help with sorting to different drives

e.g.

Format: Select all

{ vc == 'x264' ? 'F:/Movies (x264)' : 'I:/Movies' }/{ ~plex.id }
:arrow: Conditional Structures (if-then-else)
by SergeiAK
01 Aug 2024, 16:20
Forum: Episode / Movie Naming Scheme
Topic: How can i use "if" whith Filebot for choosing right title?
Replies: 11
Views: 9531

Re: How can i use "if" whith Filebot for choosing right title?

... not available in TMDB i prefer English instead original title. For example this Italian movie: Gli ultimi giorni di Pompei (1959). TMDB has not Russian titles. I understand how Conditional Structures works, but my question is how to set condition: if title in Russian is not found in TMDB or TVDB......
by rednoah
01 Aug 2024, 10:40
Forum: Episode / Movie Naming Scheme
Topic: How can i use "if" whith Filebot for choosing right title?
Replies: 11
Views: 9531

Re: How can i use "if" whith Filebot for choosing right title?

:?: Do you have a specific example? Which movie? Which non-English language?


e.g. Pan's Labyrinth (2006) in Spanish

Format: Select all

{
	language =~ /spa/ ? primaryTitle : n
}

Code: Select all

El laberinto del fauno

:arrow: Conditional Structures (if-then-else)
by rednoah
21 Jun 2024, 03:50
Forum: Windows
Topic: Simply append the letters "4K" to a filename after renaming
Replies: 5
Views: 4693

Re: Simply append the letters "4K" to a filename after renaming

... then you'll want do start with something like this: { plex.id % { if (height > 2000) ' [4K]' } } NOTE: In this case, we do not simply append "4K" to the file name, and instead only add "4K" to video files that actually have a 4K video resolution. See Conditional Structures (if-then-else) for details.
by rednoah
04 Jun 2024, 09:21
Forum: Episode / Movie Naming Scheme
Topic: Plex Id Derive with Edition Tag
Replies: 3
Views: 2071

Re: Plex Id Derive with Edition Tag

Everything is always possible, this one is easy too:

Format: Select all

{ edition != 'Remastered' ? " {edition-$edition}" : null }

Format: Select all

{ none{ edition.match(/Extended|Theatrical|Remastered/) } ? " {edition-$edition}" : null }
:arrow: Conditional Structures (if-then-else)
by rednoah
02 Mar 2024, 03:08
Forum: Episode / Movie Naming Scheme
Topic: Renaming all folder/files but {vf} syntax error
Replies: 6
Views: 2846

Re: Renaming all folder/files but {vf} syntax error

:arrow: Moving files to different folders based on some condition is very easy. See Conditional Structures (if-then-else) for details and examples: e.g. Move 4K movies and normal movies into different folders: { height > 2000 ? '4K Movies' : 'Movies' } :arrow: If you want to only select specific files ...
by rednoah
21 Nov 2023, 10:59
Forum: Scripting and Automation
Topic: sort series movies with genre in different folder
Replies: 5
Views: 4475

Re: sort series movies with genre in different folder

Yes, you can use {genres} to access the list of genres from the database and the generate file paths accordingly. e.g. Conditional Structures (if-then-else) e.g. Move Documentary episodes and normal TV series episodes into different folders: { genre ==~ /Documentary|News/ ? 'Documentaries' : 'TV Shows ...
by zhyp
05 Nov 2023, 04:51
Forum: Help and Support
Topic: Rename subs with lang codes to {vs}{vf} without causing problems
Replies: 2
Views: 1277

Rename subs with lang codes to {vs}{vf} without causing problems

... only the seriessub.eng, causing a big problem (even overwriting some language codes along the way), resulting on something like this at the end: "seriessub.eng [1080p-BluRay].srt". I did thinker with conditional statements, but couldn't get it to work properly without causing extra problems. Thanks.
by rednoah
24 Sep 2023, 11:15
Forum: Episode / Movie Naming Scheme
Topic: Match Single Genre Documentary Movies
Replies: 4
Views: 1698

Re: Match Single Genre Documentary Movies

... negative example? i.e. TMDB link for one movie that only has "Documentary" in the genre list, and another that has multiple genres? In general, Conditional Structures (if-then-else) can be arbitrarily complex and check for multiple things if that's what you want: { genres[0] == 'Documentary ...
by rednoah
13 Sep 2023, 09:12
Forum: unRAID & docker
Topic: Audiobookshelf - Folder/File Format
Replies: 14
Views: 18518

Re: Audiobookshelf - Folder/File Format

... Here/Author/Title(year)/Title Possible. But how do you know if a book is part of a series of books? Based on ID3 Tags ? Based on file name patterns? Based on other files in the same folder? Anything is possible, if you can express the condition in code . :arrow: Conditional Structures (if-then-else)
by Xvonmox
20 Aug 2023, 22:44
Forum: Scripting and Automation
Topic: No Matching Genre - How to file in separate folder
Replies: 8
Views: 5561

Re: No Matching Genre - How to file in separate folder

What if you are trying to include a conditional argument IF a genre exists? For example FileBot gives off the following error when trying to reference the {genre} tag in the naming format on the TV Show "Parking Wars". Binding "genre": NoSuchElementException Using your example from above... {any{genre ...
by yellowdaemon
24 Jul 2023, 15:43
Forum: Scripting and Automation
Topic: Empty CD folder (When use format)
Replies: 38
Views: 11330

Re: Empty CD folder (When use format)

... False, 'translate artist names': False, 'line 1': {'source': 'album_soloists, album_ensembles, album_conductors', 'tag': 'artist, artists', 'conditional': False}, 'line 2': {'source': 'recording_artists', 'tag': 'artist, artists', 'conditional': True}, 'line 3': {'source': 'soloist_names ...
by Philmag
10 Mar 2023, 07:42
Forum: Help and Support
Topic: appending subtitles with .sdh postfix based on text inside the subtitle file
Replies: 14
Views: 5415

Re: appending subtitles with .sdh postfix based on text inside the subtitle file

... all the files to be appended with .test here, since none of them have more than 1000 hits. It seems like a boolean error? the logic operation is conditional on the 'matchAll' returning something , and if it doesn't then it unravels and stops the "else" from being triggered. That's just a gut feeling ...
by rednoah
24 Jan 2023, 03:38
Forum: Windows
Topic: Use a different Show Name
Replies: 2
Views: 3544

Re: Use a different Show Name

Is it possible to use .replaceTrailingBrackets() on a specific TV Show? Yes. Generic Answer : :arrow: Use Custom Series Names :arrow: Conditional Structures Specific Answer : If you need a specific answer for your specific user case, please post sample file paths as text for testing. Please read How ...
by cuneglas
11 Apr 2022, 13:32
Forum: Scripting and Automation
Topic: Conditional command depending on file type
Replies: 4
Views: 2735

Re: Conditional command depending on file type

It work like a charm, I just had to add the missing {pi.pad(2)+'.'}.

Thank you very much for your help

Thanks for the tip about external *.groovy text file.
by rednoah
11 Apr 2022, 01:59
Forum: Scripting and Automation
Topic: Conditional command depending on file type
Replies: 4
Views: 2735

Re: Conditional command depending on file type

You can just copy & paste things together. Each {...} expression can be used independently. Only you can know where you want which piece of information. ;) e.g. {albumArtist0 = albumArtist.sortName().charAt(0); albumArtist0.isDigit() ? '0-9' : albumArtist0}/ {music.albumArtist.upperInitial().slash ...
by cuneglas
10 Apr 2022, 20:44
Forum: Scripting and Automation
Topic: Conditional command depending on file type
Replies: 4
Views: 2735

Re: Conditional command depending on file type

Thanks for you prompt reply. MP3 files with media.PartPosition have a numeric value relative to the disc number. In the case of FLAC files the disk number is given by the Part parameter. If you run the command made for FLAC files without the --file-filter on MP3 files the filename gets only the ...
by rednoah
10 Apr 2022, 09:45
Forum: Scripting and Automation
Topic: Conditional command depending on file type
Replies: 4
Views: 2735

Re: Conditional command depending on file type

You can make your command smart and generate different paths for different files based on different code paths: e.g. take media.Part , and if undefined take media.PartPosition , and if still undefined return null , which in turn makes the subsequent String.concat() method call fail the expression ...
by cuneglas
10 Apr 2022, 09:23
Forum: Scripting and Automation
Topic: Conditional command depending on file type
Replies: 4
Views: 2735

Conditional command depending on file type

I had this command to process MP3/M4A filebot -rename "/input/" -r --output "/output/" --format "{albumArtist0 = albumArtist.sortName().charAt(0); albumArtist0.isDigit() ? '0-9' : albumArtist0}/{music.albumArtist.upperInitial().slash(', ')}/{album.upperInitial().colon(' -')} ({y})/{media ...
by rednoah
06 Feb 2022, 01:33
Forum: Scripting and Automation
Topic: "HDR" Added to Every Movie Title
Replies: 4
Views: 4894

Re: "HDR" Added to Every Movie Title

... i.e. non-HDR files) , then the {...} block will error out so any equality checks that you might have there will never actually get executed if HDR doesn't have some value. :idea: Please read Conditional Structures (if-then-else) and Learn how {expressions} work and useful Helper Functions for details.