Format Expression for type of file (episode or movie)

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

Format Expression for type of file (episode or movie)

Post 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.
User avatar
Wolfie
Posts: 114
Joined: 27 Oct 2015, 02:59

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

Post 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.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

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

Post 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
:idea: Please read the FAQ and How to Request Help.
User avatar
feuerwasser
Posts: 13
Joined: 04 Mar 2015, 18:38

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

Post by feuerwasser »

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