POSTBUCKET - where random posts in unrelated topics go
-
- Donor
- Posts: 13
- Joined: 18 Nov 2016, 08:34
Re: [DEB] Debian package
Hello everyone, I have a quick question : I'm using Filebot on a Ubuntu headless server (16.04) and the 4.7.9 was working fine with openjdk-8-jre-headless. The latest .deb (4.8.5) required though the full openjdk-8-jre and pulled over 200MB of libs.
Is there any good reason behind it or is it just a package error?
Regards
Is there any good reason behind it or is it just a package error?
Regards
Re: [DEB] Debian package
libjna is the only required package dependency:
The deb.sh installer script will however install all recommended dependencies, to make sure everything works out of the box regardless of your specific use case:
Code: Select all
Depends: libjna-java
Recommends: default-jre, openjfx, mediainfo, libchromaprint-tools, p7zip-full, unrar | unrar-free
Enhances: nautilus-actions
The deb.sh installer script will however install all recommended dependencies, to make sure everything works out of the box regardless of your specific use case:
Code: Select all
sudo apt-get install --install-recommends -y filebot
-
- Donor
- Posts: 13
- Joined: 18 Nov 2016, 08:34
Re: [DEB] Debian package
Hmm that's strange, I swear the openjdk-jre8 (and the libs) were listed as a dependency... Any possible mistake on my side?
PS : I didn't use any script, just downloaded the .deb and dpkg -i
PPS : the libjna is the problem, it recommends the default-jre (but not headless)
PS : I didn't use any script, just downloaded the .deb and dpkg -i
PPS : the libjna is the problem, it recommends the default-jre (but not headless)
Re: [DEB] Debian package
You should be able to install everything like so:
That should only install the lib-jna and filebot packages with bare minimum dependencies.
Code: Select all
sudo apt-get install --no-install-recommends -y filebot
Re: Batch Rename any type of file
With all the problems TVDB has been having this is exactly what i'm looking for but im having a few problems, the behavior of these options are different in 'generic batch renaming mode':
{n} = full file name minus extension
{'Season '+s} = full file name minus extension
{fn} = blank no value
I'm primarily using filebot for sorting in this case, generic batch renaming is exactly what i need so i dont run into issues every time TVDB is having problems. But show name, season and full file name are still needed.
Any ideas? thanks,
{n} = full file name minus extension
{'Season '+s} = full file name minus extension
{fn} = blank no value
I'm primarily using filebot for sorting in this case, generic batch renaming is exactly what i need so i dont run into issues every time TVDB is having problems. But show name, season and full file name are still needed.
Any ideas? thanks,
Re: Batch Rename any type of file
In plain file mode:
* n is the filename
* fn is the filename, as usual, same as n in this case
* s is undefined, since files don't have seasons
If you want SxE numbers, or titles, or anything, then you'll have to extract that piece of information by parsing the file name, since the file name is all you've got:
How to parse information from the file name is highly reliant on the file names you have.
* n is the filename
* fn is the filename, as usual, same as n in this case
* s is undefined, since files don't have seasons
If you want SxE numbers, or titles, or anything, then you'll have to extract that piece of information by parsing the file name, since the file name is all you've got:
Code: Select all
{f.path.match(/Season (\d+)/)}

