[AMC] Ignore disk image error

Running FileBot from the console, Groovy scripting, shell scripts, etc
User avatar
N3mam
Posts: 17
Joined: 18 Oct 2017, 06:09

[AMC] Ignore disk image error

Post by N3mam »

Hey there, sorry for probably noob question. I'am using filebot's amc script for years now without any issues, but recently i started downloading .ISO blu-ray movies and amc is ignoring these files, can't figure out why.

This is my sysinfo:

Code: Select all

FileBot 4.7.9 (r4984)
JNA Native: 5.1.0
MediaInfo: 0.7.93
7-Zip-JBinding: 9.20
Chromaprint: 1.4.2
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2017-05-15 (r500)
Groovy: 2.4.10
JRE: Java(TM) SE Runtime Environment 1.8.0_144
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 4 Core / 1 GB Max Memory / 9 MB Used Memory
OS: Windows 10 (amd64)
Package: MSI
Done ?(?????)?
uTorrent cmd:

Code: Select all

"C:\Program Files\FileBot\filebot.launcher.exe" -script fn:amc --output "E:/KODI" --action copy --conflict auto -non-strict --log-file amc.log --def unsorted=y music=n artwork=n "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"
Log from amc:

Code: Select all

Run script [fn:amc] at [Mon Oct 16 14:34:33 CEST 2017]
Parameter: unsorted = y
Parameter: music = n
Parameter: artwork = n
Parameter: ut_label = Movies
Parameter: ut_state = 5
Parameter: ut_title = War.for.the.Planet.of.the.Apes.2017.BluRay.1080p.AVC.DTS-HD.MA7.1-CHDBits
Parameter: ut_kind = %K
Parameter: ut_file = 
Parameter: ut_dir = D:\BORDEL\War.for.the.Planet.of.the.Apes.2017.BluRay.1080p.AVC.DTS-HD.MA7.1-CHDBits
Bad ut_kind value: %K
Ignore disk image: D:\BORDEL\War.for.the.Planet.of.the.Apes.2017.BluRay.1080p.AVC.DTS-HD.MA7.1-CHDBits\War.for.the.Planet.of.the.Apes.2017.BluRay.1080p.AVC.DTS-HD.MA7.1-CHDBits.iso
No files selected for processing
Done ヾ(@⌒ー⌒@)ノ
BDMV movie is working just fine, only iso files are ignored.

Thank you for any help :)

// I dont need to process these .iso files, is it possible to just copy it to one specific folder E:\KODI\Movies ? and if yes how ?
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [AMC] Ignore disk image error

Post by rednoah »

FileBot will only process ISO files that contain a certain file and folder structure, e.g. BDMV, HVDVD_TS, VIDEO_TS, etc.

What is the folder structure inside this particular ISO image?
:idea: Please read the FAQ and How to Request Help.
User avatar
N3mam
Posts: 17
Joined: 18 Oct 2017, 06:09

Re: [AMC] Ignore disk image error

Post by N3mam »

Its classic BDMV structure

Inside BDMV folder is this
Image
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [AMC] Ignore disk image error

Post by rednoah »

Strange. A MovieObject.bdmv entry should be enough of an indicator. I'll have a look.

Are these files in the root directory of the ISO or is there a folder in the root directory containing these files?
:idea: Please read the FAQ and How to Request Help.
User avatar
N3mam
Posts: 17
Joined: 18 Oct 2017, 06:09

Re: [AMC] Ignore disk image error

Post by N3mam »

In the root directory is BDMV and Certificate, inside BDMV are these files.
Image
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [AMC] Ignore disk image error

Post by rednoah »

Very strange. BDMV should work.

Please call filebot -extract /path/to/iso on the ISO file that doesn't work and post the output.
:idea: Please read the FAQ and How to Request Help.
User avatar
N3mam
Posts: 17
Joined: 18 Oct 2017, 06:09

Re: [AMC] Ignore disk image error

Post by N3mam »

OK, so it extracted hundreds of files, but not actual m2ts files, so whole extracted folder has 1,22MB
This is the output

Code: Select all

https://ybin.me/p/5b1b6ba75321a914#bRggaRd4I8WpZGQQYe3Yz6F4siw2kzs+9wgHND15TOY=
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [AMC] Ignore disk image error

Post by rednoah »

That's probably the reason why it doesn't work. Somehow 7zip sees those files as contents of the ISO image, rather than what you see in Explorer when mounting the image.

Sorry. No idea. I have never seen this before. The files that are extracted look like Java code, which is probably part of the BluRay logic for rendering the menu and custom UI.
:idea: Please read the FAQ and How to Request Help.
User avatar
N3mam
Posts: 17
Joined: 18 Oct 2017, 06:09

Re: [AMC] Ignore disk image error

Post by N3mam »

Really weird, is there any way i can bypas it ? something like move whole iso to specific location without procesing it ?
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [AMC] Ignore disk image error

Post by rednoah »

