Filebot script accommodated by main genre plex

Running FileBot from the console, Groovy / FileBot scripting, shell scripts, etc
Post Reply
uniqedumx
Posts: 11
Joined: 23 Aug 2021, 20:56

Filebot script accommodated by main genre plex

Post by uniqedumx »

Good morning, excuse me, this script accommodates the movies by genre but does not take the main genre of the film or the first, since I mix films in another genre that it contains, which I modify so that it is in the first genre or in the main of the movie

For example an animation that in plex shows me genres of: animation, drama, action

And I want me to accommodate it in animation since it is the first genre that plex shows

Code: Select all

Z:/Multimedia UNIQedumx/@cinedriveonline/
{
	any
	{
		def order = ['Animation': 1, 'Musical': 2, 'Documentary': 3, 'Family': 4, 'History': 5, 'Science Fiction': 6, 'Horror': 7, 'Fantasy': 8, 'War': 9, 'Western': 10, 'Action': 11, 'Comedy': 12, 'Crime': 13, 'Thriller': 14, 'Adventure': 15, 'Mystery': 16, 'Romance': 17, 'Drama': 18].withDefault{ 100 }
		def map = ['Ciencia ficción': 'Sci-Fi']
		def genres = genres.toSorted{ order[it] }*.replace(map)
		genres.first()
	}
	{
		'No Genre'
	}
}
/{plex.name} - [{vf}] [{mbps}] - @cinedriveonline

and if possible add it to send the duplicates to a folder
User avatar
rednoah
The Source
Posts: 20849
Joined: 16 Nov 2011, 08:59

Re: Filebot script accommodated by main genre plex

Post by rednoah »

{genre} will give you the first genre, as listed in your selected database.
:idea: Please read the FAQ and How to Request Help.
uniqedumx
Posts: 11
Joined: 23 Aug 2021, 20:56

Re: Filebot script accommodated by main genre plex

Post by uniqedumx »

rednoah wrote: 11 Oct 2021, 03:28 {genre} will give you the first genre, as listed in your selected database.
thank you yes , youre rigth

What i modified to move the duplicates to another folder?
User avatar
rednoah
The Source
Posts: 20849
Joined: 16 Nov 2011, 08:59

Re: Filebot script accommodated by main genre plex

Post by rednoah »

uniqedumx wrote: 11 Oct 2021, 17:57 What i modified to move the duplicates to another folder?
That's a different and much more tricky problem:
viewtopic.php?p=55730#p55730
:idea: Please read the FAQ and How to Request Help.
Post Reply