2.8 KiB
Filebot presets for Mangrana
Motivation
Classifying
This project relies on the Filebot renaming tool, and it aims to automatically classify the content on the different libraries that are presented to the user. This lets him hide the ones which is not interested in (i.e. Asian films?) and choose much easier what he wish to watch (i.e. spanish TV shows).
Here you can see a demonstration. Pay attention on the left list:
This is the content of a library called "Retro", which contains movies from 80' and 90'. But for example we can also find movies of these same ages in another library called "Infantil" (kids movies), as we see in here:
So, at the end it does not only handles the ages but also the genres in a quite smart way.
Renaming files
Also, it renames the files in a way that I decided. Here, for example the download movie file was:
data/torrents/movies/
Akira.1988.mHD.10Bits.1080p.BluRay.DD5.1.x265-TMd.mkv
And my script had rename it to this:
/data/media/movies/Pelis_Anime/main/
Akira (1988) {tmdb-149}/
Akira (1988) [HEVC microHD BluRay 7.1M 23.976f][spa+, jpn+, eng DD 5.1][spa+, eng+, jpn]{tmdb-149}.mkv
Showing in the same name: the codec, distribution format, quaity, bitrate, framerate, audios specifying its type (DolbyDigital, etc) and how many channels, subtitles including which ones has more than one version for the same language and the TheMoveDB id. Cool, isn't it?
The same with the TV shows. Here an example
data/torrents/tv/
Childhood's End (2015) temporada 1/
El fin de la infancia - 1x01 - Los amos.mkv
to:
data/media/tv/Series/new/
Childhood-s End (2015) {tvdb-296065}/Temporada 01/
El fin de la infancia (2015) - S01E01 - Los amos [HEVC microHD 1.7M 23.976f][spa DD 2.0, eng DD 5.1][spa, eng].mkv
Lovely
The code
Ok, here is a bit crazy, because the best way I found to reuse certain parts of the script was literally cutting it in different files that are needed to put together in a concrete order to get them work. Just like:
MoviesRootScript.groovy
└───@MovieScipt.groovy
│ │ def greetings = "hello movies!"
│ │ try {
│
└───@CommonScipt.groovy
│ print(greetings)
│ } catch (Exception e) {}
SeriesRootScript.groovy
└───@SerieScipt.groovy
│ │ def greetings = "hello tv shows!"
│ │ try {
│
└───@CommonScipt.groovy (reused)
│ print(greetings)
│ } catch (Exception e) {}
Crazy, but funny, and effective.
The quality
And sorry, Groovy is not my language, actually I didn't write groovy ever before, and also didn't plan to make it public when I wrote it, so please bear it in mind before jutge the code quality of this :-)