Q&A for n00bs

Running FileBot from the console, Groovy / FileBot scripting, shell scripts, etc
kise
Posts: 19
Joined: 17 Sep 2019, 21:28

Re: Q&A for n00bs

Post by kise » 04 Nov 2019, 16:04

Hi,

I Use deluge executor script to rename files on completion, everything is fine except one minor problem, i would like to ignore non video files my script is quite completed as it is, is it possible to do so via --filter or anything anyways my scripts produce the following command based on file path.

Code: Select all

/usr/bin/filebot --db TheTVDB \
--q 360733 \
-rename '/media/e1b7/m7eesn/completed/tv/bydb-ttd/byid-360733/Watchmen.S01E02.1080p.WEB.h264-TBS[rarbg]' \
--output '/media/e1b7/m7eesn/media/TV Shows/' \
--format '{n}/Season {s.pad(2)}/{n} - {s00e00} - {t}' \
-non-strict \
--encoding utf8 \
--log all \
--log-file '/media/e1b7/m7eesn/src/logs/amc/2019_11_04.log' \
--action move \
--conflict index \
--def music=false \
--def skipExtract=true \
--def artwork=false \
--def ut_kind=multi \
--def minFileSize=100 \
--def minLengthMS=5

User avatar
rednoah
The Source
Posts: 16949
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Q&A for n00bs

Post by rednoah » 04 Nov 2019, 16:56

You can use the --file-filter for that:

Code: Select all

--file-filter f.video
:idea: viewtopic.php?t=4222


:!: --def name=value options are script options, in this case, specific to the amc script, so in this -rename these options do nothing.
:idea: Please read the FAQ and How to Request Help.

kise
Posts: 19
Joined: 17 Sep 2019, 21:28

Re: Q&A for n00bs

Post by kise » 04 Nov 2019, 17:02

rednoah wrote:
04 Nov 2019, 16:56
You can use the --file-filter for that:

Code: Select all

--file-filter f.video
:idea: viewtopic.php?t=4222
thats great to hear, does the filter include ONLY videos files or subs included as well?

User avatar
rednoah
The Source
Posts: 16949
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Q&A for n00bs

Post by rednoah » 04 Nov 2019, 17:04

f.video yields true for video files only.
:idea: Please read the FAQ and How to Request Help.

kise
Posts: 19
Joined: 17 Sep 2019, 21:28

Re: Q&A for n00bs

Post by kise » 04 Nov 2019, 17:07

rednoah wrote:
04 Nov 2019, 17:04
f.video yields true for video files only.
thats great, is it possible to combine two filters for video and subs?, i really just dont want nfo files :)

User avatar
rednoah
The Source
Posts: 16949
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Q&A for n00bs

Post by rednoah » 04 Nov 2019, 19:01

1.
kise wrote:
04 Nov 2019, 17:07
combine two filters for video and subs
Include video or subtitle files:

Code: Select all

--file-filter 'f.video || f.subtitle'


2.
kise wrote:
04 Nov 2019, 17:07
i really just dont want nfo files
Exclude *.nfo files:

Code: Select all

--file-filter 'ext != /nfo/'
:idea: Please read the FAQ and How to Request Help.

kise
Posts: 19
Joined: 17 Sep 2019, 21:28

Re: Q&A for n00bs

Post by kise » 05 Nov 2019, 17:12

rednoah wrote:
04 Nov 2019, 19:01
1.
kise wrote:
04 Nov 2019, 17:07
combine two filters for video and subs
Include video or subtitle files:

Code: Select all

--file-filter 'f.video || f.subtitle'


2.
kise wrote:
04 Nov 2019, 17:07
i really just dont want nfo files
Exclude *.nfo files:

Code: Select all

--file-filter 'ext != /nfo/'
Thank you, is there any up to date documentation page with those new changes fixes etc? it's really hard hunting those small but important changes.

User avatar
rednoah
The Source
Posts: 16949
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Q&A for n00bs

Post by rednoah » 05 Nov 2019, 17:37

kise wrote:
05 Nov 2019, 17:12
Thank you, is there any up to date documentation page with those new changes fixes etc? it's really hard hunting those small but important changes.
The release notes can be found here:
https://github.com/filebot/docs/blob/master/CHANGES.md

The --file-filter option was introduced with FileBot 4.8.2 but I'm not sure what that would have to do with changes and fixes, since it was just new at the time, and the examples given above would have worked from day one.
:idea: Please read the FAQ and How to Request Help.

kise
Posts: 19
Joined: 17 Sep 2019, 21:28

Re: Q&A for n00bs

Post by kise » 05 Nov 2019, 17:47

