how do I avoid : being translated to - in plex naming

Support for macOS users
Post Reply
mpegman
Posts: 19
Joined: 11 Feb 2023, 13:38

how do I avoid : being translated to - in plex naming

Post by mpegman »

The IMDB movie The Naked Gun: From the Files of Police Squad! (1988) {imdb-tt0095705} as an example
is translated in the plex variable as The Naked Gun - From the Files of Police Squad! (1988)

How do I avoid this and simply get The Naked Gun From the Files of Police Squad! (1988) {imdb-tt0095705}

Format: Select all

/
{n00 = n.sortName().charAt(0)toUpperCase(); n00.isDigit() ? '0-9' : n00}
/
{ 
	var =  any 
	   		{ if (imdbid) ' {imdb-'+imdbid+'}'} 
	   		{ if (tmdbid) ' {tmdb-'+tmdbid+'}'} 

					
~ plex ** var   %  any { ' - ' audio[0].language + ' - ' }{ " - EN - " } 
% { '[Audio - ' +[channels,aco].join(" ") +  any { ' [' + audio.collect { [it['Language/String2'].upper(), ] }*.join(' ').join(' + ') + ']' }{ " [EN] " } + ']' } 
% { "[Video - " + allOf{vs}{vf}{'AVC' in vc ? 'h264' : vc }{bitdepth + ' bit'}{hdr}.join(' ').upper() } % {' '+original.matchAll(/proper|repack|rerip/).join('.').lower() } 
% { ' ' + any{ 'en' in text.language ? '[EN]' : 'nl' in text.language ? '[NL]' : '[]' }{'[NOSUB]'	} } % {']'}  
% { ' ' + any 	{ if (original =~ /YTS.MX/  )  { "- [YTS.MX]"}} 	{ if (group =~ /MX/  )  { "- [YTS.MX]"}}	{'- [' + group + ']'} 	{ fn.matchlast(/\[([^\[\]]+)\]+/) } } ^ {'.'+lang.ISO2} }
User avatar
rednoah
The Source
Posts: 23002
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: how do I avoid : being translated to - in plex naming

Post by rednoah »

:arrow: I strongly recommend not using : COLON in file names.

:!: On Windows, not possible.

:!: On macOS, it's complicated. The tl;dr being that although : COLON can be used on the file system level (e.g. bt FileBot to name files and folders) but macOS Finder will then display / SLASH instead for historical reasons. So if you manage your files with Finder, then you definitely do not want to use : COLON in file names.

:idea: On Linux, OK. You may use {plex.unix} to disable file path validation if you use Linux and only ever use Linux on all your machines. If you have a Linux server that you access from a Windows / macOS Desktop client, then you will want compatible file paths.

:arrow: You could use {plex.unix} and then remove the : COLON characters (and do any other normalization operation you deem necessary) via your own custom code I suppose. Just not using {plex} is an option too if you need more fine-grained control.
:idea: Please read the FAQ and How to Request Help.
mpegman
Posts: 19
Joined: 11 Feb 2023, 13:38

Re: how do I avoid : being translated to - in plex naming

Post by mpegman »

is there a possibility to overwrite the name before it goes into plex ?

Groovy: Select all

n=n.replace(' - ','')
					
(~ plex ** var)
User avatar
rednoah
The Source
Posts: 23002
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: how do I avoid : being translated to - in plex naming

Post by rednoah »

mpegman wrote: 25 Mar 2024, 17:39 is there a possibility to overwrite the name before it goes into plex ?
Unfortunately, no. You'll want to rely on your own custom format if you need fine-grained control over each bit and piece.
:idea: Please read the FAQ and How to Request Help.
Post Reply