Issue auto-extracting .rar when using AMC

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
ShedDweller
Posts: 13
Joined: 01 Jun 2017, 17:46

Issue auto-extracting .rar when using AMC

Post by ShedDweller »

Hey

A quick search gave me amost all i need, turns out I had a similar issue to this previous thread viewtopic.php?f=4&t=6269 and this one viewtopic.php?f=8&t=6195

and as with them my issue was resolved by installing p7zip-full and using the option to switch to use it like this:
rednoah wrote: 07 Sep 2018, 04:11 You can try alternative extractor. You can change to using the 7z command-line tool for extraction by setting the system properties via FILEBOT_OPTS environment variable accordingly.

Code: Select all

export FILEBOT_OPTS="-Dnet.filebot.Archive.extractor=SevenZipExecutable"
My only question now is ... How do I make this permanent? - after reboot for example this option does not carry on working.

Thanks
ShedDweller
Posts: 13
Joined: 01 Jun 2017, 17:46

Re: Issue auto-extracting .rar when using AMC

Post by ShedDweller »

LOL, turns out i may have been mistaken, it's not working as i thought it was, FYI all other AMC fuctions complete just fine and the renaming is great.

It's running on a Pi 2, with Raspbian "Stretch" (Debian 9)

The sysinfo shows the p7zip but the filebot AMC does not extract:

Code: Select all

filebot -script fn:sysinfo
FileBot 4.8.2 (r5789)
JNA Native: 5.2.2
MediaInfo: 0.7.73
p7zip: Version 16.02 (locale=C,Utf16=off,HugeFiles=on,32 bits,4 CPUs LE)
FFprobe: 3.2.10-1~deb9u1+rpt2
Chromaprint: java.io.IOException: Cannot run program "fpcalc": error=2, No such file or directory
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2018-10-05 (r536)
Groovy: 2.5.1
JRE: Java(TM) SE Runtime Environment 1.8.0_191
JVM: 32-bit Java HotSpot(TM) Client VM
CPU/MEM: 4 Core / 237 MB Max Memory / 12 MB Used Memory
OS: Linux (arm)
HW: Linux homepi 4.14.71-v7+ #1145 SMP Fri Sep 21 15:38:35 BST 2018 armv7l GNU/Linux
DATA: /home/pi/filebot/data/pi
Package: TAR
License: FileBot License P4221009 (Valid-Until: 2019-08-07)
Done ヾ(@⌒ー⌒@)ノ
log

Code: Select all

Run script [fn:amc] at [Mon Nov 19 13:40:59 UTC 2018]
Parameter: movieFormat = /mnt/five/video/anMovies/{ny}/{ny}
Parameter: seriesFormat = /mnt/five/video/anShows/{ny}/{ny} - {s00e00} - {t}
Parameter: musicFormat = /mnt/five/audio/music/{n}/{n} - {y} - {album}/{n} - {y} - {album} - {pi.pad(2)} - {t}
Parameter: music = y
Parameter: minFileSize = 0
Parameter: minLengthMS = 0
Parameter: unsorted = y
Parameter: excludeList = /mnt/five/temp/filebotactive/fbtest.txt
Parameter: pushbullet = *****
Argument[0]: /mnt/five/temp/finished/an
Use excludes: /mnt/five/temp/filebotactive/fbtest.txt
Read archive [the.good.place.s03e09.720p.hdtv.x264-avs.rar] and extract to [/mnt/five/temp/finished/an/j/i/The.Good.Place.S03E09.720p.HDTV.x264-AVS/the.good.place.s03e09.720p.hdtv.x264-avs/The.Good.Place.S03E09.720p.HDTV.x264-AVS]
Input: /mnt/five/temp/finished/an/j/i/The.Good.Place.S03E09.720p.HDTV.x264-AVS/the.good.place.s03e09.720p.hdtv.x264-avs
Failed to read xattr: NoSuchFileException: /mnt/five/temp/finished/an/j/i/The.Good.Place.S03E09.720p.HDTV.x264-AVS/the.good.place.s03e09.720p.hdtv.x264-avs
Group: [tvs:the good place] => [the.good.place.s03e09.720p.hdtv.x264-avs]
Rename episodes using [TheTVDB]
CmdlineException: No media files: [/mnt/five/temp/finished/an/j/i/The.Good.Place.S03E09.720p.HDTV.x264-AVS/the.good.place.s03e09.720p.hdtv.x264-avs]
[MOVE] from [/mnt/five/temp/finished/an/j/i/The.Good.Place.S03E09.720p.HDTV.x264-AVS/the.good.place.s03e09.720p.hdtv.x264-avs] to [/mnt/five/video/Unsorted/The.Good.Place.S03E09.720p.HDTV.x264-AVS/the.good.place.s03e09.720p.hdtv.x264-avs]
[MOVE] Failure: java.nio.file.NoSuchFileException: /mnt/five/temp/finished/an/j/i/The.Good.Place.S03E09.720p.HDTV.x264-AVS/the.good.place.s03e09.720p.hdtv.x264-avs
Processed 0 files
NoSuchFileException: /mnt/five/temp/finished/an/j/i/The.Good.Place.S03E09.720p.HDTV.x264-AVS/the.good.place.s03e09.720p.hdtv.x264-avs
Finished without processing any files
Failure (°_°)
I've tested the rar separately and it seems fine, I can view it and play it no problem on my android phone for example.

