Page 25 of 28

Re: [DEB] Debian package

Posted: 26 Nov 2019, 17:32
by plittlefield
Ooooo, this could be the winning command line, which only installs 3 packages!

Code: Select all

$ sudo apt -s --no-install-recommends install /home/paully/Downloads/filebot/FileBot_4.9.0_universal-jdk8.deb

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'filebot' instead of '/home/paully/Downloads/filebot/FileBot_4.9.0_universal-jdk8.deb'
The following additional packages will be installed:
  libjna-java libjna-jni
Suggested packages:
  libjna-java-doc
Recommended packages:
  openjdk-8-jre openjfx libchromaprint-tools p7zip-full unrar | unrar-free
The following NEW packages will be installed
  filebot libjna-java libjna-jni
0 to upgrade, 3 to newly install, 0 to remove and 6 not to upgrade.
Inst libjna-jni (4.2.2-1 Ubuntu:16.04/xenial [amd64])
Inst libjna-java (4.2.2-1 Ubuntu:16.04/xenial [all])
Inst filebot (4.9.0 local-deb [all])
Conf libjna-jni (4.2.2-1 Ubuntu:16.04/xenial [amd64])
Conf libjna-java (4.2.2-1 Ubuntu:16.04/xenial [all])
Conf filebot (4.9.0 local-deb [all])
...will filebot work without all the recommended packages?!

Also, I am only running OpenJDK Java v8...

Code: Select all

openjdk version "1.8.0_222"
OpenJDK Runtime Environment (build 1.8.0_222-8u222-b10-1ubuntu1~16.04.1-b10)
OpenJDK 64-Bit Server VM (build 25.222-b10, mixed mode)
Am I good to go?!

:-)

Paully

Re: [DEB] Debian package

Posted: 26 Nov 2019, 17:54
by plittlefield
OK, so I went for it.

Turns out my current filebot was just a symlink to the TAR version, which made things easier.

Here are my upgrade / install commands as root...

Code: Select all

$ apt install p7zip-full unrar
$ apt --no-install-recommends install FileBot_4.9.0_universal-jdk8.deb
So, I now have this...

Code: Select all

$ filebot -script fn:sysinfo
FileBot 4.9.0 (r6899)
JNA Native: 4.0.1
MediaInfo: 19.09
p7zip: p7zip Version 9.20 (locale=en_GB.UTF-8,Utf16=on,HugeFiles=on,4 CPUs)
unrar: UNRAR 5.30 beta 2 freeware
Chromaprint: java.io.IOException: Cannot run program "fpcalc": error=2, No such file or directory
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2019-11-16 (r603)
Groovy: 2.5.8
JRE: OpenJDK Runtime Environment 1.8.0_222
JVM: 64-bit OpenJDK 64-Bit Server VM
CPU/MEM: 4 Core / 3.7 GB Max Memory / 33 MB Used Memory
OS: Linux (amd64)
HW: Linux nas 4.15.0-15-generic #16~16.04.1-Ubuntu SMP Thu Apr 5 12:19:23 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
STORAGE: ext4 [/] @ 106 GB | fuse.sshfs [/home/paully/Downloads/seedbox2] @ 990 GB
DATA: /home/paully/.filebot
Package: DEB
License: FileBot License xxxxxxxx (Valid-Until: 2020-07-31)
Done ヾ(@⌒ー⌒@)ノ
...cannot wait to try it out!

Fingers crossed!

Thanks!

Regards,

Paully

Re: Batch Rename any type of file

Posted: 26 Nov 2019, 19:00
by yodaspowart
Thanks a lot @rednoah also for quick reply.
It's perfect for me.

Re: Batch Rename any type of file

Posted: 26 Nov 2019, 23:22
by yodaspowart
Updated my unsorted folder now:

Currently it's working in case anyone is interested in this:

Code: Select all

--def unsorted=y --def unsortedFormat="Unsorted/{fn =~ /2160p|4K|4k|UHD/ ? 'UHD-2160p/' : fn =~ /1080p/ ? 'HD-1080p' : fn =~ /720p/ ? 'HD-720p' : 'SD'}/{fn.before(/S\d{2}E\d{2}/).upperInitial().space(' ')} - {fn.match(/S\d{2}E\d{2}/).upper()} - {fn.after(/S\d{2}E\d{2}/).stripReleaseInfo().upperInitial().space(' ')} [{allOf{match}{s3d}{hd}{vc}{source}{vf}{('-')}{af}{ac}{channels}{n.findMatch(group) ? null : '- '+group} join ' '}].{ext}" --def exec="curl --insecure https://seedBoxPlexURL:port/library/sections/all/refresh?X-Plex-Token=XXXXXXXXXXXXXXXXXX_X"
Now Plex can pull in the TV shows from my: HD-1080p & UHD-2160p folders.
This is a fallback until TVDB is up and running.
I'm still renaming them properly with the Filebot GUI 4.8.5 through Mountain Duck mounted online FTP drive

