Page 18 of 41

Re: Q&A for n00bs

Posted: 07 Nov 2016, 06:13
by rednoah

Code: Select all

To connect to app.filebot.net insecurely, use `--no-check-certificate'.
So have you tried --no-check-certificate yet?

Re: Q&A for n00bs

Posted: 10 Nov 2016, 19:01
by saitoh183
Quick question about this filter: 'age < 7 || !model.any{ it.age < 7 }'

What does this portion !model.any{ it.age < 7 } tell filebot to do. I have searched the forum to try to understand but i didnt find anything.

Re: Q&A for n00bs

Posted: 10 Nov 2016, 19:13
by rednoah
rednoah wrote:only include episode data of recently aired episodes if there are any recently aired episodes, but otherwise default to accepting any episode data.

Code: Select all

--filter "age < 7 || !model.any{ it.age < 7 }"
@see viewtopic.php?f=3&t=2127


{age} is the age of the episode you're including or excluding. {model.age} is a list of all age values for all episodes in the current context. It's easy if you open the Format Editor on some real data and then just play with it for a few minutes.

model.any{ it.age < 7 } ... out of all the episodes being considered, is there any single episode that was aired within the last 7 days, yes or no?

AMC Illegal usage: no input

Posted: 15 Nov 2016, 22:17
by Manu
Hi,

I've been using Filebot and AMC with qbittorrent without a problem since march. I have no idea what has gone wrong, but it hasn't worked for two weeks now.

Here's what I have in qbittorrent
filebot -script fn:amc --output "L:/SARJAT" --action duplicate --conflict skip -non-strict --log-file amc.log --def excludeList=amc.excludes unsorted=y music=y artwork=y "ut_dir=%F" "ut_kind=multi" "ut_title=%N" "ut_label=%L" --def movieFormat="J:/{ny}/{fn}"
And here's what the .log file says
Run script [fn:amc] at [Wed Nov 16 00:05:10 EET 2016]
Parameter: excludeList = amc.excludes
Parameter: unsorted = y
Parameter: music = y
Parameter: artwork = y
Parameter: ut_dir = %F
Parameter: ut_kind = multi
Parameter: ut_title = %N
Parameter: ut_label = %L
Parameter: movieFormat = J:/{ny}/{fn}
Bad ut_dir value: %F
Bad ut_title value: %N
Bad ut_label value: %L
Illegal usage: no input
Failure (°_°)
There could be a mistake in the qbittorrent part, I rewrote it after AMC stopped working.

also in the qbittorrent my temp folder is: L:\temp
and finished download folder is: L:\_SORT

I investigated and concluded that AMC doesn't get the labels from qbittorrent, which is the reason everything is broken. I have no idea why tho.

I changed the command to something that is a bit closer that I had before.
filebot -script fn:amc --output "L:/SARJAT" --action duplicate --conflict skip -non-strict --log-file amc.log --def excludeList=amc.excludes unsorted=y music=y artwork=y "ut_dir=%F" "ut_kind=multi" "ut_title=%N" "ut_label=%L" --def movieFormat="J:/_Elokuvat/{n} ({y})/{fn}" --def seriesFormat="L:/SARJAT/{n}/{'Season '+s}/{fn}"
Please help me, after using the AMC for so long and it now being broken is driving me suicidal.

From Finland with Love,
Manu

EDIT: Got it working by reinstalling qbittorrent again.

Re: Exclude Blacklist & Series-Mappings

Posted: 04 Dec 2016, 10:58
by i10
V > V (2009)
OUaT > Once Upon a Time
Person > Person of Interest

Re: Exclude Blacklist & Series-Mappings

Posted: 04 Dec 2016, 15:42
by rednoah
Examples for file paths that are misidentified would be helpful for testing.

@see viewtopic.php?f=3&t=1868

Re: Exclude Blacklist & Series-Mappings

Posted: 04 Dec 2016, 16:16
by i10
GUI, TheTVDB:
Person.of.Interest\Person s01e01
V\V s01e01
Once.Upon.a.Time\OUaT s01e01

Re: Exclude Blacklist & Series-Mappings

Posted: 05 Dec 2016, 15:54
by rednoah
1.
It seems that some optimization broke file parsing, and it ended up applying "file name without extension" logic to folder names, so it was search for "Person.of" and "Once.Upon.a" which makes no sense.


2.
V is just one letter, so it's tricky. If you process many episodes of different shows at once the V will probably be ignored. If you then process only one of V in a single batch (or better yet, many episodes of V) then it'll work better.

Re: Exclude Blacklist & Series-Mappings

Posted: 05 Dec 2016, 19:47
by i10
opportunistic mode:
Image

Re: Exclude Blacklist & Series-Mappings

Posted: 06 Dec 2016, 08:39
by rednoah
Yes, it's a bug, cause it should pick the right show based on the folder name.

Nothing that can be fixed by adding entries to the blacklist.

I'll upload a new build later you can test.

Re: Exclude Blacklist & Series-Mappings

Posted: 06 Dec 2016, 12:12
by i10
It shouldn't match "Person" with "Personal Taste" at all.

Re: Conditional Structures (if-then-else)

Posted: 07 Jan 2017, 18:17
by UKenGB
Can either method be nested?

Any 'case' structures possible?

Re: Conditional Structures (if-then-else)

Posted: 07 Jan 2017, 18:44
by rednoah
1.
Yes, ternary expressions and all control structures in general can be nested, as one would expect from a general purpose programming language.

2.
Yes, but switch statements tend to be a bit too verbose for my taste for simple format expressions.

Re: [SNIPPET] Override/Hardcode Series Names

Posted: 24 Feb 2017, 04:52
by xflak
So I just updated filebot, and relative path references I used in my old code stopped working

Code: Select all

{csv('list.csv').get(n) ?: n}
to get it to work I had to replace the relative path with the absolute path

Code: Select all

{csv('C:/Program Files/FileBot/list.csv').get(n) ?: n}
Not a huge deal, but wanted to report in case it can either get rolled back and\or just to notify other potentially having the same issue

Thanks.

Re: [SNIPPET] Override/Hardcode Series Names

Posted: 24 Feb 2017, 07:33
by rednoah
Relative paths passed to csv(...) are now expected to be relative to your $HOME directory.

Re: Exclude Blacklist & Series-Mappings

Posted: 06 Mar 2017, 09:25
by neutron
How do i use those lists, or are they used automatically ?

Re: Exclude Blacklist & Series-Mappings

Posted: 06 Mar 2017, 09:58
by rednoah
They're used automatically.

Re: Exclude Blacklist & Series-Mappings

Posted: 13 Mar 2017, 22:17
by tatere
The old version of the exclude blacklist file
http://app.filebot.net/data/exclude-blacklist.txt
is now just a wildcard -

Code: Select all

.*
The server I'm on is running an old version.

Is there any way to pass in an updated URL? It's in a properties file in the jar, would we have to alter and recompile from that?

Re: Exclude Blacklist & Series-Mappings

Posted: 14 Mar 2017, 05:57
by rednoah
:!: Using extremely outdated versions of FileBot is highly discouraged. FileBot hasn't been using HTTP for a loooong time.

:idea: Why don't you just use the latest version? That'd be much less effort than hacking some code from 2-3 years ago.

Re: Exclude Blacklist & Series-Mappings

Posted: 14 Mar 2017, 18:48
by tatere
Sadly it's not up to me. I'll pass that on. It does seem like that file changed very recently to be a wildcard - like sometime last week.

Re: Exclude Blacklist & Series-Mappings

Posted: 15 Mar 2017, 07:18
by rednoah
You can let the decision maker know that running outdated software is not a good idea, and quite potentially a security risk.

In this case, I've made the change just to see what happens, but please note that since you're using HTTP a man-in-the-middle attacker could easily do the same and send back arbitrary patterns to change how FileBot works.

Re: Q&A for n00bs

Posted: 25 Mar 2017, 08:31
by dfur
This may well be a n00b problem but it took me ages to pin down where the problem was. I couldn't get the AMC script working when I added the default format expression for TV shows (copied from here). I eventually narrowed the problem down to one character in this part of the expression

Code: Select all

t.replaceAll(/[`´‘’ʻ]/, /'/)
The first character in the regex is a "backtick" or more correctly a "grave accent" and it was causing my script to fail, or at least pause and display a > prompt. If I removed that one character or escaped it with a backslash, as below, the script worked perfectly

