POSTBUCKET - where random posts in unrelated topics go

Any questions? Need some help?
JonBackhaus
Posts: 1
Joined: 09 Sep 2018, 00:45

Re: [DEB] Debian package

Post by JonBackhaus »

Is there a particular repo for the CLI tool only? I'm running into an issue with the snap in Ubuntu 18.04 so I was hoping to try a different image.
User avatar
rednoah
The Source
Posts: 19365
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [DEB] Debian package

Post by rednoah »

There is no repository for headless FileBot only. But does it matter? Are you worried about disk space?
:idea: Please read the FAQ and How to Request Help.
TrueTenacity
Posts: 14
Joined: 28 Feb 2017, 15:19

Re: Conditional Structures (if-then-else)

Post by TrueTenacity »

rednoah wrote: 26 Jul 2018, 01:17 1.
If you just want to add the collection in front of the plex path, then you don't need if-then-else:

Code: Select all

{collection+'/'}{plex}
If you want a default value if collection is undefined, the I'd write something like this:

Code: Select all

{any{collection}{'No Collection'}/{plex}
You can't check if collection == null because of theThe Unwind-on-Undefined Behaviour, meaning collection is never null, it's either not null, or it crashes the {expression}.


2.
However, the error message you posted is completely unrelated to if-then-else and just tells us that we can't use the / operator between a String object and a File object.
How would one go about including folders in this?

Movies\Movie Collections\ if there's a collection
Movies\{az} if there isn't one
kim
Power User
Posts: 1077
Joined: 15 May 2014, 16:17

Re: Conditional Structures (if-then-else)

Post by kim »

Code: Select all

{plex[0]}/{any{'Movie Collections/'+collection}{az}}/{plex.tail}

Code: Select all

{any{'Movie Collections/'+collection.replaceAll('Collection')}{plex[0]+'/'+az}}/{plex.tail}

Code: Select all

{any{'Movie Collections/'+collection.replaceAll('Collection')}{'Movies/'+az}}/{plex.tail}

Code: Select all

{any{'Movie Collections/'+collection.replaceAll('Collection')}{(allOf{'Movies/'}{az}).join()}}/{plex.tail}
EDIT:
viewtopic.php?f=5&t=4796&p=35841#p35841
Last edited by kim on 17 Sep 2018, 23:29, edited 1 time in total.
TrueTenacity
Posts: 14
Joined: 28 Feb 2017, 15:19

Re: Conditional Structures (if-then-else)

Post by TrueTenacity »

Thanks!
kim
Power User
Posts: 1077
Joined: 15 May 2014, 16:17

Re: Conditional Structures (if-then-else)

Post by kim »

TrueTenacity wrote:18 Sep 2018, 07:46 Hi there,

I used your suggested fix for separating movies and collections, but I seem to have hit a snag...

My current expression is \\gaia-prime\Movies\{any{'Movie Collections/'+az+'/'+collection+'/'+ny+'/'+ny}{ny+'/'+ny}} [{vf}]{subt}

but when i add the az operator to the movies without a collection, the whole thing stops working.

am I adding it wrong or something?
You mean this ?

Code: Select all

\\gaia-prime\Movies\{any{'Movie Collections/'+az+'/'+collection+'/'+ny+'/'+ny}{az+'/'+ny+'/'+ny}} [{vf}]{subt}
sample output you want ?
TrueTenacity
Posts: 14
Joined: 28 Feb 2017, 15:19

Re: Conditional Structures (if-then-else)

Post by TrueTenacity »

that's it... it works PERFECTLY for a movie that is in a collection... but when you use it on a movie that isn't in one, it only adds the vf and subt part... the file name and path disappear...
kim
Power User
Posts: 1077
Joined: 15 May 2014, 16:17

Re: Conditional Structures (if-then-else)

Post by kim »

well if I try this (in GUI)

Code: Select all

\\gaia-prime\Movies\{any{'Movie Collections/'+az+'/'+collection+'/'+ny+'/'+ny}{az+'/'+ny+'/'+ny}} [{vf}]{subt}
I get output
e.g. \\gaia-prime/Movies/D/Demolition Man (1993)/Demolition Man (1993) [720p]
or \\gaia-prime/Movies/Movie Collections/A/Avatar Collection/Avatar (2009)/Avatar (2009) [720p]

try

Code: Select all

\\gaia-prime\Movies\{any{collection ? ('Movie Collections/'+az+'/'+collection+'/'+ny+'/'+ny) : 'collection found but something is wrong'} {az+'/'+ny+'/'+ny} {'WTF'} }
only if I write {az+'/'+ny+'/'+ny} wrong like so {az'/'+ny+'/'+ny} I get the
"but when you use it on a movie that isn't in one, it only adds the vf and subt part... the file name and path disappear..."

btw: there is a better way to write it

Code: Select all

\\gaia-prime\Movies\{any{'Movie Collections/'+az+'/'+collection}{az}}/{ny}/{ny} [{vf}]{subt}
or

Code: Select all

\\gaia-prime\Movies\{def altDir = ('Movie Collections/'+az+'/'); any{altDir+collection}{az}}/{ny}/{ny} [{vf}]{subt}
TrueTenacity
Posts: 14
Joined: 28 Feb 2017, 15:19

Re: Conditional Structures (if-then-else)

Post by TrueTenacity »

Kim,

Your better way does the trick!

Thanks!
alteredstate
Posts: 6
Joined: 14 Sep 2012, 23:15

Re: [DEB] Debian package

Post by alteredstate »

If I just want to use the Filebot CLI does that still require a paid license?
User avatar
rednoah
The Source
Posts: 19365
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [DEB] Debian package

Post by rednoah »

Yes. For the sake of simplicity, any and all versions on all platforms for all use cases now require the same universal license.
:idea: Please read the FAQ and How to Request Help.
User avatar
Rando
Posts: 1
Joined: 02 Oct 2018, 20:35

Re: [DEB] Debian package

Post by Rando »

Does 4.8.2 on Debian require Java 10 the same as the windows version? I'm using OpenJDK on my server and don't really want to install another runtime. Would 4.7.9 be the best option here?
User avatar
rednoah
The Source
Posts: 19365
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [DEB] Debian package

Post by rednoah »

The DEB package includes it's own private JRE so it does not require you to install any specific version of Java on your system.
:idea: Please read the FAQ and How to Request Help.
nothing919
Posts: 11
Joined: 16 Oct 2018, 22:27

Re: [TAR] How to install FileBot on Linux / FreeBSD / Solaris / any Unix OS

Post by nothing919 »

This also works on Arch Linux as long as you install this package from the AUR instead of the apt get listed package. On Arch it is jre8-openjdk and Java-openJFX. Currently the portable version of filebot is the only one availible for arch as the two versions from the AUR have been taken down.
iAmKoinu
Posts: 4
Joined: 19 Oct 2018, 14:06

Re: [Anime] Convert Absolute to SxE numbers

Post by iAmKoinu »

Hi there! Loving the program, just wanted to know if you planned on making this code customizable? I don't keep my episodes in the "SxE" format, and while i do know that I can just easily rename it to my liking with the preset I already have, it would be really nice to be able to convert absolute to my preferred naming scheme in one go!

Thanks for all your hard work! :D
User avatar
rednoah
The Source
Posts: 19365
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [Anime] Convert Absolute to SxE numbers

Post by rednoah »

Yes, should be pretty straight forward. What's not working? Where are you stuck?

e.g. convert Absolute to SxE in one go using your format:

Code: Select all

filebot -rename "One Piece 501.avi" --db TheTVDB --order Absolute --format "{n}.{y}.{order.airdate.s00e00}.#{absolute}.{t}.[{airdate}]" -non-strict
:idea: Please read the FAQ and How to Request Help.
Lantizia
Posts: 5
Joined: 31 Oct 2018, 11:55

Re: [DEB] Debian package

Post by Lantizia »

Hey, long time user here (just bought a lifetime license - although have donated before and also was a part of the patreon thing until it went no where)...

Just installed via APT and noticed a few odd quirks...

You're probably best not telling people to use --install-suggests. Mostly because a) 'recommends' would be a better fit and b) using --install-suggests is recursive, so you end up with a whole Web server (in my case apache2) being installed just because you installed FileBot :)...

Code: Select all

[email protected]:~/Downloads$ aptitude why apache2
i   filebot           Suggests   ffmpeg                                
i A ffmpeg            Suggests   ffmpeg-doc                            
i A ffmpeg-doc        Depends    libjs-jquery                          
i A libjs-jquery      Recommends javascript-common                     
i A javascript-common Suggests   apache2 (>= 2.4.6~) | lighttpd | httpd
Also in your last post to this thread you said the JRE is built in, if that is the case - why is it on the suggests list? (which is currently... openjdk-10-jre openjfx mediainfo libchromaprint-tools)

Perhaps a better apt-get line would be simply...

Code: Select all

sudo apt-get -y install openjfx mediainfo libchromaprint-tools filebot
Or instead make openjfx, mediainfo and libchromaprint-tools to be 'recommends' instead. Most desktop users are used to extra stuff being pulled in via recommends, whilst server administrators (I do this on my Debian boxes) turn off automatically installing recommends as a matter of course.

Thanks for all the hard work :)