It's probably something I've missconfigured! if you could point me in the right direction i've be very grateful

Cheers
ShedDweller
Posts: 13
Joined: 01 Jun 2017, 17:46

Re: Issue auto-extracting .rar when using AMC

Post by ShedDweller »

Thanks for that, I could figure out what to search for.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Issue auto-extracting .rar when using AMC

Post by rednoah »

Please report back on how you solved it, so we have a solution here for the next guy. ;)
:idea: Please read the FAQ and How to Request Help.
ShedDweller
Posts: 13
Joined: 01 Jun 2017, 17:46

Re: Issue auto-extracting .rar when using AMC

Post by ShedDweller »

I didn't, i was wrong :(

I thought gettign the 7zip installed and the FILEBOT_OPTS option set had fixed it, but it didn't, that's the log in my second post...
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Issue auto-extracting .rar when using AMC

Post by rednoah »

Have you tried manually extracting some of these archives? In particular, with the 7z command-line tool, just to see what happens?

You can also text filebot extraction independently of the amc script by running filebot -extract to extract some files and to see if the files are somehow only partially extracted. Maybe you can run a few tests to narrow down the issue.
:idea: Please read the FAQ and How to Request Help.
ShedDweller
Posts: 13
Joined: 01 Jun 2017, 17:46

Re: Issue auto-extracting .rar when using AMC

Post by ShedDweller »

Just using the basic

Code: Select all

7z x filename
Works just fine:

Code: Select all

7z x the.good.place.s03e09.720p.hdtv.x264-avs.rar 
7-Zip [32] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_GB.UTF-8,Utf16=on,HugeFiles=on,32 bits,4 CPUs LE)

Scanning the drive for archives:
1 file, 50000000 bytes (48 MiB)

Extracting archive: the.good.place.s03e09.720p.hdtv.x264-avs.rar
--
Path = the.good.place.s03e09.720p.hdtv.x264-avs.rar
Type = Rar
Physical Size = 50000000
Total Physical Size = 616189205
Characteristics = Volume FirstVolume
Solid = -
Blocks = 1
Multivolume = +
Volumes = 13

Everything is Ok                                   

Size:       616187957
Compressed: 616189205
The filebot -extract option seems to run correctly but did not actually do anything, it did not error either

Code: Select all

filebot -extract the.good.place.s03e09.720p.hdtv.x264-avs.rar                                             Read archive [the.good.place.s03e09.720p.hdtv.x264-avs.rar] and extract to [/mnt/five/temp/finished/an/j/i/The.Good.Place.S03E09.720p.HDTV.x264-AVS/the.good.place.s03e09.720p.hdtv.x264-avs]
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Issue auto-extracting .rar when using AMC

Post by rednoah »

Try to enable full debug logging before calling -extract and see what it says:
viewtopic.php?f=3&t=3913

Code: Select all

export JAVA_OPTS="-Dnet.filebot.logging.debug=ALL"
Enabling full debug logging will tell you what command FileBot is executing, and what the command-line output says in return. Error output will always be printed to console, so it should work if there's no error output.
:idea: Please read the FAQ and How to Request Help.
ShedDweller
Posts: 13
Joined: 01 Jun 2017, 17:46

