Page 1 of 1

Adding release groups to default list dynamically

Posted: 13 Apr 2019, 23:02
by devster
Is it possible to selectively add custom lines to the list of release groups that FileBot uses?
Current solutions include
a binding as follows

Code: Select all

    { def grp = fn.match(/(?:(?<=[-])\w+$)|(?:^\w+(?=[-]))/)
      any{"-$group"}{"-$grp"} }
overriding url.release-groups (doable?)

Using .add() with net.filebot.media.ReleaseInfo.releaseGroup doesn't work as the latter is currently private.

Use case is for the rare instances for which a group isn't a proper release group to be added to the official file, and to have changes immediately available.

Re: Adding release groups to default list dynamically

Posted: 14 Apr 2019, 04:06
by rednoah
You can pass in your own URL via Java System Properties:

Code: Select all

-Durl.release-groups=file://<path>
:idea: The system property takes precedence over the properties file property. It's what I use for debugging.

:idea: That means you'll have to manage and merge your own group list though. There's no way to "add" custom extra groups.

Re: Adding release groups to default list dynamically

Posted: 14 Apr 2019, 07:48
by devster
Thank you for confirming.
As I mentioned it's more for ad-hoc processing rather than a stable solution.
I'll keep adding new groups to the thread in case I find them.

Re: Adding release groups to default list dynamically

Posted: 14 Apr 2019, 08:12
by rednoah
In that case, the best solution is probably something like this:

Code: Select all

f.path.match(readLines("my-groups.txt").join("|"))
i.e. generate the pattern from your own text file

Re: Adding release groups to default list dynamically

Posted: 14 Apr 2019, 13:18
by devster
The reason I wanted to use the option vs a format was the way the group binding is generated.
I'm not much of a coder, but it seems much more sophisticated, for example it removes already matched patterns.
I'll try both options, see which ones works best.

Re: Adding release groups to default list dynamically

Posted: 14 Apr 2019, 13:24
by rednoah
That is true. There's more to it than that. Such as trying to not accidentally match the group from the series name or episode title.

Though for your specific case you can probably just assume that the group is either the last word or the first word of the filename.

Re: Adding release groups to default list dynamically

Posted: 22 Apr 2019, 16:18
by devster
For posterity, a couple of gotchas
file:// is the protocol, so path may require an additional slash

Code: Select all

-Durl.release-groups=file://<path>
-Durl.release-groups=file:///mnt/mymount
the supplied file needs to be xz-compressed

Code: Select all

xz -z file.txt
should replace the file without needing other steps.