Page 1 of 1

Force same genre folder for all movies of a collection

Posted: 25 Oct 2015, 18:52
by OOmatrixOO
Hi.
I want to sort all files according to genre/collection folders with TheMovieDB.

I use this:

Code: Select all

H:/{genres[0]}/{collection.upperInitial().replace('Reihe', 'Collection', 'Filmreihe', 'Collection', 'Serie', 'Collection')}/{n.upperInitial().replace(':', ' - ')} ({y}) {genres}
The Problem is, that movies in one collection have something different first genre.

Example The Blade Collection:
H:\Horror\Blade Collection\Blade (1998) [Horror, Action].mkv
H:\Science Fiction\Blade Collection\Blade II (2002) [Science Fiction, Horror, Action, Thriller].mkv
H:\Science Fiction\Blade Collection\Blade - Trinity (2004) [Science Fiction, Action, Horror, Thriller, Abenteuer, Fantasy].mkv

What can i do that all movies of an collection moves in the same folder?

Thaml you.

Re: specific genre folder

Posted: 26 Oct 2015, 07:59
by rednoah
Yeah, I don't have a solution for that...

In this specific case I'd just do this:

Code: Select all

{genres.sort()[0]}
Order genres alphabetically, hope that it somehow works out.

Re: specific genre folder

Posted: 26 Oct 2015, 08:13
by rednoah
Or this?

Code: Select all

{model.findAll{ it.collection == collection }.genres.flatten().countBy{it}.sort{it.value}.keySet().last()}
(if you can figure out how/why this one works you'll get a prize)

Re: specific genre folder

Posted: 01 Nov 2015, 09:23
by OOmatrixOO

Code: Select all

{genres.sort()[0]}
This doesnt work for me. Do I need to add anything else?

Code: Select all

{model.findAll{ it.collection == collection }.genres.flatten().countBy{it}.sort{it.value}.keySet().last()}
This is not perfect but ok.

Thanks.