Code: Select all

[\`´‘’ʻ]
I am curious to know why this problem might have occured. I am v new to groovy, but I recall reading that in slashy strings, the only character that needed to be escaped was the forward slash. What could be going wrong here?

Re: Q&A for n00bs

Posted: 25 Mar 2017, 08:35
by rednoah
` has special meaning in cmd and bash:
rednoah wrote:Use the @file syntax for reading cmdline args from text files so you don't have to worry about quoting and escaping arguments
Groovy is your friend. CMD is not.

Re: Q&A for n00bs

Posted: 26 Mar 2017, 04:26
by dfur
Wow! :o I've just read up on backticks and command substution in Bash. That's quite a powerful little character.

For the record, any command between a pair of backticks will be run first and the output used as part of the main command. A single backtick causes Bash to show a prompt and wait for a command. Entering another backtick returns control to the original command. In modern shells, $(some command) does the same as, and is preferred to `some command`

So my interpretation is that using the unescaped backtick in an expression it is ok if the Groovy script is run by uTorrent, but definitely not if its run in Bash or CMD. I'll look into your suggested solution of reading arguments from a text file.

Thank you rednoah

Re: Exclude Blacklist & Series-Mappings

Posted: 31 Mar 2017, 20:38
by ffreese
Hi,
for me there was one big reason to stay at v 4.2 with the old gui: I run filebot on a server and use x2go for access.
As newer filebot versions need glx > V1.3 they simply do stall, because x2go is stuck at V1.2...

Maybe we could have a modern version with oldstyle-gui for older pc or x2go-users?