Tools and other software FileBot - The ultimate TV Renamer and Subtitle Downloader (4 Viewers)

rednoah

Portal Pro
December 18, 2011
83
58
I think the parameters changes when I added some features to the amc/artwork scripts. Check htpc.groovy for details.

Also you can try older versions of htpc.groovy in from the svn. Remember that fn:name include the latest from online but you can specify a relative path as well. e.g. include("htpc.groovy")
 

kiwijunglist

Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    1,751
    New Zealand
    Home Country
    New Zealand New Zealand
    I think the parameters changes when I added some features to the amc/artwork scripts. Check htpc.groovy for details.

    I tried changing things but couldn't get it to work, I mainly just wanted to see that it was still working. I will persevere then.

    e.g. include("htpc.groovy")
    I don't understand this part of what you said.
     

    rednoah

    Portal Pro
    December 18, 2011
    83
    58
    When you do include("fn:htpc") it means you're doing include("http://www.filebot.net/scripts/lib/htpc.groovy"), i.e. grabbing the latest script from online. The latest htpc is slightly incompatible with what you wrote before. So you can either update your scripts (and update each and everytime) or just download htpc and use your local copy that just works and doesn't break when i update things online.
     

    kiwijunglist

    Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    1,751
    New Zealand
    Home Country
    New Zealand New Zealand
    I spent over an hour trying and I can't get it to work

    filebot.jar -script grab-fanart.groovy --q "Alias" --output "Alias.jpg"

    Code:
    // include http://filebot.sourceforge.net/scripts/lib/htpc.groovy
    include('htpc.groovy')
     
    // use --q as query
    def tvshows = TheTVDB.search(_args.query)
     
    // just grab artwork for the first result and save as --output
    fetchSeriesBanner(_args.output, tvshows[0], 'fanart', null, null, null)

    Also tried:
    fetchSeriesBanner(_args.output, tvshows[0], 'fanart', null, null, null, null)

    Code:
    ...etc...
     
    /**
    * TheTVDB artwork/nfo helpers
    */
    def fetchSeriesBanner(outputFile, series, bannerType, bannerType2, season, override, locale) {
    if (outputFile.exists() && !override) {
    _log.finest "Banner already exists: $outputFile"
    return outputFile
    }
     
    // select and fetch banner
    def banner = [locale, null].findResult { TheTVDB.getBanner(series, [BannerType:bannerType, BannerType2:bannerType2, Season:season, Language:it]) }
    if (banner == null) {
    _log.finest "Banner not found: $outputFile / $bannerType:$bannerType2"
    return null
    }
    _log.finest "Fetching $outputFile => $banner"
    return banner.url.saveAs(outputFile)
    }
     
    ...etc...
     
    Last edited:

    kiwijunglist

    Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    1,751
    New Zealand
    Home Country
    New Zealand New Zealand
    Even stuff like this doesn't seem to show anything
    Code:
    filebot.jar -script "g:println 'Hello World!'"
    pause
    filebot.jar
    pause

    When it runs the first line it sits there for 3 seconds
    Then asks to press anykey to continue
    3rd line loads filebot console...
     
    Last edited:

    kiwijunglist

    Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    1,751
    New Zealand
    Home Country
    New Zealand New Zealand
    Is there anyway you could fix the attached test scripts so that they work?

    Code:
    filebot.jar -script grab-fanart.groovy --q "Alias" --output "c:\filebot\Alias-fanart.jpg"

    Code:
    filebot -script grab-tvthumb.groovy --q "Alias" --output "alias-tvthumb.jpg"

    Code:
    filebot -script ???????????? --q "The Hobbit" --output "Thehobbit-fanart.jpg"

    Code:
    // include http://filebot.sourceforge.net/scripts/lib/htpc.groovy
    include('htpc.groovy')
     
    // use --q as query
    def tvshows = TheTVDB.search(_args.query)
     
    // just grab artwork for the first result and save as --output
    fetchSeriesBanner(_args.output, tvshows[0], 'fanart', null, null, null, null)

    Code:
    // include http://filebot.sourceforge.net/scripts/lib/htpc.groovy
    include('htpc.groovy')
     
    // use --q as query
    def tvshows = TheTVDB.search(_args.query)
     
    // just grab artwork for the first result and save as --output
    fetchSeriesFanart(_args.output, tvshows[0], 'tvthumb', null, null)
     

    Attachments

    • filebot.rar
      22.5 MB

    rednoah

    Portal Pro
    December 18, 2011
    83
    58
    Even stuff like this doesn't seem to show anything
    Code:
    filebot.jar -script "g:println 'Hello World!'"
    pause
    filebot.jar
    pause

    When it runs the first line it sits there for 3 seconds
    Then asks to press anykey to continue
    3rd line loads filebot console...

    .jar files are not .exe files! I assume Windows will automatically run the filebot.jar with javaws, which is a GUI application and not a console application one so you won't get console output.

    e.g.
    Code:
    C:\>filebot -script "g:println 'Hello World!'"
    Hello World!

    You could replace "filebot" with the command java -jar FileBot.jar ...


    As for how to fix your scripts, just check the current artwork.* scripts how they call the htpc functions. Also if you just look at the code it should be pretty simple to figure out what the htpc functions do and what the parameters are for.
     

    kiwijunglist

    Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    1,751
    New Zealand
    Home Country
    New Zealand New Zealand
    My problem was that i didn't know how to format the parameters correctly, as I have no understanding of the scripting language used... anyways I found a work around by just creating a fake video file then getting filebot to download everything for that file, and cherry picking what I wanted. I'm now working on a newer version of my plugin with an actual person who knows how to program (I can dissect a human body, but I couldn't dissect your code ;P )
     
    Last edited:

    Users who are viewing this thread

    Top Bottom