Debug series detection in Filebot Node

Support for Synology NAS, QNAP NAS and other Embedded Linux systems
Post Reply
poochie2
Posts: 21
Joined: 16 Jun 2018, 13:55

Debug series detection in Filebot Node

Post by poochie2 »

Dear Master,

this is what I was trying:

Code: Select all

filebot -script 'fn:amc' '/volume1/video/Sources/Downloaded New' --output /volume1/video/ --action hardlink --order Absolute --conflict skip --lang en --def 'unsorted=y' 'artwork=y' 'subtitles=eng' 'skipExtract=y' 'plex=localhost:*****'movieFormat={plex}' 'excludeList=.excludes' --log all --log-file '/volume3/@appstore/filebot-node/data/filebot.log'

------------------------------------------

x86_64
Locking /volume3/@appstore/filebot-node/data/filebot.log
Run script [fn:amc] at [Thu Oct 04 03:42:45 CEST 2018]
Parameter: unsorted = y
Parameter: artwork = y
Parameter: subtitles = eng
Parameter: skipExtract = y
Parameter: plex = *****
Parameter: movieFormat = {plex}
Parameter: excludeList = .excludes
Argument[0]: /volume1/video/Sources/Downloaded New
Use excludes: /volume1/video/.excludes
Input: /volume1/video/Sources/Downloaded New/Better Call Saul S04E01 (2160p NF WEBRip x265 HEVC 10bit AC3 5.1 Qman) [UTR]/Better.Call.Saul.S04E01.2160p.NF.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv
Input: /volume1/video/Sources/Downloaded New/Better Call Saul S04E02 (2160p NF WEBRip x265 HEVC 10bit AC3 5.1 Qman) [UTR]/Better.Call.Saul.S04E02.2160p.NF.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv
Input: /volume1/video/Sources/Downloaded New/Better Call Saul S04E03 (2160p NF WEBRip x265 HEVC 10bit AC3 5.1 Qman) [UTR]/Better.Call.Saul.S04E03.2160p.NF.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv
Input: /volume1/video/Sources/Downloaded New/Better Call Saul S04E04 (2160p WEBRip x265 HEVC 10bit AC3 5.1 Qman) [UTR]/Better.Call.Saul.S04E04.2160p.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv
Input: /volume1/video/Sources/Downloaded New/Better Call Saul S04E05 (2160p NF WEBRip x265 HEVC 10bit AC3 5.1 Qman) [UTR]/Better.Call.Saul.S04E05.2160p.NF.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv
Input: /volume1/video/Sources/Downloaded New/Better Call Saul S04E06 (2160p WEBRip x265 HEVC 10bit AC3 5.1 Qman) [UTR]/Better.Call.Saul.S04E06.2160p.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv
Input: /volume1/video/Sources/Downloaded New/Better Call Saul S04E07 (2160p WEBRip x265 HEVC 10bit AC3 5.1 Qman) [UTR]/Better.Call.Saul.S04E07.2160p.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv
Group: [tvs:better call saul] => [Better.Call.Saul.S04E01.2160p.NF.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv, Better.Call.Saul.S04E02.2160p.NF.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv, Better.Call.Saul.S04E03.2160p.NF.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv, Better.Call.Saul.S04E04.2160p.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv, Better.Call.Saul.S04E05.2160p.NF.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv, Better.Call.Saul.S04E06.2160p.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv, Better.Call.Saul.S04E07.2160p.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv]
Get [English] subtitles for 7 files
Looking up subtitles by hash via OpenSubtitles
No matching subtitles found: /volume1/video/Sources/Downloaded New/Better Call Saul S04E01 (2160p NF WEBRip x265 HEVC 10bit AC3 5.1 Qman) [UTR]/Better.Call.Saul.S04E01.2160p.NF.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv
No matching subtitles found: /volume1/video/Sources/Downloaded New/Better Call Saul S04E02 (2160p NF WEBRip x265 HEVC 10bit AC3 5.1 Qman) [UTR]/Better.Call.Saul.S04E02.2160p.NF.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv
No matching subtitles found: /volume1/video/Sources/Downloaded New/Better Call Saul S04E03 (2160p NF WEBRip x265 HEVC 10bit AC3 5.1 Qman) [UTR]/Better.Call.Saul.S04E03.2160p.NF.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv
No matching subtitles found: /volume1/video/Sources/Downloaded New/Better Call Saul S04E04 (2160p WEBRip x265 HEVC 10bit AC3 5.1 Qman) [UTR]/Better.Call.Saul.S04E04.2160p.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv
No matching subtitles found: /volume1/video/Sources/Downloaded New/Better Call Saul S04E05 (2160p NF WEBRip x265 HEVC 10bit AC3 5.1 Qman) [UTR]/Better.Call.Saul.S04E05.2160p.NF.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv
No matching subtitles found: /volume1/video/Sources/Downloaded New/Better Call Saul S04E06 (2160p WEBRip x265 HEVC 10bit AC3 5.1 Qman) [UTR]/Better.Call.Saul.S04E06.2160p.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv
No matching subtitles found: /volume1/video/Sources/Downloaded New/Better Call Saul S04E07 (2160p WEBRip x265 HEVC 10bit AC3 5.1 Qman) [UTR]/Better.Call.Saul.S04E07.2160p.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv
Rename episodes using [TheTVDB]
Auto-detected query: [Better Call Saul]
Fetching episode data for [Better Call Saul]
CmdlineException: Failed to match files to episode data
Processing 7 unsorted files
Skipped [/volume1/video/Sources/Downloaded New/Better Call Saul S04E01 (2160p NF WEBRip x265 HEVC 10bit AC3 5.1 Qman) [UTR]/Better.Call.Saul.S04E01.2160p.NF.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv] because [/volume1/video/Unsorted/Sources/Downloaded New/Better Call Saul S04E01 (2160p NF WEBRip x265 HEVC 10bit AC3 5.1 Qman) [UTR]/Better.Call.Saul.S04E01.2160p.NF.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv] already exists
Skipped [/volume1/video/Sources/Downloaded New/Better Call Saul S04E02 (2160p NF WEBRip x265 HEVC 10bit AC3 5.1 Qman) [UTR]/Better.Call.Saul.S04E02.2160p.NF.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv] because [/volume1/video/Unsorted/Sources/Downloaded New/Better Call Saul S04E02 (2160p NF WEBRip x265 HEVC 10bit AC3 5.1 Qman) [UTR]/Better.Call.Saul.S04E02.2160p.NF.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv] already exists
Skipped [/volume1/video/Sources/Downloaded New/Better Call Saul S04E03 (2160p NF WEBRip x265 HEVC 10bit AC3 5.1 Qman) [UTR]/Better.Call.Saul.S04E03.2160p.NF.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv] because [/volume1/video/Unsorted/Sources/Downloaded New/Better Call Saul S04E03 (2160p NF WEBRip x265 HEVC 10bit AC3 5.1 Qman) [UTR]/Better.Call.Saul.S04E03.2160p.NF.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv] already exists
Skipped [/volume1/video/Sources/Downloaded New/Better Call Saul S04E04 (2160p WEBRip x265 HEVC 10bit AC3 5.1 Qman) [UTR]/Better.Call.Saul.S04E04.2160p.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv] because [/volume1/video/Unsorted/Sources/Downloaded New/Better Call Saul S04E04 (2160p WEBRip x265 HEVC 10bit AC3 5.1 Qman) [UTR]/Better.Call.Saul.S04E04.2160p.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv] already exists
Skipped [/volume1/video/Sources/Downloaded New/Better Call Saul S04E05 (2160p NF WEBRip x265 HEVC 10bit AC3 5.1 Qman) [UTR]/Better.Call.Saul.S04E05.2160p.NF.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv] because [/volume1/video/Unsorted/Sources/Downloaded New/Better Call Saul S04E05 (2160p NF WEBRip x265 HEVC 10bit AC3 5.1 Qman) [UTR]/Better.Call.Saul.S04E05.2160p.NF.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv] already exists
Skipped [/volume1/video/Sources/Downloaded New/Better Call Saul S04E06 (2160p WEBRip x265 HEVC 10bit AC3 5.1 Qman) [UTR]/Better.Call.Saul.S04E06.2160p.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv] because [/volume1/video/Unsorted/Sources/Downloaded New/Better Call Saul S04E06 (2160p WEBRip x265 HEVC 10bit AC3 5.1 Qman) [UTR]/Better.Call.Saul.S04E06.2160p.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv] already exists
Skipped [/volume1/video/Sources/Downloaded New/Better Call Saul S04E07 (2160p WEBRip x265 HEVC 10bit AC3 5.1 Qman) [UTR]/Better.Call.Saul.S04E07.2160p.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv] because [/volume1/video/Unsorted/Sources/Downloaded New/Better Call Saul S04E07 (2160p WEBRip x265 HEVC 10bit AC3 5.1 Qman) [UTR]/Better.Call.Saul.S04E07.2160p.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv] already exists
Processed 0 files
Finished without processing any files
Failure (°_°)
------------------------------------------