Re: Issue auto-extracting .rar when using AMC

Post by ShedDweller »

OK, here we go!

So enable debug:

Code: Select all

pi@homepi:~/filebot $ export JAVA_OPTS="-Dnet.filebot.logging.debug=ALL"
Then run the amc script:

Code: Select all

pi@homepi:~/filebot $ . fban.sh
Locking /mnt/five/temp/filebotactive/fbtest.log
Run script [fn:amc] at [Tue Nov 20 17:14:25 UTC 2018]
Parameter: movieFormat = /mnt/five/video/anMovies/{ny}/{ny}
Parameter: seriesFormat = /mnt/five/video/anShows/{ny}/{ny} - {s00e00} - {t}
Parameter: musicFormat = /mnt/five/audio/music/{n}/{n} - {y} - {album}/{n} - {y} - {album} - {pi.pad(2)} - {t}
Parameter: music = y
Parameter: minFileSize = 0
Parameter: minLengthMS = 0
Parameter: unsorted = y
Parameter: excludeList = /mnt/five/temp/filebotactive/fbtest.txt
Parameter: pushbullet = *****
Argument[0]: /mnt/five/temp/finished/an
Use excludes: /mnt/five/temp/filebotactive/fbtest.txt
Read archive [beat.bugs.s03e02.720p.web.x264-crimson.rar] and extract to [/mnt/five/temp/finished/an/j/sc/Beat.Bugs.S03E02.720p.WEB.x264-CRiMSON/beat.bugs.s03e02.720p.web.x264-crimson/Beat.Bugs.S03E02.720p.WEB.x264-CRiMSON]
Input: /mnt/five/temp/finished/an/j/sc/Beat.Bugs.S03E02.720p.WEB.x264-CRiMSON/beat.bugs.s03e02.720p.web.x264-crimson
Failed to read xattr: NoSuchFileException: /mnt/five/temp/finished/an/j/sc/Beat.Bugs.S03E02.720p.WEB.x264-CRiMSON/beat.bugs.s03e02.720p.web.x264-crimson
Failed to read xattr: NoSuchFileException: /mnt/five/temp/finished/an/j/sc/Beat.Bugs.S03E02.720p.WEB.x264-CRiMSON/beat.bugs.s03e02.720p.web.x264-crimson
Failed to read xattr: NoSuchFileException: /mnt/five/temp/finished/an/j/sc/Beat.Bugs.S03E02.720p.WEB.x264-CRiMSON/beat.bugs.s03e02.720p.web.x264-crimson
Failed to read xattr: NoSuchFileException: /mnt/five/temp/finished/an/j/sc/Beat.Bugs.S03E02.720p.WEB.x264-CRiMSON/beat.bugs.s03e02.720p.web.x264-crimson
Group: [tvs:beat bugs] => [beat.bugs.s03e02.720p.web.x264-crimson]
Rename episodes using [TheTVDB]
CmdlineException: No media files: [/mnt/five/temp/finished/an/j/sc/Beat.Bugs.S03E02.720p.WEB.x264-CRiMSON/beat.bugs.s03e02.720p.web.x264-crimson]
Processing 1 unsorted files
Failed to read xattr: NoSuchFileException: /mnt/five/temp/finished/an/j/sc/Beat.Bugs.S03E02.720p.WEB.x264-CRiMSON/beat.bugs.s03e02.720p.web.x264-crimson
[MOVE] from [/mnt/five/temp/finished/an/j/sc/Beat.Bugs.S03E02.720p.WEB.x264-CRiMSON/beat.bugs.s03e02.720p.web.x264-crimson] to [/mnt/five/video/Unsorted/sc/Beat.Bugs.S03E02.720p.WEB.x264-CRiMSON/beat.bugs.s03e02.720p.web.x264-crimson]
[MOVE] Failure: java.nio.file.NoSuchFileException: /mnt/five/temp/finished/an/j/sc/Beat.Bugs.S03E02.720p.WEB.x264-CRiMSON/beat.bugs.s03e02.720p.web.x264-crimson
Processed 0 files
NoSuchFileException: /mnt/five/temp/finished/an/j/sc/Beat.Bugs.S03E02.720p.WEB.x264-CRiMSON/beat.bugs.s03e02.720p.web.x264-crimson
Finished without processing any files
Failure (°_°)
No .rar extracted

