Page 1 of 1

Format Expression for type of file (episode or movie)

Posted: 09 May 2018, 18:35
by feuerwasser
This sounds pretty simple but i didn't find any format expression for whether it's a movie or an episode.
To be more specific, i would like to customize my pushover notification in german language via my own curl call. It's already working, but the output should be a whole sentense.
For example:

Code: Select all

--form-string "message={objectfile = movie ? 'Der Film ' : objectfile = episode ? 'Die Folge ' : ''}{fn} wurde der Bibliothek hinzugefĆ¼gt."
Similar in english:

Code: Select all

--form-string "message={objectfile = movie ? 'The movie ' : objectfile = episode ? 'The episode ' : ''}{fn} has been added to the media-library."
Maybe this kind of problem solves other needs too.

Re: Format Expression for type of file (episode or movie)

Posted: 09 May 2018, 23:01
by Wolfie
Could always check to see if it has s#e# or a full date format in the title. If it does, then it's almost always a show, otherwise it's a movie.

Re: Format Expression for type of file (episode or movie)

Posted: 10 May 2018, 03:01
by rednoah
You can use the {type} binding to get the object type.

I'd write it like this though:

Code: Select all

{movie; 'The Movie'}{episode; 'The Episode'} {fn} has been added to the library
:arrow: viewtopic.php?f=5&t=1895

Re: Format Expression for type of file (episode or movie)

Posted: 18 May 2018, 16:55
by feuerwasser
That helped! Thanks. This also is written in the documentation but i did'nt recognized it.