-
- Donor
- Posts: 13
- Joined: 18 Nov 2016, 08:34
Re: [DEB] Debian package
So I gave the repo a try, but failed :
Hmmm looks like it worked. Next step, add the repo and apt update :
Looks like I have a problem with the signature. What did I do wrong?
Regards
Code: Select all
root@server:~# apt-key adv --fetch-keys "https://raw.githubusercontent.com/filebot/plugins/master/gpg/maintainer.pub"
Executing: /tmp/tmp.kuHJZvQopu/gpg.1.sh --fetch-keys
https://raw.githubusercontent.com/filebot/plugins/master/gpg/maintainer.pub
gpgkeys: protocol `https' not supported
gpg: no handler for keyserver scheme `https'
gpg: WARNING: unable to fetch URI https://raw.githubusercontent.com/filebot/plugins/master/gpg/maintainer.pub: keyserver error
Code: Select all
root@server:~# wget https://raw.githubusercontent.com/filebot/plugins/master/gpg/maintainer.pub
--2019-11-23 02:03:01-- https://raw.githubusercontent.com/filebot/plugins/master/gpg/maintainer.pub
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.36.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.36.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4650 (4.5K) [text/plain]
Saving to: ‘maintainer.pub’
maintainer.pub 100%[===============================>] 4.54K --.-KB/s in 0s
2019-11-23 02:03:01 (17.9 MB/s) - ‘maintainer.pub’ saved [4650/4650]
root@server:~# apt-key adv maintainer.pub
Executing: /tmp/tmp.5dmHdLUYIf/gpg.1.sh maintainer.pub
pub 4096R/7C3C6A71 2017-04-13 Reinhard Pointner <[email protected]>
Hmmm looks like it worked. Next step, add the repo and apt update :
Code: Select all
root@server:~# apt update
Ign:9 https://get.filebot.net/deb universal-jdk8 InRelease
Get:10 https://get.filebot.net/deb universal-jdk8 Release [1,165 B]
Get:11 https://get.filebot.net/deb universal-jdk8 Release.gpg [862 B]
Ign:11 https://get.filebot.net/deb universal-jdk8 Release.gpg
Reading package lists... Done
W: GPG error: https://get.filebot.net/deb universal-jdk8 Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4E402EBF7C3C6A71
E: The repository 'https://get.filebot.net/deb universal-jdk8 Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Regards
Re: [DEB] Debian package
1.
What version of Ubuntu are you using?
2.
Did you use the install script which pre-installs the necessary dependencies, such as gnupg-curl?
https://github.com/filebot/plugins/blob ... deb.sh#L13
What version of Ubuntu are you using?
2.
Did you use the install script which pre-installs the necessary dependencies, such as gnupg-curl?
https://github.com/filebot/plugins/blob ... deb.sh#L13
Code: Select all
bash -xu <<< "$(curl -fsSL https://raw.githubusercontent.com/filebot/plugins/master/installer/deb.sh)"
-
- Posts: 101
- Joined: 09 Mar 2014, 19:15
Re: [DEB] Debian package
I am currently on FileBot 4.8.2 using the .deb package by hand (a long time ago.)
I've just seen this latest post and out of interest I went through the github script step-by-step with the --simulate option to see what would happen, because this is a headless server with no gui needed.
All was going well but then the last command WAS going to pull in 90 packages which I really don't need
So, I changed the install command line to...
...which was a little better at 45 packages, but those were still loads of X Server related packages.
Is there any way to stop it installing ANY of those?

Thanks,
Paully
I've just seen this latest post and out of interest I went through the github script step-by-step with the --simulate option to see what would happen, because this is a headless server with no gui needed.
All was going well but then the last command WAS going to pull in 90 packages which I really don't need

Code: Select all
sudo apt-get --simulate install --install-recommends filebot
Code: Select all
sudo apt-get --simulate install --no-install-recommends filebot
Is there any way to stop it installing ANY of those?

Thanks,
Paully
Re: [DEB] Debian package
You can always use the portable and then figure out dependencies manually if disk space is an issue:
viewtopic.php?f=11&t=6057
That being said, according to the package metadata, libjna-java is the only hard dependency, and everything else is optional:
viewtopic.php?f=11&t=6057
That being said, according to the package metadata, libjna-java is the only hard dependency, and everything else is optional:
Code: Select all
Depends: libjna-java
Recommends: default-jre, openjfx, mediainfo, libchromaprint-tools, p7zip-full, unrar | unrar-free
Enhances: nautilus-actions
-
- Posts: 101
- Joined: 09 Mar 2014, 19:15
Re: [DEB] Debian package
Space is not a problem, I'm just trying to keep my system lean and mean with as few packages as possible installed and needing to be updated 
OK, so the Beta 4.9.0 is an option with just that 1 dependency, and it seems to only install 2 packages when I simulate...
...so are you saying that if I install the Beta 4.9.0 deb package, without the 75 recommended packages, my server will not start trying to install them at a later date?
Is there a way to test that?
I guess I could press CTRL+C if it kicks off
Regards,
Paully

OK, so the Beta 4.9.0 is an option with just that 1 dependency, and it seems to only install 2 packages when I simulate...
Code: Select all
$ sudo apt-get --simulate install libjna-java
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libjna-jni
Suggested packages:
libjna-java-doc
The following NEW packages will be installed
libjna-java libjna-jni
0 to upgrade, 2 to newly install, 0 to remove and 4 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])
Conf libjna-jni (4.2.2-1 Ubuntu:16.04/xenial [amd64])
Conf libjna-java (4.2.2-1 Ubuntu:16.04/xenial [all])
Is there a way to test that?
I guess I could press CTRL+C if it kicks off