Steven

p.s. more info on Debian policy for using suggests/recommends can be found here... https://www.debian.org/doc/debian-polic ... re-depends
vincen
Posts: 32
Joined: 12 Sep 2017, 07:25

Re: [DEB] Debian package

Post by vincen »

Still have again the problem of access at local files :( Installed it with deb package using the script suggested but Filebot is unable to access any local files of the system :(
User avatar
rednoah
The Source
Posts: 19365
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [DEB] Debian package

Post by rednoah »

Lantizia wrote: 31 Oct 2018, 12:04 You're probably best not telling people to use --install-suggests. Mostly because a) 'recommends' would be a better fit and b) using --install-suggests is recursive, so you end up with a whole Web server (in my case apache2) being installed just because you installed FileBot :)...
Well, that definitely sucks...

Lantizia wrote: 31 Oct 2018, 12:04 Also in your last post to this thread you said the JRE is built in, if that is the case - why is it on the suggests list? (which is currently... openjdk-10-jre
Due to the changes in JDK 11 (i.e. no more Oracle JRE with JavaFX built-in) there's no point to do this on Linux in the future. Is there a working OpenJFX 11 package in the Debian repository already?

Lantizia wrote: 31 Oct 2018, 12:04 Perhaps a better apt-get line would be simply...

Code: Select all

sudo apt-get -y install openjfx mediainfo libchromaprint-tools filebot
Or instead make openjfx, mediainfo and libchromaprint-tools to be 'recommends' instead. Most desktop users are used to extra stuff being pulled in via recommends, whilst server administrators (I do this on my Debian boxes) turn off automatically installing recommends as a matter of course.
Quite possibly. If Recommends is indeed pulled automatically on Desktop Linux machines, then it makes sense to do:

Code: Select all

Depends: <stuff required for the CLI>
Recommends: <stuff required for the GUI only>
Does that sound reasonable?
:idea: Please read the FAQ and How to Request Help.
Lantizia
Posts: 5
Joined: 31 Oct 2018, 11:55

Re: [DEB] Debian package

Post by Lantizia »

If I think I understand you correct, both Debian and Ubuntu have openjfx as it's own package...

http://packages.debian.org/openjfx (which is OpenJFX v8 in Debian 9 - the latest stable version, but it'll be v11 in the next version of Debian)
http://packages.ubuntu.com/openjfx (again it is v8 in Ubuntu 18.04 - the latest long term version that I use, but its v11 in Ubuntu 18.10 and it'll be v11 in 19.04)

I wouldn't be able to say one way or the other how this affects FileBot as I'm not too familiar with the JFX bit.

Your "DEBIAN/control" file in the package could simply change this one line...

Code: Select all

Suggests: openjdk-10-jre, openjfx, xdg-utils, ffmpeg, mediainfo, libchromaprint-tools
For...

Code: Select all

Recommends: openjdk-10-jre, openjfx, xdg-utils, ffmpeg, mediainfo, libchromaprint-tools
I wouldn't specify any "Depends: " unless any of those packages are critical for the core functionality of FileBot to operate normally.
If 100% of those additional packages are optional, then they need to be "Recommends: "

This is fine as *all* Debian-derived distributions I've ever encountered (BOTH servers and desktops) all install recommended packages by default.

It's only certain server-admins (like me) that manually make it system-wide policy not to install recommends on server - just so that we can see what they'd be and choose to install them after if needed to lower the security footprint of the server.

If you do make the above change, remember that in your deb.sh file you can change...

Code: Select all

sudo apt-get install filebot --install-suggests
To simply be...

Code: Select all

sudo apt-get install filebot
As for the idea about CLI usage vs GUI usage. Most packages I've seen usually have a 'filebot-cli' and a 'filebot' (or filebot-gtk, filebot-ui, etc...). Essentially the 2nd package (the ui one) makes 'filebot-cli' a dependency of itself. That might be one possible thought?

But depends vs recommends vs suggests - this hasn't really got anything to do with purpose such as cli vs gui
User avatar
rednoah
The Source
Posts: 19365
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [DEB] Debian package

Post by rednoah »

FileBot 4.8.5 is now in BETA and a new Debian package is available for testing here:
https://get.filebot.net/filebot/FileBot_4.8.5/

:?: Feedback is welcome.

The new Debian package is now platform-independent and can work an any architecture, but that means that all native code is handled via APT dependencies, i.e. OpenJDK 11 and OpenJFX 11 is now required.

:!: You may need the latest version of Ubuntu, since older LTS releases will give you OpenJFX 8 and not OpenJFX 11 if you do apt install openjfx.
:idea: Please read the FAQ and How to Request Help.
Lantizia
Posts: 5
Joined: 31 Oct 2018, 11:55

Re: [DEB] Debian package

Post by Lantizia »

Not tested this package yet - but after reading what you've wrote... this sounds like a step backwards!

Nobody in their right mind runs a non-LTS version of Ubuntu unless they're prepared to deal with the unforeseen consequences of something that...
a) only got knocked up because it happened to be either the month of April or October in a year - and not because it was actually ready or properly tested.
b) only gets support for 9 months.

It's more like a preview release in my mind - not really like bi-annual Windows 10 update... as with a non-LTS Ubuntu *every* package version changes breaking the ability to use many 3rd party bits of software which are not ready for it.

Most people (like me) who use Ubuntu in a production environment (personally for me that is definitely my place of work, but also at home as I don't want to be fixing bugs all day) will use whatever the latest LTS is (usually about 4 months after it came out to let the dust settle) and in the case of 18.04 it'll be supported until April 2023 - but most will switch to 20.04 at around August 2020 (4 months after the release of 20.04).

Please don't make this only usable on (in my opinion) non-stable Ubuntu versions only - and especially on Debian 10 only, as that thing is definitely not stable!
User avatar
rednoah
The Source
Posts: 19365
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [DEB] Debian package

Post by rednoah »

Maybe you can try it and see if there's any particular issue on 16.04 LTS or 18.04 LTS. Since I still only use Recommends the package will should install just fine on any system, allowing you to satisfy dependencies manually as needed.

AFAIK, only OpenJFX is a problem, but that's not even required at all if you're only interested in the CLI tools, and easy to install (i.e. copy files) manually if needed and that I could help automate via shell scripts.

If Java 11 is an issue, then we could consider sticking to Java 8 (which makes JavaFX work out of the box on 18.04 but not work on anything newer) but the portable tar is already there to cover people that need backwards compatibility.

Anyway, I'm open to suggestions here, especially considering that GUI users and CLI users might very likely be running on different environments.
:idea: Please read the FAQ and How to Request Help.
Lantizia
Posts: 5
Joined: 31 Oct 2018, 11:55

Re: [DEB] Debian package

Post by Lantizia »

So now on a fresh Ubuntu 18.04 install (tested in a VM) - if you just download the .deb file and open/double-click it normally (letting GDebi install it graphically) you'll end up with filebot failing to load with...

/usr/bin/filebot: 14: /usr/bin/filebot: java: not found

If you use 'sudo apt -y install ./FileBot_4.8.5.deb' then you'll get...

Error: LinkageError occurred while loading main class net.filebot.Main
java.lang.UnsupportedClassVersionError: net/filebot/Main has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 54.0

Naturally these *can* be resolved after the fact... but that's not really the point :)

Installing some basic desktop application really ought to just be...
Step 1) Add the additional repository (either graphically through Software & Updates, or via command line)
Step 2) Tell your system the name of the package you want to install (again graphically or command line)

You've kind of got all the information you need, it's up to you how to do this. I suspect you don't package for Linux all that often (just a feeling).

Personally I'd whack arch-dependant versions of openjfx in to the package itself (and the package could stay multi-arch) just like you do libjnidispatch.so.

To be honest including only aarch64/armv7l/i686/x86_64 versions of libjnidispatch.so means the package isn't really 'all' arch anyway - and the Debian lintian systems picks up on that and may warn people the package is of bad quality :S But I don't care about that personally.
User avatar
rednoah
The Source
Posts: 19365
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [DEB] Debian package

Post by rednoah »

Does apt not automatically install Recommends packages? It seems that openjdk-11-jre is not installed automatically.

:idea: Forcing things via Depends has its own pitfalls. See discussions above.

:idea: Including OpenJFX is possible, but then it's gonna be amd64 only, as OpenJFX only publishes amd64 binaries. There seem to be more and more Raspberry Pi GUI users recently, so multi-platform would be preferred.
:idea: Please read the FAQ and How to Request Help.
Post Reply