Way to add LANGUAGE only when it isn't English?
Is there a way to add a LANGUAGE part in my renaming scheme but only when the language of the movie isn't English? Thx in advance!
The ultimate TV and Movie Renamer
https://www.filebot.net/forums/
Code: Select all
{ audioLanguages =~ /eng/ ? null : audioLanguages }Code: Select all
{ audioLanguages.size() == 1 && audioLanguages =~ /eng/ ? null : audioLanguages }Code: Select all
{plex.name} {allOf{ languages =~ /eng/ ? null : languages.name[0].upper() }{genre}{director}{vf}.joining(', ', ' [', ']')}The Adversary (2002) [FRENCH, Mystery, Nicole Garcia, 1080p]
Thx for the effort! I'm using this one atm:kim wrote: 31 Jan 2022, 16:34sample:Code: Select all
{plex.name} {allOf{ languages =~ /eng/ ? null : languages.name[0].upper() }{genre}{director}{vf}.joining(', ', ' [', ']')}The Adversary (2002) [FRENCH, Mystery, Nicole Garcia, 1080p]
Code: Select all
{ny.colon(/ - /)} [{genre}, {director}, {vf}]/{plex.name} [{genre}, {director}, {vf}]{subt}Where does it get its information from concerning the language?{ny.colon(/ - /)} {allOf{ languages =~ /eng/ ? null : languages.name[0].upper() }{genre}{director}{vf}.joining(', ', ' [', ']')}{subt}
Code: Select all
{ plex.derive{allOf{ languages =~ /eng/ ? null : languages.name[0].upper() }{genre}{director}{vf}.joining(', ', ' [', ']')}.name }Code: Select all
{(plex^ null).name } {allOf{ languages =~ /eng/ ? null : languages.name[0].upper() }{genre}{director}{vf}.joining(', ', ' [', ']')}{subt}What's the difference between these 2 codes? Should I use one for the main movie and the rest for the subs? I also noticed that your formula does not alter the FOLDER-name, which should also mention the movie's language. Is there a possiblity to achieve this? Do I just use the code 2 times?kim wrote: 31 Jan 2022, 22:33 what strange results! ?
https://www.themoviedb.org/movie/52999- ... uage=en-US
Code: Select all
{ plex.derive{allOf{ languages =~ /eng/ ? null : languages.name[0].upper() }{genre}{director}{vf}.joining(', ', ' [', ']')}.name }Plex Naming SchemesCode: Select all
{(plex^ null).name } {allOf{ languages =~ /eng/ ? null : languages.name[0].upper() }{genre}{director}{vf}.joining(', ', ' [', ']')}{subt}
viewtopic.php?p=23141#p23141
Mmm, naming is completely screwed now. My former formula took both movie and subs (with specific language indicator such as '.eng') and put them in one folder, ignoring all the filler. With the formulas u suggested I'm getting 2 seperate folders atm.kim wrote: 31 Jan 2022, 22:33 what strange results! ?
https://www.themoviedb.org/movie/52999- ... uage=en-US
Code: Select all
{ plex.derive{allOf{ languages =~ /eng/ ? null : languages.name[0].upper() }{genre}{director}{vf}.joining(', ', ' [', ']')}.name }Plex Naming SchemesCode: Select all
{(plex^ null).name } {allOf{ languages =~ /eng/ ? null : languages.name[0].upper() }{genre}{director}{vf}.joining(', ', ' [', ']')}{subt}
viewtopic.php?p=23141#p23141
Code: Select all
{ plex[1] }/{ plex.derive{allOf{ languages =~ /eng/ ? null : languages.name[0].upper() }{genre}{director}{vf}.joining(', ', ' [', ']')}.name }Hellboy (2004)/Hellboy (2004) [Fantasy, Guillermo del Toro, 1080p]
Thx for the code but now it still puts the subs in a seperate folder.kim wrote: 01 Feb 2022, 22:11Code: Select all
{ plex[1] }/{ plex.derive{allOf{ languages =~ /eng/ ? null : languages.name[0].upper() }{genre}{director}{vf}.joining(', ', ' [', ']')}.name }Hellboy (2004)/Hellboy (2004) [Fantasy, Guillermo del Toro, 1080p]
I get this for the sub folder:E:\[Video]\{ plex.derive{allOf{ languages =~ /eng/ ? null : languages.name[0].upper() }{genre}{director}{vf}.joining(', ', ' [', ']')}.name }\{ plex[1] }
E:/[Video]/Hellboy (2004) [Fantasy, Guillermo del Toro, 1080p].eng/Hellboy (2004)
Any suggestions? I'm kinda stuck here.kim wrote: 01 Feb 2022, 22:11Code: Select all
{ plex[1] }/{ plex.derive{allOf{ languages =~ /eng/ ? null : languages.name[0].upper() }{genre}{director}{vf}.joining(', ', ' [', ']')}.name }Hellboy (2004)/Hellboy (2004) [Fantasy, Guillermo del Toro, 1080p]
Code: Select all
{plex.name}Code: Select all
X:/Plex/{plex}Code: Select all
{ plex[1] }/{ plex.name }Code: Select all
{ plex.name }/{ plex[1] }Code: Select all
X:/Plex/{ plex * { allOf{ languages =~ /eng/ ? null : languages.name[0].upper() }{genre}{director}{vf}.joining(', ', ' [', ']') } }rednoah wrote: 12 Sep 2016, 10:03 e.g. Avatar (2009) [M19995]/Avatar (2009)Code: Select all
{ ~plex * " [M$id]" }
I turned it around because the turned around version is what I initially asked for.rednoah wrote: 03 Feb 2022, 00:33 [
One of the suggestions above; use second folder and final file name component from the {plex} path; can work:but then you turned it around for some reason, but that won't make sense, because you're using the file name component which includes .eng bit as folder level, so you get folders for each subtitle language, and more folders for non-subtitle files:Code: Select all
{ plex[1] }/{ plex.name }Code: Select all
{ plex.name }/{ plex[1] }
Code: Select all
X:/Dark Habits (1983) [SPANISH, Comedy, Pedro Almodóvar, 1080p]/Dark Habits (1983)Code: Select all
X:/Dark Habits (1983) [SPANISH, Comedy, Pedro Almodóvar, 1080p]/Dark Habits (1983).eng.srtto rename my movies and that worked perfectly but most importantly I need the language indicator in the folder's name.{ny.colon(/ - /)} [{genre}, {director}, {vf}]/{plex.name} [{genre}, {director}, {vf}]{subt}
and then copy & paste your specification list code:rednoah wrote: 12 Sep 2016, 10:03 e.g. Avatar (2009) [M19995]/Avatar (2009)Code: Select all
{ ~plex * " [M$id]" }
Code: Select all
X:/{ ~plex * { allOf{ languages =~ /eng/ ? null : languages.name[0].upper() }{genre}{director}{vf}.joining(', ', ' [', ']') } }This one seems to do exactly what I want, Rednoah! Thank u & Kim tremendously for your efforts! Best software in the world!rednoah wrote: 03 Feb 2022, 00:33 EDIT:
If you want to use the {plex} format but append to values to the movie / series folder name, then that would work like this:
Code: Select all
X:/Plex/{ plex * { allOf{ languages =~ /eng/ ? null : languages.name[0].upper() }{genre}{director}{vf}.joining(', ', ' [', ']') } }rednoah wrote: 12 Sep 2016, 10:03 e.g. Avatar (2009) [M19995]/Avatar (2009)Code: Select all
{ ~plex * " [M$id]" }
One final question: I tried using the formula for series as well but noticed (obviously) that the 'director' tag had to be removed due to different directors for different seasons. Is it possible to add the year in your given formula? I was experimenting with the {y}-code but can't seem to get it implemented in my formula. Thx in advance!rednoah wrote: 03 Feb 2022, 01:15 I see. I'd start with this example from the {plex} format manual:and then copy & paste your specification list code:rednoah wrote: 12 Sep 2016, 10:03 e.g. Avatar (2009) [M19995]/Avatar (2009)Code: Select all
{ ~plex * " [M$id]" }Code: Select all
X:/{ ~plex * { allOf{ languages =~ /eng/ ? null : languages.name[0].upper() }{genre}{director}{vf}.joining(', ', ' [', ']') } }
Alternatively, you can just add the { languages =~ /eng/ ? null : languages.name[0].upper() } bit into the format that you were previously happy with. I shall note though that your format uses {plex.name} incorrectly and so it will inject a ".eng" bit in the middle of the filename when processing subtitle files. It also doesn't account for undefined bindings, and so you might end up with [, , , 720p] in the specification bit for one file or another.
Code: Select all
X:/{ ~plex * { allOf{ languages =~ /eng/ ? null : languages.name[0].upper() }{genre}{y}{vf}.joining(', ', ' [', ']') } }Code: Select all
X:/Firefly [Drama, 2002, 2160p]/Season 01/Firefly - S01E01 - SerenityYeah, that one I figured out but I was having trouble with getting it like this:rednoah wrote: 03 Feb 2022, 14:20 Yes, you can just use y:Code: Select all
X:/{ ~plex * { allOf{ languages =~ /eng/ ? null : languages.name[0].upper() }{genre}{y}{vf}.joining(', ', ' [', ']') } }Code: Select all
X:/Firefly [Drama, 2002, 2160p]/Season 01/Firefly - S01E01 - Serenity
So the renaming is similar to my movie scheme. Sorry for my OCD acting up! :'(Firefly (2002) [Drama, 2160p]/Season 01/Firefly - S01E01 - Serenity
Hey Noah,rednoah wrote: 03 Feb 2022, 14:20 Yes, you can just use y:Code: Select all
X:/{ ~plex * { allOf{ languages =~ /eng/ ? null : languages.name[0].upper() }{genre}{y}{vf}.joining(', ', ' [', ']') } }Code: Select all
X:/Firefly [Drama, 2002, 2160p]/Season 01/Firefly - S01E01 - Serenity
Sorry, but I don't see the n-indicator in this formula:
Am I blind?X:/{ ~plex * { allOf{ languages =~ /eng/ ? null : languages.name[0].upper() }{genre}{y}{vf}.joining(', ', ' [', ']') } }
Correct. I thought this was obvious since I gave a concrete example with Firefly.rednoah wrote: 05 Feb 2022, 10:53 If you're using {plex} for movies then you will always get Name (Year) naming by default.
Are we perhaps talking about TV Show naming and not Movie naming?
I see. If you want Name (Year) for TV Series folder names / Episode file names then you can use emby instead of plex which happens to do give you the naming you want:
rednoah wrote: 12 Sep 2016, 10:03 Emby Naming Standard
The {emby} binding and the {plex} binding work exactly the same, with slightly different implementation details, e.g. series name and series folder formatting.
Code: Select all
TV Shows/Alias (2001)/Season 01/Alias (2001) - S01E01 - Truth Be ToldIf you want {plex.id} but with Name (Year) folders then {emby.id} will give you the file paths you desire.
OK thx a lot! Will this 'Emby' binding be compatible with my PLEX as well?rednoah wrote: 07 Feb 2022, 01:10I see. If you want Name (Year) for TV Series folder names / Episode file names then you can use emby instead of plex which happens to do give you the naming you want:
viewtopic.php?t=4116
rednoah wrote: 12 Sep 2016, 10:03 Emby Naming Standard
The {emby} binding and the {plex} binding work exactly the same, with slightly different implementation details, e.g. series name and series folder formatting.
Code: Select all
TV Shows/Alias (2001)/Season 01/Alias (2001) - S01E01 - Truth Be ToldIf you want {plex.id} but with Name (Year) folders then {emby.id} will give you the file paths you desire.
Code: Select all
{ plex.derive{allOf{ languages =~ /eng/ ? null : languages.name[0].upper() }{genre}{director}{vf}.joining(', ', ' [', ']')}.name }Code: Select all
{(plex^ null).name } {allOf{ languages =~ /eng/ ? null : languages.name[0].upper() }{genre}{director}{vf}.joining(', ', ' [', ']')}{subt}