Format Expression for type of file (episode or movie)

All about user-defined episode / movie format expressions
Post Reply
User avatar
feuerwasser
Posts: 8
Joined: 04 Mar 2015, 18:38

Format Expression for type of file (episode or movie)

Post by feuerwasser » 09 May 2018, 18:35

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.

User avatar
Wolfie
Posts: 43
Joined: 27 Oct 2015, 02:59

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

Post by Wolfie » 09 May 2018, 23:01

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.

User avatar
rednoah
The Source
Posts: 13407
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

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

Post by rednoah » 10 May 2018, 03:01

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
My (very excellent) support depends on Windows Store and Mac App Store sales and Patreon support. Paying users, donors and everyone who contributes to FileBot in one way or another will get the very best support.

:idea: Please read the FAQ and How to Request Help.

User avatar
feuerwasser
Posts: 8
Joined: 04 Mar 2015, 18:38

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

Post by feuerwasser » 18 May 2018, 16:55

That helped! Thanks. This also is written in the documentation but i did'nt recognized it.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest