All about user-defined episode / movie / file name format expressions
SebasNights
Posts: 6 Joined: 21 Dec 2016, 00:25
Post
by SebasNights » 21 Dec 2016, 00:36
Hello, I'm having problems trying to get the collection year interval.
The desired naming is
The Matrix Collection (1999-2003)/The Matrix (1999)/The Matrix (1999) [1080p, x264, AC3 5.1].mkv
Now I have this
The Matrix Collection/The Matrix (1999)/The Matrix (1999) [1080p, x264, AC3 5.1].mkv
The code is
Code: Select all
{collection.upperInitial().colon(', ')+'/'}{n.upperInitial().colon(', ')} ({y})/{n.upperInitial().colon(', ')} ({y}) [{vf}, {vc}, {ac} {channels}]{subt != '.eng' ? subt.upperInitial() : ''}
Also I use a script that downloads the folder image for each movie, is there a way to download the collection image for that collection folder?
Thanks
rednoah
The Source
Posts: 23931 Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:
Post
by rednoah » 21 Dec 2016, 03:10
The are no bindings for what you call the
collection year interval and support is not planned because that information is not available in a single movie object.
If you process all movies at the same time, then the
{model} binding will allow you to collect the values you want:
Code: Select all
{def cys = model.findAll{ it.collection == collection }.y; cys.min() + '-' + cys.max()}
rednoah
The Source
Posts: 23931 Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:
Post
by rednoah » 22 Dec 2016, 12:38
r4665 adds the
List.bounds() method to make these kinds of expressions easier on the eye:
Code: Select all
{model.findAll{ it.collection == collection }.y.bounds().join('-')}
SebasNights
Posts: 6 Joined: 21 Dec 2016, 00:25
Post
by SebasNights » 22 Dec 2016, 20:27
Is there a way to do it "real" with scripts? Because I don't have all the movies and some even are not released yet. I also want to retrieve the collection poster.
rednoah
The Source
Posts: 23931 Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:
Post
by rednoah » 23 Dec 2016, 04:10
Unfortunately that is not possible, because there is no (easy) way to list all movies for a given collection.