this makes all null only = NO fanart
// select and fetch artwork
def artwork = TheMovieDB.getArtwork(movieInfo.id, category, locale)
- def selection = [locale.language, 'en', null].findResult{ l -> artwork.find{ l == it.language } }
+ def selection = [locale.language, 'en', null].findResult{ lang -> artwork.find{ it.matches(lang) } }
I think because when find = empty/null then fail on matches on null object
log:
null
java.lang.NullPointerException
at net.filebot.web.Artwork.matches(Artwork.java:57)
at Script2$_fetchMovieArtwork_closure9$_closure30.doCall(Script2.groovy:180)
at Script2$_fetchMovieArtwork_closure9.doCall(Script2.groovy:180)
at Script2.fetchMovieArtwork(Script2.groovy:180)
at Script2$_fetchMovieArtworkAndNfo_closure16.doCall(Script2.groovy:508)
at Script2$_fetchMovieArtworkAndNfo_closure16.doCall(Script2.groovy)
at net.filebot.cli.ScriptShellBaseClass.tryLogCatch(ScriptShellBaseClass.java:127)
at Script2.fetchMovieArtworkAndNfo(Script2.groovy:466)
at Script1$_run_closure72$_closure144.doCall(Script1.groovy:410)
at Script1$_run_closure72.doCall(Script1.groovy:404)
at Script1.run(Script1.groovy:358)
at net.filebot.cli.ScriptShell.evaluate(ScriptShell.java:62)
at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:72)
at net.filebot.cli.ArgumentProcessor.runScript(ArgumentProcessor.java:114)
at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:29)
at net.filebot.Main.main(Main.java:123)
htpc broken fanart.jpg
Re: htpc broken fanart.jpg
Well now I tried FileBot 4.6.2 (r3966) / Java(TM) SE Runtime Environment 1.8.0_77
still get:
This works:
still get:
btw: this new rev. broke part of my htpcnull
java.lang.NullPointerException
at net.filebot.web.Artwork.matches(Artwork.java:57)
at Script2$_fetchMovieArtwork_closure9$_closure30.doCall(Script2.groovy:181)
at Script2$_fetchMovieArtwork_closure9.doCall(Script2.groovy:181)
at Script2.fetchMovieArtwork(Script2.groovy:181)
at Script2$_fetchMovieArtworkAndNfo_closure16.doCall(Script2.groovy:522)
at Script2$_fetchMovieArtworkAndNfo_closure16.doCall(Script2.groovy)
at net.filebot.cli.ScriptShellBaseClass.tryLogCatch(ScriptShellBaseClass.java:127)
at Script2.fetchMovieArtworkAndNfo(Script2.groovy:480)
at Script1$_run_closure72$_closure144.doCall(Script1.groovy:410)
at Script1$_run_closure72.doCall(Script1.groovy:404)
at Script1.run(Script1.groovy:358)
at net.filebot.cli.ScriptShell.evaluate(ScriptShell.java:62)
at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:72)
at net.filebot.cli.ArgumentProcessor.runScript(ArgumentProcessor.java:114)
at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:29)
at net.filebot.Main.main(Main.java:123)

Code: Select all
if (s.'Duration' != null) {
int durationinMS = Integer.parseInt(s.'Duration')
durationinseconds(Math.round((durationinMS)/1000))
durationinminutes(Math.round((durationinMS)/60000))
}
Code: Select all
if (category ==~ 'posters') {
def selection = [locale.language, 'en', 'xx', null].findResult{ lang -> artwork.find{ it.matches(lang) } }
if (selection == null) {
log.finest "FROM htpc fetchMovieArtwork selection - Artwork not found: $outputFile"
return null
}
log.finest "FROM htpc fetchMovieArtwork outputFile - Downloading posters $selection.url => $outputFile"
return selection.url.saveAs(outputFile)
}
if (category ==~ 'backdrops') {
def selection = [locale.language, 'en', 'xx', null].findResult{ l -> artwork.find{ l == it.language } }
if (selection == null) {
log.finest "FROM htpc fetchMovieArtwork selection - Artwork not found: $outputFile"
return null
}
log.finest "FROM htpc fetchMovieArtwork outputFile - Downloading fanart $selection.url => $outputFile"
return selection.url.saveAs(outputFile)
}
Re: htpc broken fanart.jpg
1.
I've uploaded a new build. Since SVN Revision and Git Commit Count are not exactly the same, the latest release is currently r3894.
Just sort by Modified for the latest jar:
https://sourceforge.net/projects/filebo ... ebot/HEAD/
2.
What does "broke" mean in terms of error messages? Your code doesn't show anything that might break. I only simplified the Artwork code and moved the common parts into the Java core.
I've uploaded a new build. Since SVN Revision and Git Commit Count are not exactly the same, the latest release is currently r3894.
Just sort by Modified for the latest jar:
https://sourceforge.net/projects/filebo ... ebot/HEAD/
2.
What does "broke" mean in terms of error messages? Your code doesn't show anything that might break. I only simplified the Artwork code and moved the common parts into the Java core.
Re: htpc broken fanart.jpg
looks like it works in new rev. FileBot 4.7 (r3894)
Fixed it my self
OLD: int durationinMS = Integer.parseInt(s.'Duration')
NEW: BigDecimal durationinMS = new BigDecimal(s.'Duration')
Not in log because if left in all in htpc fails (no pics or nfo)
Fixed it my self

OLD: int durationinMS = Integer.parseInt(s.'Duration')
NEW: BigDecimal durationinMS = new BigDecimal(s.'Duration')
Not in log because if left in all in htpc fails (no pics or nfo)