Page 1 of 1

A custom file format working for TV but not Anime

Posted: 24 Aug 2018, 00:27
by casonbang
I've been using this custom file format for a year or two for both TV and anime on Synology. (I keep them in the same place/format and didn't see another way to process anime the same as TV.)

It worked for awhile, and then quit working. It still works for TV, but no longer for anime.

Error:
Schedule & Dry Run buttons don't do anything in FileBot Node when this format is in the Anime field. No entry in the Task list, output in the log window, or dialog box.

Custom file format:

Code: Select all

tv/{n}/{n} - {episode.special ? 'S00E'+special.pad(2) : s00e00} - {t.replaceAll(/[`´‘’ʻ]/, /'/).replaceAll(/[!?.]+$/).replacePart(', Part $1')}{'.'+lang}  [{minutes} min, {vf}  {def mHDRCol = ["BT.709" : "NO", "BT.2020" : "YES"]; if(self.video[0].bitdepth != null && self.bitdepth == 10 && self.video[0].colourprimaries != null &&  mHDRCol.get(self.video[0].colourprimaries) == "YES") 'HDR' else 'NonHDR';}  {vc},  { def ChannelString = any{(0.0+audio.'ChannelPositionsString2'*.replaceAll(/Object\sBased\s\/|0.(?=\d.\d)/, '')*.split(' / ')*.collect{ it.split('/')*.toBigDecimal().sum() }*.max().max()).toString()}{channels}; def codecSubVersion = any{audio.any{ a -> call{a.FormatProfile} =~ 'HRA' } ? 'HRA' : null}{audio.any{ a -> call{a.FormatProfile} =~ 'X / MA / Core' } ? ' X' : null}{audio.any{ a -> call{a.FormatProfile} =~ 'MA / Core' } ? ' MA' : null}{audio.any{ a -> call{a.FormatProfile} =~ 'ES Matrix / Core' } ? '-ES' : null}{null}; def codecVersion = any{audio.Codec.join().match(/DTS-HD/)+codecSubVersion+' '+audio.Codec.join().match(/TrueHD/)}{audio.Codec.join().match(/DTS-HD/)+codecSubVersion}{audio.Codec.join().match(/TrueHD/)}{audio.Codec.join().match(/DTS/)+codecSubVersion.replaceAll(/null/)}{ac}; (allOf{' '+codecVersion.replaceAll(/null/)} {if( ((ac == 'AAC'||ac == 'MP3') && (channels != '2.0' || ChannelString != channels) ) || ( (ac == 'AC3'||ac == 'DTS'||ac == 'TrueHD') && (channels != '5.1' || ChannelString != channels) ) ) return {any{ChannelString}{channels}}} {aco.match(/Atmos/)}).join(' ') }]
System Info:

Code: Select all

i686
FileBot 4.8.2 (r5789)
JNA Native: 5.2.2
MediaInfo: 17.12
7-Zip-JBinding: 9.20
Chromaprint: 1.4.3
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2018-08-14 (r534)
Groovy: 2.5.1
JRE: Java(TM) SE Runtime Environment 1.8.0_131
JVM: 32-bit Java HotSpot(TM) Client VM
CPU/MEM: 4 Core / 473 MB Max Memory / 10 MB Used Memory
OS: Linux (i386)
HW: Linux CloudBang 3.2.40 #23739 SMP PREEMPT Fri Jun 8 12:47:37 CST 2018 i686 GNU/Linux synology_evansport_214play
DATA: /volume1/@appstore/filebot/data/admin
Package: SPK
License: FileBot License P3949794 (Valid-Until: 2019-07-03)
Done ヾ(@⌒ー⌒@)ノ

Re: A custom file format working for TV but not Anime

Posted: 24 Aug 2018, 00:34
by casonbang
I think this was the source of the issue I posted previously where the Dry Run and Schedule buttons weren't working in some browsers. Just took me awhile to figure out that the custom format fields played a part. :)

viewtopic.php?f=13&t=5875&p=33620#p33620

Re: A custom file format working for TV but not Anime

Posted: 24 Aug 2018, 06:36
by rednoah
Sorry, this format is way too complicated to be defined by "works" and "doesn't work" as the various bits and pieces may or may not work depending on the situation.

:?: Which exact part of this lengthy format is not working?

:?: Any specific {binding} that does not yield the expected value?

Re: A custom file format working for TV but not Anime

Posted: 24 Aug 2018, 08:13
by casonbang
What’s the best way to better test the format (For instance, do the desktop versions process custom fields the same as Filebot Node?)
Are there any differences I need to consider between anime and tv processing? Do they support the same operators and infos?

Thanks

Re: A custom file format working for TV but not Anime

Posted: 24 Aug 2018, 09:06
by rednoah
1.
Custom formats work the same across all operating systems. The best way to develop and test a new format is to use the GUI Format Editor, and a good range of sample files so you can figure out corner cases, and then simply paste the final result into FileBot Node.

In your case, the first step is to narrow down which {expression} isn't working correctly. The first expression {n} is simple and definitely works for both AniDB and TheTVDB data.


2.
TV is TheTVDB. Anime is AniDB. There might be differences in what bindings are available, depending on the database. Most notably, Anime don't have season numbers, so bindings such as {s} don't work for AniDB Anime.