Movies rarely go into unsorted.
If they end up here would get named like this:
Original name:

Code: Select all

A.Christmas.Tale.2008.Criterion.576p.BDRip.x264.AC3-Q0S.mp4

becomes:

Code: Select all

A Christmas Tale 2008 Criterion 576p BDRip X264 AC3-Q0S - - A Christmas Tale 2008 Criterion [HD AVC BDRip 1080p - 2ch AAC 2.0]

Re: [DEB] Debian package

Posted: 27 Nov 2019, 09:52
by plittlefield
Yep, all good :-)

With 4.9.0 the process seems to be faster and better at matching titles.

Thanks for your help and keep up the great work on this time-saving gem.

Paully

Re: Plex Naming Schemes

Posted: 06 Dec 2019, 04:22
by guyrivera
rednoah wrote: 07 Feb 2019, 14:38 There's no convenience method for this particular use case.

You'll either have to
(A) write your own custom format without using the {plex} binding at all, or
(B) write your own custom format using bits and pieces of the {plex} binding as necessary.

e.g.

Code: Select all

Movies/{plex[1]}{" [$vf.$vc.$ac]"}/{plex[2]}{" [$vf.$vc.$ac]"}

:!: Either way, you'll no longer be strictly adhering to the Plex naming scheme, although it'll probably work.
Thanks a lot - it works!

Re: --filter and fine-tuning

Posted: 08 Dec 2019, 20:26
by sblack55
rednoah wrote: 27 Oct 2014, 20:54 You can manage your list of explicitly excluded (or included) shows with an external text file.

Code: Select all

--filter '!readLines('/path/to/excludes.txt').contains(n)'
Having some trouble with this syntax, probably due my failure to grasp the vagaries of script/cmdline quoting. Here are the key lines from my bash script:

Code: Select all

PVR_LOC="/volume1/PVR"
...
sFilter='!readLines('${PVR_LOC}/ExcludeShows.txt').contains(n)'
…
filebot "${sSourceFile}" ${FB_OPTS} -script fn:amc --output "${DEST}" ${sMapper} --filter "${sFilter}" --def seriesFormat="${FB_FMT_SERIES}" --def movieFormat="${FB_FMT_MOVIE}" --def "ut_label=${UTLABEL}">/tmp/fblog.txt 2>&1
And here is my log:

Code: Select all

Dec 08 15:03:38: filebot "/volume1/PVR/record/The Carbonaro Effect/The Carbonaro Effect.S01E12.An Elevated Ferret Alert.ts" -non-strict --action hardlink --conflict auto -script fn:amc --output "/volume1/PVR/General" --mapper episode.derive(0,0) --filter "!readLines(/volume1/PVR/ExcludeShows.txt).contains(n)" --def seriesFormat="TV Shows/{ny}/Season {s}/{n}.{s00e00}.{t}" --def movieFormat="" --def "ut_label=TV"
Dec 08 15:03:50: Run script [fn:amc] at [Sun Dec 08 15:03:42 EST 2019]
Dec 08 15:03:50: Parameter: seriesFormat = TV Shows/{ny}/Season {s}/{n}.{s00e00}.{t}
Dec 08 15:03:50: Parameter: movieFormat =
Dec 08 15:03:50: Parameter: ut_label = TV
Dec 08 15:03:50: Argument[0]: /volume1/PVR/record/The Carbonaro Effect/The Carbonaro Effect.S01E12.An Elevated Ferret Alert.ts
Dec 08 15:03:50: Input: /volume1/PVR/record/The Carbonaro Effect/The Carbonaro Effect.S01E12.An Elevated Ferret Alert.ts
Dec 08 15:03:50: Group: {Series=true} => [The Carbonaro Effect.S01E12.An Elevated Ferret Alert.ts]
Dec 08 15:03:50: ScriptException: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Dec 08 15:03:50: Script2.groovy: 1: unexpected token: PVR @ line 1, column 21.
Dec 08 15:03:50: !readLines(/volume1/PVR/ExcludeShows.txt).contains(n)
Dec 08 15:03:50: ^
Dec 08 15:03:50: 
Dec 08 15:03:50: 1 error
Dec 08 15:03:50: 
Dec 08 15:03:50: Finished without processing any files
Dec 08 15:03:50: Abort (×_×)
SysInfo:

