Blank metadata command

Any questions? Need some help?
Post Reply
Posts: 1
Joined: 22 May 2019, 07:18

Blank metadata command

Post by tyler0887 » 29 Feb 2020, 09:17

I wasn't quite sure what to search the forum for in asking this or how to title this post.

This is my syntax for television episodes.

Code: Select all

\Television\{genre}\{n} ({y})\{n} S{s.pad(2)} ({episodelist.findAll{it.season == s}.airdate.year[0,-1].unique().join('-')})\{n} - S{s.pad(2)}E{e.pad(2)} - {t}  ({airdate}) (Dir.{director}) ({runtime}min. {vf} {vc} {af})
My problem is that usually when a piece of metadata is non-existent, in most cases the name of the director, I am simply left with "(Dir.)" in the renamed episode. Is there a way that I can ensure that if the metadata is missing that the renamed episode will rename accordingly? Sorry if this is confusing, I really barely understand most of this, I have only cobbled it together by reading other posts and mashing up the commands I found most appealing. Thanks for any and all help.

User avatar
The Source
Posts: 17864
Joined: 16 Nov 2011, 08:59
Location: Taipei

Re: Blank metadata command

Post by rednoah » 29 Feb 2020, 09:29

You'll want to move the (Dir.) literal into the {expression} so that the expression either yields the String value you want, concatenating prefix/postfix literals and binding value, or yield nothing at all due to the binding failing to evaluate:

Code: Select all


:idea: Here's some general reading on the topic:
:idea: Please read the FAQ and How to Request Help.

Post Reply