rednoah wrote:
05 Nov 2019, 17:37
kise wrote:
05 Nov 2019, 17:12
Thank you, is there any up to date documentation page with those new changes fixes etc? it's really hard hunting those small but important changes.
The release notes can be found here:
https://github.com/filebot/docs/blob/master/CHANGES.md

The --file-filter option was introduced with FileBot 4.8.2 but I'm not sure what that would have to do with changes and fixes, since it was just new at the time, and the examples given above would have worked from day one.
What i meant is that having update to date documentation for all those new features and how they work is really helpful instead of hunting for scattered forums posts and obscure URLs, and it would also cut down the amount of those unneeded questions. Also thank you for the changes URL that would be helpful in the future.

User avatar
rednoah
The Source
Posts: 16949
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Q&A for n00bs

Post by rednoah » 05 Nov 2019, 18:02

The documentation is up-to-date and does include the --file-filter option:
https://www.filebot.net/cli.html#arguments

:idea: filebot -help will give you the available options for the specific filebot build you're running.


EDIT:

Perhaps you're looking for documentation for all the possible values for the --file-filter option, such as 'f.video || f.subtitle', but that is tricky however, since these expressions are made up on the spot to deal with the situation at hand.
:idea: Please read the FAQ and How to Request Help.

NexEternus
Posts: 2
Joined: 13 Nov 2019, 04:46

Re: Q&A for n00bs

Post by NexEternus » 13 Nov 2019, 05:00

Hi, new to filebot and I was having an issue with incorrect database matching because filebot is matching WEB (as in the format from webdl/webrip) to movies with Web in the name, such as Dark Web (2017), Web of Lies, etc.

viewtopic.php?f=3&t=360 < The query blacklist mentioned here sounds like the solution I'm looking for. How would I go about implementing this, since I don't see an -exclude-from-file flag or anything in the CLI usage documentation. Here is my current command:

Code: Select all

find /path/to/files/Temp -maxdepth 1 -type f -exec filebot -rename {} --db TheMovieDB --format "{n.colon(' - ')} ({y}) / {fn}" -non-strict --output "/path/to/files/Temp" -no-xattr ';'

User avatar
rednoah
The Source
Posts: 16949
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Q&A for n00bs

Post by rednoah » 13 Nov 2019, 06:12

Can you post sample file paths and console output please?
:idea: Please read the FAQ and How to Request Help.

NexEternus
Posts: 2
Joined: 13 Nov 2019, 04:46

Re: Q&A for n00bs

Post by NexEternus » 13 Nov 2019, 06:40

Hmm. So I think it might not be the filename that is fucking with it, but rather the folder name. I have all my webdls/webrips in a folder called Web. So, filebot might be thinking that is the movie name, since if I do the same action in another folder called "Temp" the results are different. Below is a short snippet of 2008 movies getting matched to the movie Web of Desire (2008).

Code: Select all

