Noice! w00t w00t for kim!cafevincent wrote: ↑19 Oct 2018, 21:11 would you please send me your bitcoin address, I would like to send you a few "beers" as thanks!

Noice! w00t w00t for kim!cafevincent wrote: ↑19 Oct 2018, 21:11 would you please send me your bitcoin address, I would like to send you a few "beers" as thanks!
Code: Select all
{def season = (any{special ? 0 : s} {s}); def episode = (any{special ? special : e} {e}); def eAddOns = ['append_to_response':'external_ids']; def sAddOns = ['append_to_response':'external_ids,content_ratings']; def episodeInfo = net.filebot.WebServices.TheMovieDB.request(\"tv/${id}/season/${season}/episode/${episode}\", eAddOns, Locale.US); def seriesInfo = net.filebot.WebServices.TheMovieDB.request(\"tv/${id}\", sAddOns, Locale.US); def epRating = episodeInfo.vote_average; def epImdbId = episodeInfo.external_ids.imdb_id; def sImdbId = seriesInfo.external_ids.imdb_id; def OMDbEpisodeInfo = (epImdbId != null) ? net.filebot.WebServices.OMDb.request(['i':epImdbId]) : null; def OMDbSeriesInfo = (sImdbId != null) ? net.filebot.WebServices.OMDb.request(['i':sImdbId]) : null; def epOMDbVotes = any{OMDbEpisodeInfo.imdbVotes as int}{null}; def sOMDbVotes = any{OMDbSeriesInfo.imdbVotes.replaceAll(/\D/) as int}{null}; def sTvdbId = any{seriesInfo.external_ids.tvdb_id as int}{null}; def tvdbInfo = (sTvdbId != null) ? net.filebot.WebServices.TheTVDB.getSeriesInfo(sTvdbId, Locale.US) : null; def mpaaCountryLIST = ['FI', 'US']; def mpaaRating = any{seriesInfo.content_ratings.results.findAll{r -> mpaaCountryLIST.any{r.iso_3166_1.contains(it)}}.sort().collect{it.rating}.last()}{''}; (allOf{ny}{s00e00}{t}{any{tvdbInfo.genres}{OMDbEpisodeInfo.Genre.split(',')}}{any{mpaaRating}{OMDbSeriesInfo.Rated}{'NR'}}{'r'+any{epOMDbVotes >= 5 ? OMDbEpisodeInfo.imdbRating : null}{sOMDbVotes >= 5 ? OMDbSeriesInfo.imdbRating : null}{(episodeInfo.vote_count as int) >= 5 ? epRating.round(1) : null}{' '}}{vf}{vc}{ac}{any{epImdbId}{sImdbId}}).join(' ')}
Code: Select all
{def season = (any{special ? 0 : s} {s});
def episode = (any{special ? special : e} {e});
def eAddOns = ['append_to_response':'external_ids'];
def sAddOns = ['append_to_response':'external_ids,content_ratings'];
def episodeInfo = net.filebot.WebServices.TheMovieDB.request("tv/${id}/season/${season}/episode/${episode}", eAddOns, Locale.US);
def seriesInfo = net.filebot.WebServices.TheMovieDB.request("tv/${id}", sAddOns, Locale.US);
def epRating = episodeInfo.vote_average;
def epImdbId = episodeInfo.external_ids.imdb_id;
def sImdbId = seriesInfo.external_ids.imdb_id;
def OMDbEpisodeInfo = (epImdbId != null) ? net.filebot.WebServices.OMDb.request(['i':epImdbId]) : null;
def OMDbSeriesInfo = (sImdbId != null) ? net.filebot.WebServices.OMDb.request(['i':sImdbId]) : null;
def epOMDbVotes = any{OMDbEpisodeInfo.imdbVotes as int}{null};
def sOMDbVotes = any{OMDbSeriesInfo.imdbVotes.replaceAll(/\D/) as int}{null};
def sTvdbId = any{seriesInfo.external_ids.tvdb_id as int}{null};
def tvdbInfo = (sTvdbId != null) ? net.filebot.WebServices.TheTVDB.getSeriesInfo(sTvdbId, Locale.US) : null;
def mpaaCountryLIST = ['FI', 'US'];
def mpaaRating = any{seriesInfo.content_ratings.results.findAll{r -> mpaaCountryLIST.any{r.iso_3166_1.contains(it)}}.sort().collect{it.rating}.last()}{''};
(allOf{ny}{s00e00}{t}{any{tvdbInfo.genres}{OMDbEpisodeInfo.Genre.split(',')}}{any{mpaaRating}{OMDbSeriesInfo.Rated}{'NR'}}{'r'+any{epOMDbVotes >= 5 ? OMDbEpisodeInfo.imdbRating : null}{sOMDbVotes >= 5 ? OMDbSeriesInfo.imdbRating : null}{(episodeInfo.vote_count as int) >= 5 ? epRating.round(1) : null}{' '}}{vf}{vc}{ac}{any{epImdbId}{sImdbId}}).join(' ')}
Code: Select all
{(allOf{ny}{s00e00}{t}{genres}{any{certification}{omdb.Certification}{'NR'}}{'r'+any{omdb.votes >= 5 ? omdb.rating : null}{votes >= 5 ? rating : null}{' '}}{vf}{vc}{ac}{any{'tt'+(omdb.ImdbId).pad(7)}{''}}).join(' ')}
Code: Select all
{import net.filebot.Cache; def epId = net.filebot.WebServices.TheTVDB.getEpisodeList(id, null, Locale.US).find{it =~ sxe || it =~ it.special}.id; def epTVDbInfo = (epId != null) ? net.filebot.WebServices.TheTVDB.requestJson(\"episodes/${epId}\", Locale.US, Cache.ONE_WEEK).data : null; def epImdbId = epTVDbInfo.imdbId; def OMDbEpisodeInfo = (epImdbId != null) ? net.filebot.WebServices.OMDb.request(['i':epImdbId]) : null; def epOMDbVotes = any{OMDbEpisodeInfo.imdbVotes as int}{null}; (allOf{ny}{s00e00}{t}{genres}{any{certification}{omdb.Certification.replaceAll(/N\/A/)}{'NR'}}{'r'+any{epOMDbVotes >= 5 ? OMDbEpisodeInfo.imdbRating : null}{omdb.votes >= 5 ? omdb.rating : null}{votes >= 5 ? rating : null}{' '}}{vf}{vc}{ac}{any{epImdbId}{OMDbEpisodeInfo.imdbID}{'tt'+(omdb.ImdbId).pad(7)}{''}}).join(' ')}
Code: Select all
{import net.filebot.Cache;
def epId = net.filebot.WebServices.TheTVDB.getEpisodeList(id, null, Locale.US).find{it =~ sxe || it =~ it.special}.id;
def epTVDbInfo = (epId != null) ? net.filebot.WebServices.TheTVDB.requestJson("episodes/${epId}", Locale.US, Cache.ONE_WEEK).data : null;
def epImdbId = epTVDbInfo.imdbId;
def OMDbEpisodeInfo = (epImdbId != null) ? net.filebot.WebServices.OMDb.request(['i':epImdbId]) : null;
def epOMDbVotes = any{OMDbEpisodeInfo.imdbVotes as int}{null};
(allOf{ny}{s00e00}{t}{genres}{any{certification}{omdb.Certification.replaceAll(/N\/A/)}{'NR'}}{'r'+any{epOMDbVotes >= 5 ? OMDbEpisodeInfo.imdbRating : null}{omdb.votes >= 5 ? omdb.rating : null}{votes >= 5 ? rating : null}{' '}}{vf}{vc}{ac}{any{epImdbId}{OMDbEpisodeInfo.imdbID}{'tt'+(omdb.ImdbId).pad(7)}{''}}).join(' ')}
Firefly (2002) S01E01 The Train Job [Drama Science-Fiction] TV-14 r8.5 tt0579539
Firefly (2002) S01E02 Bushwhacked [Drama Science-Fiction] TV-14 r8.6 tt0579528
Firefly (2002) S01E03 Our Mrs. Reynolds [Drama Science-Fiction] TV-14 r9.1 tt0579532
Firefly (2002) S01E04 Jaynestown [Drama Science-Fiction] TV-14 r8.8 tt0579530
Firefly (2002) S01E05 Out of Gas [Drama Science-Fiction] TV-14 r9.4 tt0579533
Firefly (2002) S01E06 Shindig [Drama Science-Fiction] TV-14 r8.5 tt0579537
Firefly (2002) S01E07 Safe [Drama Science-Fiction] TV-14 r8.3 tt0579534
Firefly (2002) S01E08 Ariel [Drama Science-Fiction] TV-14 r9.1 tt0579527
Firefly (2002) S01E09 War Stories [Drama Science-Fiction] TV-14 r8.9 tt0579541
Firefly (2002) S01E10 Objects in Space [Drama Science-Fiction] TV-14 r9.3 tt0579531
Firefly (2002) S01E11 Serenity [Drama Science-Fiction] TV-14 r8.7 tt0579535
Firefly (2002) S01E12 Heart of Gold [Drama Science-Fiction] TV-14 r8.4 tt0579529
Firefly (2002) S01E13 Trash [Drama Science-Fiction] TV-14 r8.9 tt0579540
Firefly (2002) S01E14 The Message [Drama Science-Fiction] TV-14 r8.5 tt0579538
Firefly (2002) S00E01 Serenity [Drama Science-Fiction] TV-14 r9.0 tt0303461
Firefly (2002) S00E03 Done the Impossible [Drama Science-Fiction] TV-14 r9.0 tt0303461
Firefly (2002) S00E02 Here's How It Was: The Making of "Firefly" [Drama Science-Fiction] TV-14 r9.0 tt0303461
Firefly (2002) S00E04 Browncoats Unite [Drama Science-Fiction] TV-14 r9.0 tt0303461
I need a sample ?cafevincent wrote: ↑04 Nov 2018, 12:26 for some series this produces a `N/A` certification, which divides the first half of the resulting filename into a directory name and and the second half to the filename.
why is there a need for this ?renames movies via omdb
Code: Select all
{omdb.genres}
Code: Select all
{omdb.rating}
Code: Select all
{omdb.votes}
Code: Select all
{OMDbSeriesInfo.Rated.replaceAll(/N\/A/)}
Code: Select all
{OMDbSeriesInfo.Rated.replaceAll(/N\\/A/)}
Code: Select all
def certifications = net.filebot.WebServices.TheMovieDB.getMovieInfo(movie, Locale.US, true).certifications
Code: Select all
{certifications.FI}
all available from:K-13
Code: Select all
{certifications}
GB=12A, DE=12, ES=7, NZ=M, AU=M, KR=12, GR=Κ-13, ZA=13M-LV, DK=15, KZ=Б14, NL=12, HU=16, BR=10, CA=PG, CH=12, SE=11, CZ=U, RU=16+, IT=T, BG=PG-13, FI=K-13, PT=M/6, BE=12-KT, US=PG-13, FR=10
Code: Select all
{"Title":"Blackmail","Year":"2009","Rated":"N/A","Released":"18 Jun 2009","Season":"N/A","Episode":"N/A","Runtime":"N/A","Genre":"Comedy, Horror, Mystery","Director":"Matt Lipsey","Writer":"Steve Pemberton, Reece Shearsmith","Actors":"Sally Sanders, Reece Shearsmith, Dawn French, Freddie Fruitcake","Plot":"One by one, people in different English counties receive the same grim, succinct, chilling note 'I know what you did'. They seem to have nothing in common, usually doing badly. A blind ...","Language":"N/A","Country":"N/A","Awards":"N/A","Poster":"http://ia.media-imdb.com/images/M/MV5BMTEyNzg5MzQxNjReQTJeQWpwZ15BbWU3MDY1Njg3ODM@._V1_SX300.jpg","Ratings":[{"Source":"Internet Movie Database","Value":"7.2/10"}],"Metascore":"N/A","imdbRating":"7.2","imdbVotes":"83","imdbID":"tt1443130","seriesID":"N/A","Type":"episode","Response":"True"}
Code: Select all
-rename
--db
TheMovieDb
--format
"{def certifications = net.filebot.WebServices.TheMovieDB.getMovieInfo(movie, Locale.US, true).certifications; (allOf{ny}{director}{omdb.genres}{any{OMDb.certifications.FI.replaceAll(/N\\/A/)}{OMDb.certifications.US.replaceAll(/N\\/A/)}{'NR'}}{'r'+any{omdb.rating}{' '}}{vf}{vc}{ac}{imdbid}).join(' ')}"
...be stripped down to numerals and calculated into an average value, rounded to the closest full number. the few alphabetical-only certifications being ignored. these here 20 (numeral) certifications would average to 12.1 = k12. unless it's too complex?GB=12A, DE=12, ES=7, NZ=M, AU=M, KR=12, GR=Κ-13, ZA=13M-LV, DK=15, KZ=Б14, NL=12, HU=16, BR=10, CA=PG, CH=12, SE=11, CZ=U, RU=16+, IT=T, BG=PG-13, FI=K-13, PT=M/6, BE=12-KT, US=PG-13, FR=10
Code: Select all
{"Title":"Avatar","Year":"2009","Rated":"PG-13","Released":"18 Dec 2009","Runtime":"162 min","Genre":"Action, Adventure, Fantasy","Director":"James Cameron","Writer":"James Cameron","Actors":"Sam Worthington, Zoe Saldana, Sigourney Weaver, Stephen Lang","Plot":"A paraplegic marine dispatched to the moon Pandora on a unique mission becomes torn between following his orders and protecting the world he feels is his home.","Language":"English, Spanish","Country":"UK, USA","Awards":"Won 3 Oscars. Another 85 wins & 128 nominations.","Poster":"https://m.media-amazon.com/images/M/MV5BMTYwOTEwNjAzMl5BMl5BanBnXkFtZTcwODc5MTUwMw@@._V1_SX300.jpg","Ratings":[{"Source":"Internet Movie Database","Value":"7.8/10"},{"Source":"Rotten Tomatoes","Value":"82%"},{"Source":"Metacritic","Value":"83/100"}],"Metascore":"83","imdbRating":"7.8","imdbVotes":"1,003,716","imdbID":"tt0499549","Type":"movie","DVD":"22 Apr 2010","BoxOffice":"$749,700,000","Production":"20th Century Fox","Website":"http://www.avatarmovie.com/","Response":"True"}
Code: Select all
{def certifications = net.filebot.WebServices.TheMovieDB.getMovieInfo(movie, Locale.US, true).certifications;
def cleanNum = certifications.findResults{key, value -> value.replaceAll(/\D/)}.findAll{it}*.toInteger();
def int avg = (cleanNum.sum() / cleanNum.size()).toDouble().round();
(allOf{ny}{director}{any{omdb.genres}{genres}}{any{'K-'+avg}{certifications.FI}{certifications.US}{'NR'}}{'r'+any{omdb.rating}{rating}{' '}}{vf}{vc}{ac}{imdbid}).join(' ')}
PS: I don't think it will work well with e.g. "For all ages" cert.Avatar (2009) James Cameron [Action, Adventure, Fantasy] K-12 r7.8 tt0499549
Code: Select all
{avg > 5 ? 'K-'+avg : null}
Code: Select all
{avg == 0 ? 'S' : 'K-'+avg}
Code: Select all
Illegal Argument: java.nio.file.InvalidPathException: Illegal char <>> at index 54: def cleanNum = certifications.findResults{key, value -> value.replaceAll(\D\)}.findAll{it}*.toInteger(); (def cleanNum = certifications.findResults{key, value -> value.replaceAll(\D\)}.findAll{it}*.toInteger();)
Illegal Argument: java.nio.file.InvalidPathException: Trailing char < > at index 29: def int avg = (cleanNum.sum() \ cleanNum.size()).toDouble().round(); (def int avg = (cleanNum.sum() \ cleanNum.size()).toDouble().round();)
Illegal Argument: java.nio.file.InvalidPathException: Illegal char <"> at index 171: (allOf{ny}{director}{any{omdb.genres}{genres}}{any{'c'+avg}{certifications.FI}{certifications.US}{'NR'}}{'r'+any{omdb.rating}{rating}{' '}}{vf}{vc}{ac}{imdbid}).join(' ')}" ((allOf{ny}{director}{any{omdb.genres}{genres}}{any{'c'+avg}{certifications.FI}{certifications.US}{'NR'}}{'r'+any{omdb.rating}{rating}{' '}}{vf}{vc}{ac}{imdbid}).join(' ')}")
SyntaxError: missing token: }
javax.script.ScriptException: SyntaxError: missing token: }
at net.filebot.format.ExpressionFormat.compile(ExpressionFormat.java:112)
at net.filebot.format.ExpressionFormat.<init>(ExpressionFormat.java:43)
at net.filebot.format.ExpressionFileFormat.<init>(ExpressionFileFormat.java:13)
at net.filebot.cli.ArgumentBean.getExpressionFileFormat(ArgumentBean.java:252)
at net.filebot.cli.ArgumentProcessor.runCommand(ArgumentProcessor.java:115)
at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:32)
at net.filebot.Main.main(Main.java:131)
SyntaxError: missing token: }
javax.script.ScriptException: SyntaxError: missing token: }
Code: Select all
{def certifications = net.filebot.WebServices.TheMovieDB.getMovieInfo(movie, Locale.US, true).certifications; def cleanNum = certifications.findResults{key, value -> value.replaceAll('\\D')}.findAll{it}*.toInteger(); def int avg = any{(cleanNum.sum() / cleanNum.size()).toDouble().round()}{}; (allOf{ny}{director}{any{omdb.genres}{genres}}{any{avg == 0 ? 'S' : avg >= 5 ? 'K-'+avg : null}{certifications.FI}{certifications.US}{'NR'}}{'r'+any{omdb.Rating}{rating}{' '}}{vf}{vc}{ac}{imdbid}).join(' ')}
Code: Select all
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedConstructor$1 (file:/C:/Program%20Files/FileBot/jar/groovy.jar) to constructor java.math.BigDecimal(java.math.BigInteger,long,int,int)
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedConstructor$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Code: Select all
def cleanNum = certifications.findResults{key, value -> value.replaceAll('\\D')}.findAll{it}*.toInteger().findAll{it < 22};
Code: Select all
-rename
--db
TheMovieDB::TV
--format
"{def season = (any{special ? 0 : s} {s}); def episode = (any{special ? special : e} {e}); def eAddOns = ['append_to_response':'external_ids']; def sAddOns = ['append_to_response':'external_ids,content_ratings']; def episodeInfo = net.filebot.WebServices.TheMovieDB.request("tv/${id}/season/${season}/episode/${episode}", eAddOns, Locale.US); def seriesInfo = net.filebot.WebServices.TheMovieDB.request("tv/${id}", sAddOns, Locale.US); def epRating = episodeInfo.vote_average; def epImdbId = episodeInfo.external_ids.imdb_id; def sImdbId = seriesInfo.external_ids.imdb_id; def OMDbEpisodeInfo = (epImdbId != null) ? net.filebot.WebServices.OMDb.request(['i':epImdbId]) : null; def OMDbSeriesInfo = (sImdbId != null) ? net.filebot.WebServices.OMDb.request(['i':sImdbId]) : null; def epOMDbVotes = any{OMDbEpisodeInfo.imdbVotes as int}{null}; def sOMDbVotes = any{OMDbSeriesInfo.imdbVotes.replaceAll(/D/) as int}{null}; def sTvdbId = any{seriesInfo.external_ids.tvdb_id as int}{null}; def tvdbInfo = (sTvdbId != null) ? net.filebot.WebServices.TheTVDB.getSeriesInfo(sTvdbId, Locale.US) : null; def mpaaCountryLIST = ['FI', 'US']; def mpaaRating = any{seriesInfo.content_ratings.results.findAll{r -> mpaaCountryLIST.any{r.iso_3166_1.contains(it)}}.sort().collect{it.rating}.last()}{''}; (allOf{ny}{s00e00}{t}{any{OMDbEpisodeInfo.Genre}{tvdbInfo.genres}}{any{mpaaRating}{OMDbSeriesInfo.Rated.replaceAll(/N\\/A/)}{'NR'}}{'r'+any{epOMDbVotes >= 5 ? OMDbEpisodeInfo.imdbRating : null}{sOMDbVotes >= 5 ? OMDbSeriesInfo.imdbRating : null}{(episodeInfo.vote_count as int) >= 5 ? epRating.round(1) : null}{' '}}{vf}{vc}{ac}{any{epImdbId}{sImdbId}}).join(' ')}"