Yes, of course you can do that. Since this ISO file won't be interpreted as video, it'll be processed as "unsorted" and the destination path of unsorted files is up to your custom unsorted format. So you can add an if-then-else just for ISO files there.
:idea: Please read the FAQ and How to Request Help.
User avatar
N3mam
Posts: 17
Joined: 18 Oct 2017, 06:09

Re: [AMC] Ignore disk image error

Post by N3mam »

Thank you for great support @rednoah

I know you dont have time for this lame questions, but I'am total noob with scripts in general, can you please tell me how i will do this ? I dont know how to to write specific logic for moving ISO's :(
Or is there some manual for this ?
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [AMC] Ignore disk image error

Post by rednoah »

1.
This is the default unsorted format:

Code: Select all

Unsorted/{file.structurePathTail}
which can easily be modified to change the folder depending on the file extension:

Code: Select all

{ext == /iso/ ? 'ISO' : 'Unsorted'}/{file.structurePathTail}
@see viewtopic.php?f=5&t=4191


2.
You can and should test formats in the GUI, which will make your life much easier:
viewtopic.php?f=3&t=2072
:idea: Please read the FAQ and How to Request Help.
User avatar
N3mam
Posts: 17
Joined: 18 Oct 2017, 06:09

Re: [AMC] Ignore disk image error

Post by N3mam »

rednoah wrote: 20 Oct 2017, 07:47

Code: Select all

{ext == /iso/ ? 'ISO' : 'Unsorted'}/{file.structurePathTail}
Sweet, can you tell me, where do i insert this code ?
To the txt file ? or to the uT run program. Sorry I'm new to this :roll:
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [AMC] Ignore disk image error

Post by rednoah »

Please read Change how files will be organized and renamed for details. You can use the --def unsortedFormat option to pass in your own custom unsorted format.

:idea: Use the @file syntax for reading command-line arguments from external text files. It's convenient for complex command-line arguments because won't need to escape the argument value.

It's good to understand what command-line arguments are first though. ;)
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [AMC] Ignore disk image error

Post by rednoah »

So you have a command-line call. Adding an extra option like this should do the trick:

Code: Select all

--def unsortedFormat="{ext == /iso/ ? 'ISO' : 'Unsorted'}/{fn}"
e.g.

Code: Select all

filebot -script fn:amc --output "E:/KODI" --action copy --conflict auto -non-strict --log-file amc.log --def unsortedFormat="{ext == /iso/ ? 'ISO' : 'Unsorted'}/{fn}" --def unsorted=y music=n artwork=n "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"
:idea: Please read the FAQ and How to Request Help.
User avatar
N3mam
Posts: 17
Joined: 18 Oct 2017, 06:09

Re: [AMC] Ignore disk image error

Post by N3mam »

Thank you for the code rednoah

I bought filebot from windows store and now its different story...

sysinfo

Code: Select all

FileBot 4.7.13 (r5200)
JNA Native: 5.1.0
MediaInfo: 0.7.93
7-Zip-JBinding: 9.20
Chromaprint: 1.4.2
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2017-05-15 (r500)
Groovy: 2.4.12
JRE: Java(TM) SE Runtime Environment 1.8.0_144
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 4 Core / 1 GB Max Memory / 19 MB Used Memory
OS: Windows 10 (amd64)
Package: APPX
Done ?(?????)?
test

Code: Select all

filebot -script fn:amc --output "E:/KODI" --action test -non-strict "D:\BORDEL\The.Dark.Tower.2017.BluRay.1080p.AVC.DTS-HD.MA5.1-CHDBits" --log-file amc.log --def unsortedFormat="{ext == /iso/ ? 'ISO' : 'Unsorted'}/{fn}"
log

Code: Select all

C:\Users\n3mam>filebot -script fn:amc --output "E:/KODI" --action test -non-strict "D:\BORDEL\The.Dark.Tower.2017.BluRay.1080p.AVC.DTS-HD.MA5.1-CHDBits" --log-file amc.log --def unsortedFormat="{ext == /iso/ ? 'ISO' : 'Unsorted'}/{fn}"
Locking C:\Users\n3mam\AppData\Roaming\FileBot\logs\amc.log
Run script [fn:amc] at [Sun Oct 22 13:41:20 CEST 2017]
Parameter: unsortedFormat = {ext == /iso/ ? 'ISO' : 'Unsorted'}/{fn}
Argument[0]: D:\BORDEL\The.Dark.Tower.2017.BluRay.1080p.AVC.DTS-HD.MA5.1-CHDBits
Failed to read disk image: net.sf.sevenzipjbinding.SevenZipException: Archive file can't be opened with none of the registered codecs
Ignore disk image: D:\BORDEL\The.Dark.Tower.2017.BluRay.1080p.AVC.DTS-HD.MA5.1-CHDBits\The.Dark.Tower.2017.BluRay.1080p.AVC.DTS-HD.MA5.1-CHDBits.iso
No files selected for processing
Done ?(?????)?
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [AMC] Ignore disk image error

Post by rednoah »

You'll probably need to enable unsorted behavior as well via --def unsorted=y.
:idea: Please read the FAQ and How to Request Help.
User avatar
N3mam
Posts: 17
Joined: 18 Oct 2017, 06:09

Re: [AMC] Ignore disk image error

Post by N3mam »

Its same output with --def unsorted=y

Code: Select all

filebot -script fn:amc --output "E:/KODI" --action test -non-strict "D:\BORDEL\The.Dark.Tower.2017.BluRay.1080p.AVC.DTS-HD.MA5.1-CHDBits" --log-file amc.log --def unsorted=y --def unsortedFormat="{ext == /iso/ ? 'ISO' : 'Unsorted'}/{fn}"

Code: Select all

C:\Users\n3mam>filebot -script fn:amc --output "E:/KODI" --action test -non-strict "D:\BORDEL\The.Dark.Tower.2017.BluRay.1080p.AVC.DTS-HD.MA5.1-CHDBits" --log-file amc.log --def unsorted=y --def unsortedFormat="{ext == /iso/ ? 'ISO' : 'Unsorted'}/{fn}"
Locking C:\Users\n3mam\AppData\Roaming\FileBot\logs\amc.log
Run script [fn:amc] at [Mon Oct 23 06:45:00 CEST 2017]
Parameter: unsorted = y
Parameter: unsortedFormat = {ext == /iso/ ? 'ISO' : 'Unsorted'}/{fn}
Argument[0]: D:\BORDEL\The.Dark.Tower.2017.BluRay.1080p.AVC.DTS-HD.MA5.1-CHDBits
Failed to read disk image: net.sf.sevenzipjbinding.SevenZipException: Archive file can't be opened with none of the registered codecs
Ignore disk image: D:\BORDEL\The.Dark.Tower.2017.BluRay.1080p.AVC.DTS-HD.MA5.1-CHDBits\The.Dark.Tower.2017.BluRay.1080p.AVC.DTS-HD.MA5.1-CHDBits.iso
No files selected for processing
Done ?(?????)?
User avatar
N3mam
Posts: 17
Joined: 18 Oct 2017, 06:09

Re: [AMC] Ignore disk image error

Post by N3mam »

Any idea what's wrong ? RAR archives working just fine, only ISO's (all iso files) are not working
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [AMC] Ignore disk image error

Post by rednoah »

Sorry, looks like ISO files are treated slightly special, and since they're ignored before any files are selected, they're not considered for processing, so neither sorted nor unsorted.

FileBot may not be able to do what you want it to do. If you want to treat ISO files special, then I recommend using a custom PowerShell / CMD command to deal with them before calling filebot.
:idea: Please read the FAQ and How to Request Help.
User avatar
N3mam
Posts: 17
Joined: 18 Oct 2017, 06:09

Re: [AMC] Ignore disk image error

Post by N3mam »

Well then i must download only BDMV BD's i guess :/
Any chance to copy files without procesing them ? Like - if input = iso then copy "X location"
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [AMC] Ignore disk image error

Post by rednoah »

Yes, but not via the amc script.

e.g.

Code: Select all

filebot -rename -r /files --db xattr -non-strict --filter "ext =~ /iso/" --output /iso/files --format "{fn}"
:idea: A simple find ... | mv ... would do the same. But this is a FileBot forum, not a PowerShell / Bash forum. ;)
:idea: Please read the FAQ and How to Request Help.
destroyer4000
Posts: 6
Joined: 01 Nov 2017, 12:59

