POSTBUCKET - where random posts in unrelated topics go

Any questions? Need some help?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Q&A for n00bs

Post by rednoah »

Code: Select all

To connect to app.filebot.net insecurely, use `--no-check-certificate'.
So have you tried --no-check-certificate yet?
:idea: Please read the FAQ and How to Request Help.
saitoh183
Posts: 112
Joined: 02 Oct 2012, 16:59

Re: Q&A for n00bs

Post 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.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Q&A for n00bs

Post 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?
:idea: Please read the FAQ and How to Request Help.
Manu
Posts: 5
Joined: 15 Nov 2016, 22:08

AMC Illegal usage: no input

Post 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.
i10
Posts: 14
Joined: 12 Nov 2016, 23:14

Re: Exclude Blacklist & Series-Mappings

Post by i10 »

V > V (2009)
OUaT > Once Upon a Time
Person > Person of Interest
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Exclude Blacklist & Series-Mappings

Post by rednoah »

Examples for file paths that are misidentified would be helpful for testing.

@see viewtopic.php?f=3&t=1868
:idea: Please read the FAQ and How to Request Help.
i10
Posts: 14
Joined: 12 Nov 2016, 23:14

Re: Exclude Blacklist & Series-Mappings

Post by i10 »

GUI, TheTVDB:
Person.of.Interest\Person s01e01
V\V s01e01
Once.Upon.a.Time\OUaT s01e01
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Exclude Blacklist & Series-Mappings

Post 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.
:idea: Please read the FAQ and How to Request Help.
i10
Posts: 14
Joined: 12 Nov 2016, 23:14

Re: Exclude Blacklist & Series-Mappings

Post by i10 »

opportunistic mode:
Image
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Exclude Blacklist & Series-Mappings

Post 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.
:idea: Please read the FAQ and How to Request Help.
i10
Posts: 14
Joined: 12 Nov 2016, 23:14

Re: Exclude Blacklist & Series-Mappings

Post by i10 »

It shouldn't match "Person" with "Personal Taste" at all.
UKenGB
Posts: 49
Joined: 04 Jan 2017, 09:26

Re: Conditional Structures (if-then-else)

Post by UKenGB »

Can either method be nested?

Any 'case' structures possible?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Conditional Structures (if-then-else)

Post 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.
:idea: Please read the FAQ and How to Request Help.
xflak
Power User
Posts: 53
Joined: 25 Feb 2015, 01:51

Re: [SNIPPET] Override/Hardcode Series Names

Post 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.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [SNIPPET] Override/Hardcode Series Names

Post by rednoah »

Relative paths passed to csv(...) are now expected to be relative to your $HOME directory.
:idea: Please read the FAQ and How to Request Help.
neutron
Posts: 8
Joined: 23 Aug 2015, 07:43

Re: Exclude Blacklist & Series-Mappings

Post by neutron »

How do i use those lists, or are they used automatically ?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Exclude Blacklist & Series-Mappings

Post by rednoah »

They're used automatically.
:idea: Please read the FAQ and How to Request Help.
tatere
Posts: 2
Joined: 13 Mar 2017, 22:10

Re: Exclude Blacklist & Series-Mappings

Post 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?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Exclude Blacklist & Series-Mappings

Post 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.
:idea: Please read the FAQ and How to Request Help.
tatere
Posts: 2
Joined: 13 Mar 2017, 22:10

Re: Exclude Blacklist & Series-Mappings

Post 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.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Exclude Blacklist & Series-Mappings

Post 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.
:idea: Please read the FAQ and How to Request Help.
dfur
Posts: 2
Joined: 25 Mar 2017, 07:25

Re: Q&A for n00bs

Post 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?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Q&A for n00bs

Post 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.
:idea: Please read the FAQ and How to Request Help.
dfur
Posts: 2
Joined: 25 Mar 2017, 07:25

Re: Q&A for n00bs

Post 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
ffreese
Posts: 2
Joined: 09 May 2016, 14:18

Re: Exclude Blacklist & Series-Mappings

Post 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?
Post Reply