Code: Select all

FileBot 4.8.6 (r6868)
JNA Native: 6.1.0
MediaInfo: 19.04
7-Zip-JBinding: 9.20
Chromaprint: 1.4.3
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2019-12-07 (r610)
Groovy: 2.5.8
JRE: OpenJDK Runtime Environment 13.0.1
JVM: 64-bit OpenJDK 64-Bit Server VM
CPU/MEM: 4 Core / 522 MB Max Memory / 26 MB Used Memory
OS: Linux (amd64)
HW: Linux NetStore 3.10.105 #24922 SMP Wed Jul 3 16:37:24 CST 2019 x86_64 GNU/Linux synology_avoton_1815+
STORAGE: ext4 [/] @ 1.2 GB | btrfs [/volume1] @ 7 TB
DATA: /volume1/@appstore/filebot/data/admin
Package: SPK
License: FileBot License P9013368 (Valid-Until: 2020-08-23)
Done ヾ(@⌒ー⌒@)ノ

Re: --filter and fine-tuning

Posted: 09 Dec 2019, 10:51
by rednoah
YES:

Code: Select all

!readLines('/path/to/excludes.txt').contains(n)
:idea: This is the value you want to pass in.

NO:

Code: Select all

!readLines(/volume1/PVR/ExcludeShows.txt).contains(n)
:!: This is the value you are actually passing in, which is syntactically incorrect Groovy code, hence syntax errors.


Hence:

Code: Select all

--filter '!readLines("/path/to/excludes.txt").contains(n)'
:arrow: Please read Cmdline and Argument Passing for details.

Re: --filter and fine-tuning

Posted: 09 Dec 2019, 12:36
by sblack55
rednoah wrote: 09 Dec 2019, 10:51 Hence:

Code: Select all

--filter '!readLines("/path/to/excludes.txt").contains(n)'
Got it working, thanks!