[Process error]
It looks like it's detecting the correct series but somehow it's trying to place it in the source folder. Other movies went to the same destination path with no issues, just these are giving me trouble. Is there something I'm clearly missing?

Best regards.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Debug series detection in Filebot Node

Post by rednoah »

1.
This log entry does not confirm the issue described in the OP, but probably hard to read because of repeating path components:

Code: Select all

Skipped [/volume1/video/Sources/Downloaded New/Better Call Saul S04E03 (2160p NF WEBRip x265 HEVC 10bit AC3 5.1 Qman) [UTR]/Better.Call.Saul.S04E03.2160p.NF.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv] because [/volume1/video/Unsorted/Sources/Downloaded New/Better Call Saul S04E03 (2160p NF WEBRip x265 HEVC 10bit AC3 5.1 Qman) [UTR]/Better.Call.Saul.S04E03.2160p.NF.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv] already exists
Input Folder:

Code: Select all

/volume1/video/Sources
Output Folder:

Code: Select all

/volume1/video
Output Path:

Code: Select all

Unsorted/Sources/Downloaded New/Better Call Saul S04E03 (2160p NF WEBRip x265 HEVC 10bit AC3 5.1 Qman) [UTR]/Better.Call.Saul.S04E03.2160p.NF.WEBRip.x265.10bit.EAC3.6.0-Qman[UTR].mkv
:idea: So input / output folders work as expected. It just so happens that the default Unsorted format will preserve the original path as much as possible.


