POSTBUCKET - where random posts in unrelated topics go

Any questions? Need some help?
User avatar
rednoah
The Source
Posts: 19806
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [JDownloader] Setup for Windows, Linux and Mac OS X

Post by rednoah »

OutrageousGem wrote: 17 Jun 2019, 09:37 Just because Node makes it much more convenient to rapidly test different iterations of a command and schedule it when it finally does the right thing. (I am just bad at writing shell scripts. Always some typo / unescaped character / etc.... :? ). The API Is all I currently really need.
I see. Yes, FileBot Node certainly has value in generating CLI commands. You could always use the WebUI to generate commands and the copy & paste that into your scheduled shell script.

:idea: Use the @file syntax for reading command-line arguments from external text files. That'll make things easy as pie. That's also what prepared tasks do in form of *.args files. ;)
:idea: Please read the FAQ and How to Request Help.
mami7880
Posts: 2
Joined: 19 Mar 2019, 11:29

Re: Exclude Blacklist & Series-Mappings

Post by mami7880 »

Hi and sorry,

I missed youre Post and now i have no file paths or logs because of new installation of my system.
Next time, I will send the information as well.
nothinghere
Posts: 8
Joined: 13 Jul 2014, 18:10

Re: [EVAL] Split code into external *.groovy script files

Post by nothinghere »

I've tried using a few different things, but even having something as simple as:
test.groovy=>
{n}
and then doing movieFormat="{include 'test.groovy'}"
also tested movieFormat="{evaluate('test.groovy' as File)}"

results in an empty name..am I missing something? I may not have understood what should be in the groovy file, but from what I can see it should just be the same expression as we can already use in a one liner format?

*edit 2* updated to 4.8.6, but still getting empty file name
User avatar
rednoah
The Source
Posts: 19806
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [EVAL] Split code into external *.groovy script files

Post by rednoah »

test.groovy

Code: Select all

n

:idea: We're including Groovy code here, as opposed to FileBot Format Expression code, which interprets {...} delimited expressions as Groovy code. If we include Groovy code from within Groovy code, like in the example above, then Groovy code is expected.



YES:

Code: Select all

{evaluate 'n'}
:arrow: Same as {n}

NO:

Code: Select all

{evaluate '{n}'}
:arrow: Same as {{n}}
:idea: Please read the FAQ and How to Request Help.
nothinghere
Posts: 8
Joined: 13 Jul 2014, 18:10

Re: [EVAL] Split code into external *.groovy script files

Post by nothinghere »

Oh, I see, I always was under the impression that the format expressions were just plain groovy. Shame on me.

Yeah, getting results now. Thanks!
User avatar
rednoah
The Source
Posts: 19806
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [EVAL] Split code into external *.groovy script files

Post by rednoah »

No worries. It’s a common misconception, since Groovy Code itself may also contain {} for close blocks or closures. So the semantics depend on the context.
:idea: Please read the FAQ and How to Request Help.
nothinghere
Posts: 8
Joined: 13 Jul 2014, 18:10

Re: [EVAL] Split code into external *.groovy script files

Post by nothinghere »

After playing around a bit this is awesome.