(Single-quotes, double-quotes, substitutions, no substitutions... sheesh, I'm dizzy!)

Re: FileBot on the Mac App Store

Posted: 10 Dec 2019, 10:01
by moonshine
Hi... I purchade the app on the Appstore and then realized that this version doesn't support command line... I tried to get a refund, but apple refuses "We've determined that your purchase doesn't meet the conditions for a refund." Whatever that means....

Is there anyway to "convert" to a universal license ? (Maybe pay a price difference- I know apple takes a cut)
Thanks.

Re: FileBot on the Mac App Store

Posted: 10 Dec 2019, 14:05
by rednoah
I suppose you could request a 1-year complimentary license:
viewtopic.php?t=9517

Re: FileBot on the Mac App Store

Posted: 11 Dec 2019, 02:25
by moonshine
that's an expensive 1 year license... but i'll give it a try... i don't like subscription model (although I understand why developers would prefer a constant flow of revenue) ... and thats the reasson i bought from appstore ... (shoudl have done more reading about it... )

Re: --filter and fine-tuning

Posted: 11 Dec 2019, 06:33
by bilaalpeters
That worked, thanks so much!

Re: Unattended Automation with FileBot Node

Posted: 14 Dec 2019, 16:39
by UnseenThreat
I follow all the instruction but when i try to execute i have : BUG! exception in phase 'semantic analysis' in source unit 'Script1.groovy' Unsupported class file major version 57
Did you know why?
Regards

Re: Unattended Automation with FileBot Node

Posted: 14 Dec 2019, 20:13
by rednoah
UnseenThreat wrote: 14 Dec 2019, 16:39 BUG! exception in phase 'semantic analysis' in source unit 'Script1.groovy' Unsupported class file major version 57
:arrow: viewtopic.php?f=13&t=11099

Re: FileBot on the Mac App Store

Posted: 14 Dec 2019, 23:33
by hellojello
Hello

Re: --filter and fine-tuning

Posted: 16 Dec 2019, 15:47
by JD2005
What's the correct syntax inside of the excludes.txt file? I'm finding contradicting information, some saying you just list the episodes line by line, others saying you need to include the 'n !=' ahead of it.

Re: --filter and fine-tuning

Posted: 16 Dec 2019, 16:02
by rednoah
The code is literally reading the file, so this piece of code implicitly specifies the format, which is values line by line:

Code: Select all

!readLines("/path/to/excludes.txt").contains(n)
e.g. /path/to/excludes.txt

Code: Select all

Alias
Firefly
This would be functionally equivalent just specifying the list of values in code instead of an external text file:

Code: Select all

![/Alias/, /Firefly/].contains(n)

:idea: --filter allows you to specify arbitrary code. Maybe your code reads a file and checks if n is in there. Maybe your code checks if n is a specific value or not. Maybe your code does something I haven't thought of yet. It's your code. Anything is possible. Hence you will find different solutions made by different people hand-crafted for different use cases.


:idea: You may find "conflicting" information because some people use the @file syntax for reading command-line arguments from external text files. That's completely different though. But if all args (including the filter option) a read from a text file anyway, then some users might prefer to specify this data inline rather than in another external text file.

Re: --filter and fine-tuning

Posted: 16 Dec 2019, 16:25
by JD2005
Thank you, I wasn't sure as Filebot comes back with the words 'Include' next to each line, as well it doesn't seem to be excluding what I'm specifying as it's being labeled incorrectly anyway. I'm using the syntax laid out in this thread so just wanted to make sure I was applying this correctly before trying to figure out where else the issue is.

In case you could give me any pointers, the show 'Watchmen' is being converted to 'Vekterne' no matter what I do... All other shows seem to be working fine except this one. I realize Vekterne is Norwegian for Watchmen, but still not sure why it's choosing this language for just this show. The show and input filename going into it is english. I am also using '--lang en' in my script, so again not sure what's happening. If you have any advice I certainly appreciate it.

Code: Select all

filebot -script fn:amc --output "/home/user/Media" --action move --conflict skip -non-strict "/home/user/Stage" --log-file amc.log --def unsorted=y music=y --lang en --filter "!readLines('/home/user/uScripts/excludes.txt').contains(n)"
"

Re: --filter and fine-tuning

Posted: 16 Dec 2019, 17:37
by rednoah
You can use filebot -list for testing:

Code: Select all

filebot -list --db TheTVDB --q Watchmen -non-strict

e.g.

Code: Select all

$ filebot -list --db TheTVDB --q Watchmen -non-strict --filter "!(n ==~ /WatchMojo|Pitchmen| Vekterne|Watchmen: Motion Comic/)"
Apply filter [!(n ==~ /WatchMojo|Pitchmen| Vekterne|Watchmen: Motion Comic/)] on [249] items
Include [Watchmen - 1x01 - It's Summer and We're Running Out of Ice]
Include [Watchmen - 1x02 - Martial Feats of Comanche Horsemanship]
Include [Watchmen - 1x03 - She Was Killed by Space Junk]
Include [Watchmen - 1x04 - If You Don't Like My Story, Write Your Own]
Include [Watchmen - 1x05 - Little Fear of Lightning]
Include [Watchmen - 1x06 - This Extraordinary Being]
Include [Watchmen - 1x07 - An Almost Religious Awe]
Include [Watchmen - 1x08 - A God Walks into Abar.]
Include [Watchmen - 1x09 - See How They Fly]
Watchmen - 1x01 - It's Summer and We're Running Out of Ice
Watchmen - 1x02 - Martial Feats of Comanche Horsemanship
Watchmen - 1x03 - She Was Killed by Space Junk
Watchmen - 1x04 - If You Don't Like My Story, Write Your Own
Watchmen - 1x05 - Little Fear of Lightning
Watchmen - 1x06 - This Extraordinary Being
Watchmen - 1x07 - An Almost Religious Awe
Watchmen - 1x08 - A God Walks into Abar.
Watchmen - 1x09 - See How They Fly

:!: Turns out " Vekterne" has a leading space in the database, which is probably an errors, so as far as the exclude list is concerned, I'd add both values:

Code: Select all

Vekterne
 Vekterne
:!: readLines() may or may not trim() lines implicitly. It don't know. It might. If it does, then this won't work either.


:idea: Newer revisions of FileBot implicitly trim() all values we get back from TheTVDB, as to avoid invisible leading/trailing spaces messing with us: viewtopic.php?t=1609

Re: --filter and fine-tuning

Posted: 16 Dec 2019, 22:52
by JD2005
Well in the meantime I was researching and found that my Ubuntu server's locale was blank, so I set it to en_US.utf-8. At the same time I added the ' Vekterne' to the exceptions list and reran the script and it worked! So not sure which one solved it but either way I really appreciate your assistance!

Re: --filter and fine-tuning

Posted: 17 Dec 2019, 01:37
by kim
someone renamed show in English to Vekterne ;)

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

Posted: 22 Dec 2019, 23:41
by devster
Does this still work now that plugins have been officially abandoned by Plex?

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

Posted: 23 Dec 2019, 07:45
by rednoah
Yes, it works. I think the only thing that has changed so far is that you have to install manually (i.e. copy files) but of course we'll see how things develop in the future.

Re: [DEB] Debian package

Posted: 29 Dec 2019, 11:46
by draco31fr
Hello,

I just wanna inform you about changes in Ubuntu 18.04 LTS.

Now default-jre is OpenJDK 11 :

Code: Select all

$ apt policy default-jre
default-jre:
  Installé : 2:1.11-68ubuntu1~18.04.1
  Candidat : 2:1.11-68ubuntu1~18.04.1
 Table de version :
 *** 2:1.11-68ubuntu1~18.04.1 500
        500 http://fr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
        100 /var/lib/dpkg/status
     2:1.10-63ubuntu1~02 500
        500 http://fr.archive.ubuntu.com/ubuntu bionic/main amd64 Packages

Code: Select all

$ apt show default-jre
Depends: default-jre-headless (= 2:1.11-68ubuntu1~18.04.1), openjdk-11-jre
same for JavaFX:

Code: Select all

$ apt policy openjfx
openjfx:
  Installé : 11.0.2+1-1~18.04.2
  Candidat : 11.0.2+1-1~18.04.2
 Table de version :
 *** 11.0.2+1-1~18.04.2 500
        500 http://fr.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages
        500 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages
        100 /var/lib/dpkg/status
     8u161-b12-1ubuntu2 500
        500 http://fr.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
For your information, with universal-jdk8's filebot repo, openjdk-8-jre and openjfx downgraded to 8u161, the GUI failed to launch with the following stack trace :

Code: Select all

déc. 29, 2019 12:10:53 PM net.filebot.Main onStart
GRAVE: Failed to initialize JavaFX
java.lang.NoClassDefFoundError: javafx/embed/swing/JFXPanel
	at net.filebot.util.ui.SwingUI.initJavaFX(SwingUI.java:582)
	at net.filebot.Main.onStart(Main.java:196)
	at net.filebot.Main.lambda$null$0(Main.java:162)
	at net.filebot.util.ui.SwingUI$SwingRunnable.doInBackground(SwingUI.java:472)
	at net.filebot.util.ui.SwingUI$SwingRunnable.doInBackground(SwingUI.java:462)
Caused by: java.lang.ClassNotFoundException: javafx.embed.swing.JFXPanel
	... 5 more
At this time, sysinfo report was :

Code: Select all

$ filebot -script fn:sysinfo
FileBot 4.8.5 (r6224)
JNA Native: 5.2.0
MediaInfo: 17.12
p7zip: p7zip Version 16.02 (locale=fr_FR.UTF-8,Utf16=on,HugeFiles=on,64 bits,8 CPUs Intel(R) Core(TM) i5-8300H CPU @ 2.30GHz (906EA),ASM,AES-NI)
unrar: UNRAR 5.50 freeware
Chromaprint: fpcalc version 1.4.3
Extended Attributes: OK
Unicode Filesystem: OK
GVFS: PlatformGVFS [/run/user/1000/gvfs]
Script Bundle: 2019-05-15 (r565)
Groovy: 2.5.6
JRE: OpenJDK Runtime Environment 1.8.0_232
JVM: 64-bit OpenJDK 64-Bit Server VM
CPU/MEM: 8 Core / 3 GB Max Memory / 44 MB Used Memory
OS: Linux (amd64)
HW: Linux draco-laptop 5.0.0-37-generic #40~18.04.1-Ubuntu SMP Thu Nov 14 12:06:39 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
DATA: /home/draco/.filebot
Package: DEB
License: UNREGISTERED
Done ヾ(@⌒ー⌒@)ノ
So, I have to use universal repository, instead of universal-jdk8, remove & purge old filebot package, and reinstall / update all stack (jre, javafx, ...)
Now GUI is launching well, sysinfo changes only relies on java version :

Code: Select all

JRE: OpenJDK Runtime Environment 11.0.5
I suggest you update the first post and also the website.