Re: [AMC] Ignore disk image error

Post by destroyer4000 »

Hey,

Unfortunately I have the same problem. If I try to extract the iso file, there are many .class files, but not my BDMV structure. Opening with 7zip directly results in the same error.

Code: Select all

FileBot 4.7.9 (r4984)
JNA Native: 5.1.0
MediaInfo: 0.7.93
7-Zip-JBinding: 9.20
Chromaprint: 1.4.2
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2017-10-30 (r508)
Groovy: 2.4.10
JRE: Java(TM) SE Runtime Environment 1.8.0_151
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 4 Core / 878 MB Max Memory / 14 MB Used Memory
OS: Windows 10 (amd64)
Package: MSI
Done ?(?????)?
destroyer4000
Posts: 6
Joined: 01 Nov 2017, 12:59

Re: [AMC] Ignore disk image error

Post by destroyer4000 »

*bump*

Is there now a solution fpr renaming ISO Fiels with AMC? Or instead use the smart detection function from filebot via cli? Because with the normal rename files, the iso renaming works, but it's not very powerful in the detection. AMC works much better. Would be very cool, tu solve this issue with 7zip. Is there a way to implement another extractor? For example winrar? It does read the iso format in the right way with the bdmv structure, what 7z, even with the normal installed version is not able to do.

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

Re: [AMC] Ignore disk image error

Post by rednoah »

If you have the 7z command-line tool installed, then you can configure FileBot to use that by passing in the following Java system property:

Code: Select all

-Dnet.filebot.Archive.extractor=SevenZipExecutable
:idea: Only tested on Linux. Not tested on Windows.


EDIT:

Main reason why I can't do anything here is because I can't test or reproduce the issue. Can anybody share one of the BD images for me?
:idea: Please read the FAQ and How to Request Help.
Post Reply