Then run the filebot -extract on it's own:

Code: Select all

pi@homepi:~/filebot $ filebot -extract /mnt/five/temp/finished/an/j/sc/Beat.Bugs.S03E02.720p.WEB.x264-CRiMSON/beat.bugs.s03e02.720p.web.x264-crimson.rar
Using persistent disk cache /home/pi/filebot/data/pi/cache/0
Read archive [beat.bugs.s03e02.720p.web.x264-crimson.rar] and extract to [/mnt/five/temp/finished/an/j/sc/Beat.Bugs.S03E02.720p.WEB.x264-CRiMSON/beat.bugs.s03e02.720p.web.x264-crimson]
Execute: [7z, l, -slt, -y, /mnt/five/temp/finished/an/j/sc/Beat.Bugs.S03E02.720p.WEB.x264-CRiMSON/beat.bugs.s03e02.720p.web.x264-crimson.rar]

7-Zip [32] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=C,Utf16=off,HugeFiles=on,32 bits,4 CPUs LE)

Scanning the drive for archives:
1 file, 50000000 bytes (48 MiB)

Listing archive: /mnt/five/temp/finished/an/j/sc/Beat.Bugs.S03E02.720p.WEB.x264-CRiMSON/beat.bugs.s03e02.720p.web.x264-crimson.rar

--
Path = /mnt/five/temp/finished/an/j/sc/Beat.Bugs.S03E02.720p.WEB.x264-CRiMSON/beat.bugs.s03e02.720p.web.x264-crimson.rar
Type = Rar
Physical Size = 50000000
Total Physical Size = 443501463
Characteristics = Volume FirstVolume VolCRC
Solid = -
Blocks = 1
Multivolume = +
Volume Index = 0
Volumes = 9

----------
Path = Beat.Bugs.S03E02.720p.WEB.x264-CRiMSON.mkv
Folder = -
Size = 443500419
Packed Size = 443500419
Modified = 2018-11-14 23:07:53
Created =
Accessed =
Attributes =
Encrypted = -
Solid = -
Commented = -
Split Before = -
Split After = -
CRC = B4E753E8
Host OS = Unix
Method = m0:17
Version = 20


Extracting files [/mnt/five/temp/finished/an/j/sc/Beat.Bugs.S03E02.720p.WEB.x264-CRiMSON/beat.bugs.s03e02.720p.web.x264-crimson/Beat.Bugs.S03E02.720p.WEB.x264-CRiMSON.mkv]
Execute: [7z, x, -y, -aos, /mnt/five/temp/finished/an/j/sc/Beat.Bugs.S03E02.720p.WEB.x264-CRiMSON/beat.bugs.s03e02.720p.web.x264-crimson.rar, -o/mnt/five/temp/finished/an/j/sc/Beat.Bugs.S03E02.720p.WEB.x264-CRiMSON/beat.bugs.s03e02.720p.web.x264-crimson]

7-Zip [32] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=C,Utf16=off,HugeFiles=on,32 bits,4 CPUs LE)

Scanning the drive for archives:
1 file, 50000000 bytes (48 MiB)

Extracting archive: /mnt/five/temp/finished/an/j/sc/Beat.Bugs.S03E02.720p.WEB.x264-CRiMSON/beat.bugs.s03e02.720p.web.x264-crimson.rar
--
Path = /mnt/five/temp/finished/an/j/sc/Beat.Bugs.S03E02.720p.WEB.x264-CRiMSON/beat.bugs.s03e02.720p.web.x264-crimson.rar
Type = Rar
Physical Size = 50000000
Total Physical Size = 443501463
Characteristics = Volume FirstVolume VolCRC
Solid = -
Blocks = 1
Multivolume = +
Volume Index = 0
Volumes = 9

Everything is Ok

Size:       443500419
Compressed: 443501463
Works with filebot -extract

But not with the AMC script
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Issue auto-extracting .rar when using AMC

Post by rednoah »

ShedDweller wrote: 20 Nov 2018, 17:30 Works with filebot -extract

But not with the AMC script
It's the same code, so it must work for both or none. Double check and make sure that you're setting the options correctly in both test cases.
:idea: Please read the FAQ and How to Request Help.
Post Reply