However:
Trying to break out certain helpers as separate scripts it seems that there is an issue with loading external scripts unless everything is placed and run from the filebot portable folder (which I'd like to avoid since I have all my scripts backuped to a gdrive synced folder).

If I have a
tags.groovy file that grabs my preferred tag format, I can't seem to get it to load.

I've tried:
include 'getEditions.groovy' // this works fine if I place my groovy files in the lib, but if I run it from where I actually have my files it tries to load it from $CWD

After googling the recommended way is to do:

Code: Select all

def scriptDir =  getClass().protectionDomain.codeSource.location.path
include '$scriptDir/getEditions.groovy'
However, that blows up with

Code: Select all

AccessControlException: access denied ("java.lang.RuntimePermission" "getProtectionDomain")
I've tried granting access to all apps for that permission, but it doesn't seem to work.
Even doing:

Code: Select all

grant {
    permission java.security.AllPermission;
};
Doesn't work.


Is there some additional arguments I can give filebot to figure out which path to load files from, or is it all handled by the JVM?
User avatar
rednoah
The Source
Posts: 19806
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [EVAL] Split code into external *.groovy script files

Post by rednoah »

1.
Your code just doesn't do what you think it does:

Code: Select all

def x = 1
println '$x = 1' // $x = 1
println "$x = 1" // 1 = 1
:arrow: http://groovy-lang.org/syntax.html#_str ... erpolation


2.
I'd use environment variables if I wanted to pass in some common folder paths for use in custom scripts:

Code: Select all

export FILEBOT_FORMAT_D="$HOME/.gdrive/FileBot Formats"

Code: Select all

_environment.FILEBOT_FORMAT_D
or via --def name=value if you need it in the format engine:

Code: Select all

filebot ... --def FormatFolder="$FILEBOT_FORMAT_D"

Code: Select all

{defines.FormatFolder}
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 19806
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [EVAL] Split code into external *.groovy script files

Post by rednoah »

FileBot r6524 will now resolve include("files.groovy") relatively to the current script file by default.
:idea: Please read the FAQ and How to Request Help.
nothinghere
Posts: 8
Joined: 13 Jul 2014, 18:10

Re: [EVAL] Split code into external *.groovy script files

Post by nothinghere »

rednoah wrote: 22 Jun 2019, 04:56 FileBot r6524 will now resolve include("files.groovy") relatively to the current script file by default.
Great!


Thanks for pointing out that string interpolation thing, completely missed the single quotes difference (still threw the security exception but that's irrelevant now I guess).

The --def was exactly what I was thinking of as a workaround.

Thanks for the help!
b2un0
Posts: 10
Joined: 09 Jun 2014, 10:41

Re: Metadata and Extended Attributes

Post by b2un0 »

Hi,

is there any option to add filebot xattr to already sorted files?

eg, i have multiple series where on some seasons the xattr from filebot are missing, so ne the " filebot missing script" does not work correct and think the season is missing.
User avatar
rednoah
The Source
Posts: 19806
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Metadata and Extended Attributes

Post by rednoah »

You'll have to process files through FileBot again to ensure that xattr are set this time.

You can find files without xattr metadata like so:

Code: Select all

filebot -mediainfo . --filter '!f.metadata' --format {f}
:idea: Please read the FAQ and How to Request Help.
b2un0
Posts: 10
Joined: 09 Jun 2014, 10:41

Re: Metadata and Extended Attributes

Post by b2un0 »

thanks for your fast reply!

thats the first thing i did, but filebot says "Skipped, already exists". :(
User avatar
rednoah
The Source
Posts: 19806
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Metadata and Extended Attributes

Post by rednoah »

1.
You can move all untagged files elsewhere first:

Code: Select all

filebot -mediainfo . --filter '!f.metadata' -exec mv -v {f} /path/to/untagged/files/{f.name}

2.
However, the general smart approach is to never touch files in your Media folder, and only ever move files there via FileBot. That way you can ensure that everything is always in perfect order.

i.e. just process all your files into a new folder, and then remove the old one if you're happy with the new one

Code: Select all

--format /path/to/new/folder/{plex}
:idea: Please read the FAQ and How to Request Help.
Batman
Posts: 1
Joined: 14 Jul 2019, 17:41

Re: [BTC] Purchase FileBot with Crypto Currency

Post by Batman »

I am interested in purchasing a license via crypto currency...
eggsplorer
Posts: 11
Joined: 21 Jun 2019, 23:05

Re: [JDownloader] Setup for Windows, Linux and Mac OS X

Post by eggsplorer »

I followed your steps in post #1 and it works very well I just can't change any of the downloaded files because I have no permission.

How can I get filebot to create files/folders with correct permissions?

On my Media Drive all my files have:
Owner: 1000
Group: 100
Permissions: 775

Files renamed and moved from Filebot have:
Owner: 0
Group: 0
Permissions: 775
User avatar
rednoah
The Source
Posts: 19806
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [JDownloader] Setup for Windows, Linux and Mac OS X

Post by rednoah »

FileBot does not set or change permissions in any way. It does whatever the OS does by default.

The amc script does have the --def exec option though, which allows you to run your own post-processing commands on newly processed files:

Code: Select all

--def "exec=chmod -R 775 {quote folder} && chown -R admin:administrators {quote folder}"
:idea: Please read the FAQ and How to Request Help.
ZeroByDivide
402
Posts: 157
Joined: 16 Dec 2014, 01:39

Re: [DOCS] Use --mapper expressions for AniDB / TheTVDB cross-entity matching

Post by ZeroByDivide »

Any idea when 4.8.6 is coming to the windows store?
User avatar
rednoah
The Source
Posts: 19806
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [DOCS] Use --mapper expressions for AniDB / TheTVDB cross-entity matching

Post by rednoah »

The Microsoft Store package will be submitted to the Store on release day. Microsoft will then take a few days to test and publish.

4.8.6 has not been released yet. It's ready when it's ready. Probably sometime in September. You can help speed things up by trying the latest beta and providing feedback.
:idea: Please read the FAQ and How to Request Help.
ByteShare
Posts: 26
Joined: 13 Mar 2018, 15:38

Re: Choose Java Swing Look-and-Feel (e.g. Dark Mode)

Post by ByteShare »

rednoah wrote: 25 Feb 2019, 19:23
  1. Open Start Menu and search for Set Environment Variables
  2. Click on New
    Name:

    Code: Select all

    FILEBOT_OPTS
    Value:

    Code: Select all

    -Dnet.filebot.theme=Darcula
  3. Click OK and then relaunch FileBot.

:!: Note that you'll need the latest revision (i.e. r6135 or higher) for any of this to work. The FileBot (platform) launcher is using the Darcula theme by default now as well.
This works great. Any chance of this being an option within the application? Maybe under Preferences?
kim
Power User
Posts: 1127
Joined: 15 May 2014, 16:17

Re: [DOCS] --apply post-processing features

Post by kim »

Will this replace scripts ?
any future plans to ?

where is this in the Docs ?
https://www.filebot.net/docs/api/

what does this use to fetch stuff ?
User avatar
rednoah
The Source
Posts: 19806
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [DOCS] --apply post-processing features

Post by rednoah »

kim wrote: 15 Sep 2019, 00:06 Will this replace scripts ?
any future plans to ?
Not at all. It's just a variety of frequently requested features that more or less fall under the same umbrella. The future plan is to add selected post-processing features to the GUI and allow users to apply some of them as part of the rename process.

kim wrote: 15 Sep 2019, 00:06 where is this in the Docs ?
https://www.filebot.net/docs/api/
A public API is not planned. It doesn't do anything that isn't already implemented in the htpc.groovy script or otherwise commonly handled via -exec calls.

:idea: The --apply import metadata date url and --apply qnap syno options might be of some benefit to amc script users, though existing users probably already have custom solutions.

kim wrote: 15 Sep 2019, 00:06 what does this use to fetch stuff ?
It's doing more or less the same as the artwork.* scripts, using TheMovieDB / TheTVDB / FanartTV as the source of image files.
:idea: Please read the FAQ and How to Request Help.
spetrillo
Posts: 62
Joined: 21 Jun 2015, 20:46

Re: [PLEX] FileBot Xattr Metadata Scanners & Plug-ins

Post by spetrillo »

Do the PLug-ins and Scanners folders go into the Plug-in directory on the PMS?
User avatar
rednoah
The Source
Posts: 19806
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [PLEX] FileBot Xattr Metadata Scanners & Plug-ins

Post by rednoah »

They go into this directory:
https://support.plex.tv/articles/202915 ... y-located/

Plex might pick them up from different locations though. Maybe your plug-in directory will work too.
:idea: Please read the FAQ and How to Request Help.
trininja
Posts: 14
Joined: 08 Oct 2019, 12:29

Re: Exclude Blacklist & Series-Mappings

Post by trininja »

Tokyo Ghoul Root A or also named Tokyo Ghoul √A is flagged as Tokyo Ghoul Season S02 in the TV DB.

Wikipedia with Tokyo Ghoul episode/season index:
https://en.wikipedia.org/wiki/List_of_T ... %E2%88%9AA

AniDB:
https://anidb.net/anime/10875

TVDB entry:
https://www.thetvdb.com/series/tokyo-ghoul/seasons/2

Happened to me that I accidently overwrote my Tokyo Ghoul S01 with the Root A S01 since FileBot wasnÄt able to see the difference because TVDB doesn't split it correctly.

Same goes for Tokio Ghoul :re Season 1 and 2, which are sadly sorted as Tokyo Goul season 3 in TVDB:
https://www.thetvdb.com/series/tokyo-ghoul/seasons/3

AniDB:
https://anidb.net/anime/13499

Wiki:
https://en.wikipedia.org/wiki/List_of_T ... _Ghoul:_re
Post Reply