[LINUX-DEBIAN] {subt} {languages} {info} {audios} {texts} not work

Support for Ubuntu and other Desktop Linux distributions
Post Reply
blurk
Posts: 3
Joined: 04 Nov 2016, 20:56

[LINUX-DEBIAN] {subt} {languages} {info} {audios} {texts} not work

Post by blurk »

Hello, I have the latest version of filebot, I installed the packet amd64 filebot for debian.

My problem is that it is impossible for me to recover the languages ​​of the file or even the subtitles. I can't use :

Code: Select all

'audio->1'{audios
.groupBy{ it.Codec }.collect{ c, a -> [c] + a*.Language }.flatten().join('.')}'2'{ac}{af}'3'{subt}'4'{languages}'6'{texts}'7'{info.SpokenLanguages[0]}'9'{audios.language[0]}'subt->'{(fn.toLowerCase().contains('vostfr') || fn.toLowerCase().contains('s
ubforced')) && texts.language.flatten().join('.').isEmpty()  ? '[fr]' : ''}{'['+texts.language.flatten().join('.')+']'}
I just want to display all languages ​​like:
[en.fr]
And subtitles in the same way:
[de.en]

Something like :
Code Geass Hangyaku no Lelouch - 1x19 - Island of the Gods[x264.720p.Blu-ray.en.fr][de.en].mkv

This is my sysinfo:

Code: Select all

root@ca3d68798b9e:/media/sas/Anime# filebot -script fn:sysinfo
FileBot 4.7.2 (r4178)
JNA Native: 4.0.1
MediaInfo: 0.7.69
7-Zip-JBinding: 9.20
Chromaprint: 1.1.0
Extended Attributes: OK
GVFS: OK
Script Bundle: 2016-11-07 (r458)
Groovy: 2.4.7
JRE: OpenJDK Runtime Environment 1.8.0_111 (headless)
JVM: 64-bit OpenJDK 64-Bit Server VM
CPU/MEM: 1 Core / 241 MB Max Memory / 11 MB Used Memory
OS: Linux (amd64)
Package: DEB
Data: /root/.filebot
uname: Linux ca3d68798b9e 4.4.27-boot2docker #1 SMP Tue Oct 25 19:51:49 UTC 2016 x86_64 GNU/Linux
Done ()
I just try to execute this command:

Code: Select all

filebot -script fn:amc  --output "/media/out" --action test -non-strict "/media/sas" --log-file "/media/logs/fb_2016-11-23_13h42m.log" --def minFileSize=0 minLengthMS=0 excludeList="/media/logs/exc_fb_2016-11-23_13h42m.log" --conflict auto --def stor
eReport=y --def animeFormat="/media/out/animes/{primaryTitle} ({y})/{primaryTitle} - {sxe} - {t.replaceAll(/[!?.]+$/).replaceAll(/[`]/, /'/).replacePart(', Part $1')}{' (' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|spec
ial.edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, ' ') + ')'}[{vc}{'.'+vf}{fn.toLowerCase().contains('3d') || fn.toLowerCase().contains('3-d') ? '.3D':''}{'.'+source.replaceAll('(?i)BluRay', 'Blu-ray')}'audio->1'{audios
.groupBy{ it.Codec }.collect{ c, a -> [c] + a*.Language }.flatten().join('.')}'2'{ac}{af}'3'{subt}'4'{languages}'6'{texts}'7'{info.SpokenLanguages[0]}'9'{audios.language[0]}'subt->'{(fn.toLowerCase().contains('vostfr') || fn.toLowerCase().contains('s
ubforced')) && texts.language.flatten().join('.').isEmpty()  ? '[fr]' : ''}{'['+texts.language.flatten().join('.')+']'}]"
And you can have the result of execution here (it's dropbox link to txt file):
https://www.dropbox.com/s/v70xu7gy9h9h1 ... n.txt?dl=0

Just to be sure here you have the mediainfo of one of the files (two languages and two subtitles) (it's dropbox link to txt file):
https://www.dropbox.com/s/lw0ajrangeq5e ... v.txt?dl=0

Thanks for your help.
Regards,
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [LINUX-DEBIAN] {subt} {languages} {info} {audios} {texts} not work

Post by rednoah »

Well, your format is way too complicated so i'm not gonna look at it.

Is there any specific {binding} that doesn't work as expected or that can't be transformed to the value you want?

e.g.

Code: Select all

{[text.language.join('.')]}
The MediaInfo of the file you posted contains two French subtitle tracks, so this expression will evaluate to [fr.fr].
:idea: Please read the FAQ and How to Request Help.
blurk
Posts: 3
Joined: 04 Nov 2016, 20:56

Re: [LINUX-DEBIAN] {subt} {languages} {info} {audios} {texts} not work

Post by blurk »

Ok my bad !
I have confused between
texts
and
text

Code: Select all

{[text.language.join('.')]}
And for languages it's the same thing, I have confused between
audios
and
audio

Code: Select all

{[audio.groupBy{ it.Codec }.collect{ c, a -> [c.replaceAll(' ','-')] + a*.Language }.flatten().join('.')]}
This works for me to obtain audios languages

Thanks, sorry for waste of time

Just need to RTFM -> http://www.filebot.net/naming.html
Last edited by blurk on 23 Nov 2016, 21:25, edited 1 time in total.
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [LINUX-DEBIAN] {subt} {languages} {info} {audios} {texts} not work

Post by rednoah »

{audio} and {audio[0]} are now what {audios} and {audio} used to be in older versions of FileBot. Same for all the other generic MediaInfo *s bindings.
:idea: Please read the FAQ and How to Request Help.
blurk
Posts: 3
Joined: 04 Nov 2016, 20:56

Re: [LINUX-DEBIAN] {subt} {languages} {info} {audios} {texts} not work

Post by blurk »

One last question :
How to test if text is empty:

Code: Select all

{text}
give an empty value in my name.
How to test correctly if text is null or empty ?

Code: Select all

(text==null)||(text=="")
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [LINUX-DEBIAN] {subt} {languages} {info} {audios} {texts} not work

Post by rednoah »

You can't because it can't not have a value (and it'll throw instead if that were the case). What are you trying to do? There's probably a better way to express that.

e.g.

Code: Select all

{any{text.language}{'No Text'}}
@see viewtopic.php?f=5&t=1895
:idea: Please read the FAQ and How to Request Help.
Post Reply