Regards,
Paully
-
- Posts: 101
- Joined: 09 Mar 2014, 19:15
Re: [DEB] Debian package
Also, is it best to remove 4.8.2 before I install the Beta 4.9.0 for cleanliness?
Re: [DEB] Debian package
IDK. If you don't want surprised, then you can just not use the apt repository and manage things manually. Regardless, new version will override the old version, apt takes care of that, so no need to worry about cleanliness.
-
- Posts: 16
- Joined: 02 Jun 2017, 01:04
Re: Batch Rename any type of file
As the TVDB is down for me on my seedbox (Linux/amc groovy script),
I am now using
Managing to connect and rename to this online FTP folder fine using Mountain Duck and the latest Filebot which is working fine on my Mac.

I have now got TV shows into specific folders for resolution.
Would like to use the file naming setup to match the name of the show in a certain way:
Original file name:
Wanted: Legacies - S02E01 - HDTV x264-KILLERS[eztv]
Not sure how it can be cleaner?
Using the filebot GUI to test in file mode:

I am now using
Code: Select all
unsortedFormat
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}.{ext}"

I have now got TV shows into specific folders for resolution.
Would like to use the file naming setup to match the name of the show in a certain way:
Original file name:
Code: Select all
Legacies.S02E01.HDTV.x264-KILLERS[eztv].mkv
Not sure how it can be cleaner?
Code: Select all
{fn.before(/S\d{2}E\d{2}/).space(' ')} - {fn.match(/S\d{2}E\d{2}/).space(' ')} - {fn.after(/S\d{2}E\d{2}/).space(' ')}

Re: Batch Rename any type of file
If it works, I'd leave it at that. Once you start parsing file names yourself, things necessarily level up in terms of complexity.
If simplification is the goal, at the cost of getting exactly what you want, then here's my solution:
If simplification is the goal, at the cost of getting exactly what you want, then here's my solution:
Code: Select all
{fn.replaceAll(/[ .-]+/, ' - ')}
Code: Select all
Legacies - S02E01 - HDTV - x264 - KILLERS[eztv]
-
- Posts: 101
- Joined: 09 Mar 2014, 19:15
Re: [DEB] Debian package
Ooooo, this could be the winning command line, which only installs 3 packages!
...will filebot work without all the recommended packages?!
Also, I am only running OpenJDK Java v8...
Am I good to go?!

Paully
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])
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)

Paully
-
- Posts: 101
- Joined: 09 Mar 2014, 19:15
Re: [DEB] Debian package
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...
So, I now have this...
...cannot wait to try it out!
Fingers crossed!
Thanks!
Regards,
Paully
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
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 ヾ(@⌒ー⌒@)ノ
Fingers crossed!
Thanks!
Regards,
Paully
-
- Posts: 16
- Joined: 02 Jun 2017, 01:04
Re: Batch Rename any type of file
Thanks a lot @rednoah also for quick reply.
It's perfect for me.
It's perfect for me.
-
- Posts: 16
- Joined: 02 Jun 2017, 01:04
Re: Batch Rename any type of file
Updated my unsorted folder now:
Currently it's working in case anyone is interested in this:
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:
becomes:
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"
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]
-
- Posts: 101
- Joined: 09 Mar 2014, 19:15
Re: [DEB] Debian package
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

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
Thanks a lot - it works!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.
Re: How about sharing our format expressions?
Hi i am trying to do an expression that puts the movies into a collection folder if there is more than one but it does not name the folder with the word collection in it any ideas example below
I want it to name the folder Aliens or Alien, then in that folder have Alien 1 (1979) Alien 2 ( Year etc)
I want it to name the folder Aliens or Alien, then in that folder have Alien 1 (1979) Alien 2 ( Year etc)
Re: --filter and fine-tuning
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: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)'
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
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 (×_×)
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
YES:
This is the value you want to pass in.
NO:
This is the value you are actually passing in, which is syntactically incorrect Groovy code, hence syntax errors.
Hence:
Please read Cmdline and Argument Passing for details.
Code: Select all
!readLines('/path/to/excludes.txt').contains(n)

NO:
Code: Select all
!readLines(/volume1/PVR/ExcludeShows.txt).contains(n)

Hence:
Code: Select all
--filter '!readLines("/path/to/excludes.txt").contains(n)'

Re: --filter and fine-tuning
Got it working, thanks!rednoah wrote: ↑09 Dec 2019, 10:51 Hence:Code: Select all
--filter '!readLines("/path/to/excludes.txt").contains(n)'
(Single-quotes, double-quotes, substitutions, no substitutions... sheesh, I'm dizzy!)