Auto-detect movie from context: [/home/nex/gdrive/Media/HD/Movies/Web/A.Childs.Christmas.2008.1080p.Amazon.WEB-DL.DD2.0.H.264-QOQ.mkv]
[MOVE] from [/home/nex/gdrive/Media/HD/Movies/Web/A.Childs.Christmas.2008.1080p.Amazon.WEB-DL.DD2.0.H.264-QOQ.mkv] to [/home/nex/gdrive/Media/HD/Movies/Web/Web of Desire (2008)/A.Childs.Christmas.2008.1080p.Amazon.WEB-DL.DD2.0.H.264-QOQ.mkv]
Processed 1 files
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/home/nex/gdrive/Media/HD/Movies/Web/Hairtales.2008.1080p.Amazon.WEB-DL.DD2.0.H.264-QOQ.mkv]
[MOVE] from [/home/nex/gdrive/Media/HD/Movies/Web/Hairtales.2008.1080p.Amazon.WEB-DL.DD2.0.H.264-QOQ.mkv] to [/home/nex/gdrive/Media/HD/Movies/Web/Web of Desire (2008)/Hairtales.2008.1080p.Amazon.WEB-DL.DD2.0.H.264-QOQ.mkv]
Processed 1 files
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/home/nex/gdrive/Media/HD/Movies/Web/Hannahs.Gift.2008.1080p.WEBRip.DD2.0.x264-NTb.mkv]
[MOVE] from [/home/nex/gdrive/Media/HD/Movies/Web/Hannahs.Gift.2008.1080p.WEBRip.DD2.0.x264-NTb.mkv] to [/home/nex/gdrive/Media/HD/Movies/Web/Web of Desire (2008)/Hannahs.Gift.2008.1080p.WEBRip.DD2.0.x264-NTb.mkv]
Processed 1 files
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/home/nex/gdrive/Media/HD/Movies/Web/Randy.Newman.Live.in.London.2008.1080p.AMZN.WEB-DL.DD2.0.H.264-SiGMA.mkv]
[MOVE] from [/home/nex/gdrive/Media/HD/Movies/Web/Randy.Newman.Live.in.London.2008.1080p.AMZN.WEB-DL.DD2.0.H.264-SiGMA.mkv] to [/home/nex/gdrive/Media/HD/Movies/Web/Web of Desire (2008)/Randy.Newman.Live.in.London.2008.1080p.AMZN.WEB-DL.DD2.0.H.264-SiGMA.mkv]
Processed 1 files
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/home/nex/gdrive/Media/HD/Movies/Web/Staind.Live.in.Cologne.Germany.2008.1080p.Amazon.WEB-DL.DD2.0.x264-QOQ.mkv]
[MOVE] from [/home/nex/gdrive/Media/HD/Movies/Web/Staind.Live.in.Cologne.Germany.2008.1080p.Amazon.WEB-DL.DD2.0.x264-QOQ.mkv] to [/home/nex/gdrive/Media/HD/Movies/Web/Web of Desire (2008)/Staind.Live.in.Cologne.Germany.2008.1080p.Amazon.WEB-DL.DD2.0.x264-QOQ.mkv]
Processed 1 files
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/home/nex/gdrive/Media/HD/Movies/Web/The.Lost.World.of.Mr.Hardy.2008.1080p.WEBRip.DD2.0.x264-monkee.mkv]
[MOVE] from [/home/nex/gdrive/Media/HD/Movies/Web/The.Lost.World.of.Mr.Hardy.2008.1080p.WEBRip.DD2.0.x264-monkee.mkv] to [/home/nex/gdrive/Media/HD/Movies/Web/Web of Desire (2008)/The.Lost.World.of.Mr.Hardy.2008.1080p.WEBRip.DD2.0.x264-monkee.mkv]
Processed 1 files
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/home/nex/gdrive/Media/HD/Movies/Web/The.Solomon.Treasures.2008.1080p.Amazon.WEB-DL.DD2.0.H.264-QOQ.mkv]
[MOVE] from [/home/nex/gdrive/Media/HD/Movies/Web/The.Solomon.Treasures.2008.1080p.Amazon.WEB-DL.DD2.0.H.264-QOQ.mkv] to [/home/nex/gdrive/Media/HD/Movies/Web/Web of Desire (2008)/The.Solomon.Treasures.2008.1080p.Amazon.WEB-DL.DD2.0.H.264-QOQ.mkv]
Processed 1 files
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/home/nex/gdrive/Media/HD/Movies/Web/Wargames.The.Dead.Code.2008.1080p.AMZN.WEB-DL.DDP5.1.H.264-BLUTONiUM.mkv]
[MOVE] from [/home/nex/gdrive/Media/HD/Movies/Web/Wargames.The.Dead.Code.2008.1080p.AMZN.WEB-DL.DDP5.1.H.264-BLUTONiUM.mkv] to [/home/nex/gdrive/Media/HD/Movies/Web/Web of Desire (2008)/Wargames.The.Dead.Code.2008.1080p.AMZN.WEB-DL.DDP5.1.H.264-BLUTONiUM.mkv]

The results are much different in a folder called "Temp" and not "Web". As you can see, I still get wrong matches, but I get some right, and none go into random movies with Web in the name.