2.
Why are files not processed correctly as TV Shows? The most likely explanation is that you're using --order Absolute which doesn't match your Airdate SxE ordered files in combination with strict mode (i.e. -non-strict is not set) which results in FileBot ignoring files that don't exactly match. The --def unsorted=y will subsequently pick up these files and process them with Unsorted behaviour.

:idea: If you're processing TV Shows, then selecting TV Shows as input category would generally be recommended as well.
:idea: Please read the FAQ and How to Request Help.
poochie2
Posts: 21
Joined: 16 Jun 2018, 13:55

Re: Debug series detection in Filebot Node

Post by poochie2 »

Damn I feel so dumb right now for not noticing the path with enough attention! Trying with:

Code: Select all

filebot -script 'fn:amc' '/volume1/video/Sources/Downloaded New' --output /volume1/video/ --order Airdate --conflict skip --lang en --def 'unsorted=n' 'subtitles=eng,ita' 'skipExtract=y' 'plex=localhost:*****' 'excludeList=.excludes' --format {plex} --log all --action test
Seems to work ATM.

One more question: is it possible to duplicate/hardlink but move the source of the hardlink/copy operation to another directory after being processed (even better if only on success items, but I don't expect this to be possible)?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Debug series detection in Filebot Node

Post by rednoah »

No, but you can do this in a post-processing step yourself. Either by using --def exec and have the amc script do it right away, or by having a separate -rename --db xattr call that mirrors files instantly on demand.

:arrow: viewtopic.php?f=4&t=215

:arrow: viewtopic.php?f=4&t=4788
:idea: Please read the FAQ and How to Request Help.
poochie2
Posts: 21
Joined: 16 Jun 2018, 13:55

Re: Debug series detection in Filebot Node

Post by poochie2 »

Tried running:

Code: Select all

filebot -script 'fn:amc' '/volume1/video/Sources/Downloaded New' --output /volume1/video/ --order Airdate --conflict skip --lang en --def 'unsorted=n' 'subtitles=eng,ita' 'skipExtract=y' 'plex=localhost:*****' 'excludeList=.excludes' --format {plex} --log all --action test --def exec="mv {quote fn} '/volume1/video/Sources/Downloaded Hardlinked'"
x86_64
Run script [fn:amc] at [Sat Oct 06 00:51:31 CEST 2018]
Parameter: unsorted = n
Parameter: subtitles = eng,ita
Parameter: skipExtract = y
Parameter: plex = *****
Parameter: excludeList = .excludes
Parameter: exec = mv {quote fn} '/volume1/video/Sources/Downloaded Hardlinked'
Argument[0]: /volume1/video/Sources/Downloaded New
Use excludes: /volume1/video/.excludes (7)
Input: /volume1/video/Sources/Downloaded New/Supergirl.S03E14.1080p.WEB.X265-DEFLATE[rartv]/Supergirl.S03E14.1080p.WEB.X265-DEFLATE.mkv
Group: [tvs:supergirl] => [Supergirl.S03E14.1080p.WEB.X265-DEFLATE.mkv]
Get [English] subtitles for 1 files
Looking up subtitles by hash via OpenSubtitles
No matching subtitles found: /volume1/video/Sources/Downloaded New/Supergirl.S03E14.1080p.WEB.X265-DEFLATE[rartv]/Supergirl.S03E14.1080p.WEB.X265-DEFLATE.mkv
Get [Italian] subtitles for 1 files
Looking up subtitles by hash via OpenSubtitles
No matching subtitles found: /volume1/video/Sources/Downloaded New/Supergirl.S03E14.1080p.WEB.X265-DEFLATE[rartv]/Supergirl.S03E14.1080p.WEB.X265-DEFLATE.mkv
Rename episodes using [TheTVDB]
Auto-detected query: [Supergirl]
Fetching episode data for [Supergirl]
[TEST] from [/volume1/video/Sources/Downloaded New/Supergirl.S03E14.1080p.WEB.X265-DEFLATE[rartv]/Supergirl.S03E14.1080p.WEB.X265-DEFLATE.mkv] to [/volume1/video/TV Shows/Supergirl/Season 03/Supergirl - S03E14 - Schott Through the Heart.mkv]
Processed 1 files
Failed to read xattr: NoSuchFileException: /volume1/video/TV Shows/Supergirl/Season 03/Supergirl - S03E14 - Schott Through the Heart.mkv
Execute: mv 'Supergirl - S03E14 - Schott Through the Heart' '/volume1/video/Sources/Downloaded Hardlinked'
mv: cannot stat ‘Supergirl - S03E14 - Schott Through the Heart’: No such file or directory
Done ヾ(@⌒ー⌒@)ノ
It looks like fn does not actually give the original filename but the output filename. Did I get something wrong?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Debug series detection in Filebot Node

Post by rednoah »

{fn} is the current filename without extension, thus:

Code: Select all

mv 'Supergirl - S03E14 - Schott Through the Heart' '/volume1/video/Sources/Downloaded Hardlinked'
mv: cannot stat ‘Supergirl - S03E14 - Schott Through the Heart’: No such file or directory

You'll want to use {f} which is the absolute file path of the destination file:

Code: Select all

mv {quote f} '/volume1/video/Sources/Downloaded Hardlinked'

If you want to create a hardlink with the original name of the file, then you can do this:

Code: Select all

ln {quote f} /path/to/links/{quote original}.{f.extension}
{original} is the original filename and stored in xattr when FileBot processes the file for the first time.


:idea: Note that mv will move the file, and not copy or hardlink the file.
:idea: Please read the FAQ and How to Request Help.
poochie2
Posts: 21
Joined: 16 Jun 2018, 13:55

Re: Debug series detection in Filebot Node

Post by poochie2 »

That should do, I probably wasn't clear enough though to what I am trying to accomplish.

When I put new material in the "Sources/Downloaded New" folder I usually hardlink via Filebot's action to the Plex destination, and then I would like move the "still in the original spot" source file (with release nomenclature) to the "hardlinked sources" folder.

Will try to check how it works ASAP.

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

Re: Debug series detection in Filebot Node

Post by rednoah »

This particular use case would be tricky, since --def exec expressions don't give you any bindings for the original file path. In this case, a separate post-process script that loops through the FileBot history file and processes all the files where the original path still exists, might make more sense.

You can get the rename history like this:
viewtopic.php?f=4&t=5#p2459
:idea: Please read the FAQ and How to Request Help.
Post Reply