Rename with exisiting info regardless if there is a "tag" missing

Any questions? Need some help?
Post Reply
abandonow
Posts: 30
Joined: 22 Jul 2020, 16:42

Rename with exisiting info regardless if there is a "tag" missing

Post by abandonow »

(I'm still pretty new to Filebot, and experimenting.)

I currently have

Code: Select all

'{plex.name}/{plex.name}{" $tags"}{" "}{" [$vf - $source $hdr - $ac $channels - $vc]"}'
which idealy would give me:

Code: Select all

1917 (2019)/1917 (2019) [2160p HDR10+ - BluRay - MLP 7.1 - x265].mkv
Unfortunetaly if the videofile does not contain HDR, nothing of the remaing info is added either. Is there a way to do that (except wrapping all in individual {} – I would very much lik to use "-" as a separator. And wrapping all individually would i worst case leave me with a filename "Movietitle (year) - - - -.mkv"

Thanks!
kim
Power User
Posts: 1027
Joined: 15 May 2014, 16:17

Re: Rename with exisiting info regardless if there is a "tag" missing

Post by kim »

Code: Select all

{plex.derive{' ' + tags.join(' ')}{' [' + allOf{vf}{source}{hdr}{ac}{channels}{vc.replace('AVC','x264').replace('HEVC','x265')}.join(' - ') + ']'}.tail}

search and you will find ;)
newbie help - naming UHD or 4K or 2160p and REMUX plus more
User avatar
rednoah
The Source
Posts: 19009
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Rename with exisiting info regardless if there is a "tag" missing

Post by rednoah »

e.g. easy, but structurally complex to allow for non-uniform grouping:

Code: Select all

{plex.derive
	{" " + tags}
	{" " + [allOf
		{vf}
		{allOf
			{source}
			{hdr}
			.join(" ")
		}
		{allOf
			{ac}
			{channels}
			.join(" ")
		}
		{vc}
		.join(" - ")]
	}
	.tail
}
:idea: Please read the FAQ and How to Request Help.
abandonow
Posts: 30
Joined: 22 Jul 2020, 16:42

Re: Rename with exisiting info regardless if there is a "tag" missing

Post by abandonow »

Thanks guys!
Post Reply