Code: Select all

 
Auto-detect movie from context: [/home/nex/gdrive/Media/HD/Movies/Temp/A.Childs.Christmas.2008.1080p.Amazon.WEB-DL.DD2.0.H.264-QOQ.mkv]
[MOVE] from [/home/nex/gdrive/Media/HD/Movies/Temp/A.Childs.Christmas.2008.1080p.Amazon.WEB-DL.DD2.0.H.264-QOQ.mkv] to [/home/nex/gdrive/Media/HD/Movies/Temp/Coopers' Camera (2009)/A.Childs.Christmas.2008.1080p.Amazon.WEB-DL.DD2.0.H.264-QOQ.mkv]
Processed 1 files
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/home/nex/gdrive/Media/HD/Movies/Temp/Hairtales.2008.1080p.Amazon.WEB-DL.DD2.0.H.264-QOQ.mkv]
[MOVE] from [/home/nex/gdrive/Media/HD/Movies/Temp/Hairtales.2008.1080p.Amazon.WEB-DL.DD2.0.H.264-QOQ.mkv] to [/home/nex/gdrive/Media/HD/Movies/Temp/Tales (2014)/Hairtales.2008.1080p.Amazon.WEB-DL.DD2.0.H.264-QOQ.mkv]
Processed 1 files
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/home/nex/gdrive/Media/HD/Movies/Temp/Hannahs.Gift.2008.1080p.WEBRip.DD2.0.x264-NTb.mkv]
[MOVE] from [/home/nex/gdrive/Media/HD/Movies/Temp/Hannahs.Gift.2008.1080p.WEBRip.DD2.0.x264-NTb.mkv] to [/home/nex/gdrive/Media/HD/Movies/Temp/Echelon Conspiracy (2009)/Hannahs.Gift.2008.1080p.WEBRip.DD2.0.x264-NTb.mkv]
Processed 1 files
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/home/nex/gdrive/Media/HD/Movies/Temp/Randy.Newman.Live.in.London.2008.1080p.AMZN.WEB-DL.DD2.0.H.264-SiGMA.mkv]
[MOVE] from [/home/nex/gdrive/Media/HD/Movies/Temp/Randy.Newman.Live.in.London.2008.1080p.AMZN.WEB-DL.DD2.0.H.264-SiGMA.mkv] to [/home/nex/gdrive/Media/HD/Movies/Temp/Randy Newman - Live in London (2010)/Randy.Newman.Live.in.London.2008.1080p.AMZN.WEB-DL.DD2.0.H.264-SiGMA.mkv]
Processed 1 files
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/home/nex/gdrive/Media/HD/Movies/Temp/Staind.Live.in.Cologne.Germany.2008.1080p.Amazon.WEB-DL.DD2.0.x264-QOQ.mkv]
[MOVE] from [/home/nex/gdrive/Media/HD/Movies/Temp/Staind.Live.in.Cologne.Germany.2008.1080p.Amazon.WEB-DL.DD2.0.x264-QOQ.mkv] to [/home/nex/gdrive/Media/HD/Movies/Temp/Live! (2007)/Staind.Live.in.Cologne.Germany.2008.1080p.Amazon.WEB-DL.DD2.0.x264-QOQ.mkv]
Processed 1 files
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/home/nex/gdrive/Media/HD/Movies/Temp/The.Lost.World.of.Mr.Hardy.2008.1080p.WEBRip.DD2.0.x264-monkee.mkv]
[MOVE] from [/home/nex/gdrive/Media/HD/Movies/Temp/The.Lost.World.of.Mr.Hardy.2008.1080p.WEBRip.DD2.0.x264-monkee.mkv] to [/home/nex/gdrive/Media/HD/Movies/Temp/The Lost World of Mr. Hardy (2009)/The.Lost.World.of.Mr.Hardy.2008.1080p.WEBRip.DD2.0.x264-monkee.mkv]
Processed 1 files
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/home/nex/gdrive/Media/HD/Movies/Temp/The.Solomon.Treasures.2008.1080p.Amazon.WEB-DL.DD2.0.H.264-QOQ.mkv]
[MOVE] from [/home/nex/gdrive/Media/HD/Movies/Temp/The.Solomon.Treasures.2008.1080p.Amazon.WEB-DL.DD2.0.H.264-QOQ.mkv] to [/home/nex/gdrive/Media/HD/Movies/Temp/Solomon (1997)/The.Solomon.Treasures.2008.1080p.Amazon.WEB-DL.DD2.0.H.264-QOQ.mkv]
Processed 1 files
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/home/nex/gdrive/Media/HD/Movies/Temp/Wargames.The.Dead.Code.2008.1080p.AMZN.WEB-DL.DDP5.1.H.264-BLUTONiUM.mkv]
[MOVE] from [/home/nex/gdrive/Media/HD/Movies/Temp/Wargames.The.Dead.Code.2008.1080p.AMZN.WEB-DL.DDP5.1.H.264-BLUTONiUM.mkv] to [/home/nex/gdrive/Media/HD/Movies/Temp/War Games - The Dead Code (2008)/Wargames.The.Dead.Code.2008.1080p.AMZN.WEB-DL.DDP5.1.H.264-BLUTONiUM.mkv]
Processed 1 files
How would I go about excluding part of the filepath?

User avatar
rednoah
The Source
Posts: 16949
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Q&A for n00bs

Post by rednoah » 13 Nov 2019, 17:58

:arrow: Rename Web to WEB.

Alternatively, there's many other blacklisted terms that you can use for folder names that are known not to be interpreted:
viewtopic.php?t=360
:idea: Please read the FAQ and How to Request Help.

Post Reply