AMC Weird (can not do --action move or hardlink)

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
neocronomican
Posts: 9
Joined: 05 Oct 2013, 04:04

AMC Weird (can not do --action move or hardlink)

Post by neocronomican »

First of all, I want to say thankyou for rednoah for filebot.... This software realy Rocks dude!!! :mrgreen: :mrgreen: ....

I need help from all member in this forum, to solve my AMC system problem.. My AMC system use:
- Windows 7 SP1 64bit
- FileBot 3.8 (r1791)
- Java(TM) SE Runtime Environment 1.7.0_45 64 bit
- MediaInfo 0.7.64


I am tryin to reorganize my movie/serial in my computer using amc.groovy. But I found some weird things happen... When I use --action test this script can run smoothly but when I use --action move or --action hardlink the output log is like this :

Code: Select all

Input: H:\FL\X-Men.First.Class.2011.720p\First.Class.2011.Ray.720p.x264.DTS-HDChina.mkv
Oct 17, 2013 11:52:55 PM net.sourceforge.filebot.web.TMDbClient searchMovie
WARNING: Ignore movie [75 habitantes, 20 casas, 300 vacas]: Missing data: release date
NullPointerException: java.lang.NullPointerException
java.lang.NullPointerException
	at net.sourceforge.filebot.web.Movie.getEffectiveNames(Movie.java:46)
	at net.sourceforge.filebot.media.MediaDetection$3.getMaxSimilarity(MediaDetection.java:639)
	at net.sourceforge.filebot.similarity.SimilarityComparator.compare(SimilarityComparator.java:28)
	at net.sourceforge.filebot.media.MediaDetection.sortBySimilarity(MediaDetection.java:649)
	at net.sourceforge.filebot.media.MediaDetection.detectMovie(MediaDetection.java:593)
	at net.sourceforge.filebot.media.MediaDetection$detectMovie.call(Unknown Source)
	at Script2.detectMovie(Script2.groovy:241)
	at Script2.detectMovie(Script2.groovy)
	at Script3$_run_closure33.doCall(Script3.groovy:128)
	at Script3.run(Script3.groovy:121)
	at net.sourceforge.filebot.cli.ScriptShell.evaluate(ScriptShell.java:101)
	at net.sourceforge.filebot.cli.ScriptShell.runScript(ScriptShell.java:94)
	at net.sourceforge.filebot.cli.ArgumentProcessor.process(ArgumentProcessor.java:125)
	at net.sourceforge.filebot.Main.main(Main.java:183)
Failure (°_°)
This my command in CMD:

Code: Select all

@echo off > H:/FL/amc.log
filebot -script fn:amc  "H:/FL/" --output "H:/" --log-file "H:/FL/amc.log"  --conflict override -non-strict --action move --def clean=y music=n  subtitles=en artwork=n "movieFormat=!Movie/{n.upperInitial().space('.')}.{y}.{vf}/{fn}" "seriesFormat=!TV/{n}/{'S'+s}/{fn}" "animeFormat=!Anime/{n}/{fn}"
So I want to ask all for you:
1. How to solve my AMC problem?
2. Is filebot AMC support Korean or Japan serial drama?
3. Why I cant use --def clean=y to delete my extract file? But its okey to use sorty.groovy...
4. I want to give suggestion to rednoah to create some mailing list to inform us about any filebot(rXXX-XXX) update...
5. Can you mod mi.groovy so it can output folder size for every movie/serial, how much file in every folder, and output with format text with delimited tab?

Thankyou very much, sorry I am not familiar with programming and if my english bad... :oops: :oops:
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC Weird (can not do --action move or hardlink)

Post by rednoah »

1. Might be a cache issue with outdated objects. Try r1795.

2. Basic support for Anime => Video files with Japanese audio and ASS subtitles will be processed via AniDB instead of TheTVDB

3. AMC doesn't delete files that are being seeded.

4. Good idea, sourceforge already does that => http://sourceforge.net/api/file/index/p ... mit/20/rss

5. You can make that mod yourself. Works exactly like format expressions. ;)

Here's the "hard" part ;)

Code: Select all

{folder.listFiles().sum{ it.length() }}

Code: Select all

{folder.listFiles().sum{ it.isFile() ? 1 : 0 }}
:idea: Please read the FAQ and How to Request Help.
neocronomican
Posts: 9
Joined: 05 Oct 2013, 04:04

Re: AMC Weird (can not do --action move or hardlink)

Post by neocronomican »

@rednoah : thankyou for your fast response... :)

1. Thankyou rednoah, the new update works smoothly !!!
2. Just check TheTVDB, its support KDrama and JDrama....
3. Sorry my mistake rednoah, I don't inform you that I not use Torrent but I use Internet Download Manager... I think after download movie with multipart rar, I run amc.groovy to extract multipart rar , delete multipart rar, download subs, and move the extracted file to organize folder... Still possible with amc.groovy?
4. Definitly I will join the mailing list....

5. I try it, and still get a little problem with the text output... With the input folder like this

Code: Select all

H:/Movie/Avatar.2009.1080p/Avatar.2009.Extended.Collectors.Edition.1080p.-ray.DTS.x264-ViSTA.mkv
H:/Movie/Avatar.2009.1080p/Avatar.2009.Extended.Collectors.Edition.1080p.-ray.DTS.x264-ViSTA-eng.srt
H:/Movie/Avatar.2009.1080p/Avatar.2009.Extended.Collectors.Edition.1080p.-ray.DTS.x264-ViSTA-fr.srt
I hope the output is like this:

Code: Select all

Folder.Title        Folder.Size(GB)     Release.Date    Folder.Count   Subtitle    Path
Avatar.2009.720p    12.00               2009/12/19      3              en,fr       H:/Movie 
How to get parameter for Folder.Title, Release.Date, Subtitle availaible, Folder Path?


My noob mod mi.groovy like this now :oops: and still far from above output :D

Code: Select all

def model = 'Folder.Title    Folder.Size Release   Folder.Count          Subtilte  Path'
def template = '{n.upperInitial().space('.')}.{y}.{vf}	{folder.listFiles().sum{ it.length() }} 	{folder.listFiles().sum{ it.isFile() ? 1 : 0 }}'
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC Weird (can not do --action move or hardlink)

Post by rednoah »

* Can't have release date. The mi script doesn't do media detection so you only get data based on file name or file content.

* Subtitle en,fr might be a bit tricky. You'd have to check files in the same folder and count subtitles.
:idea: Please read the FAQ and How to Request Help.
neocronomican
Posts: 9
Joined: 05 Oct 2013, 04:04

Re: AMC Weird (can not do --action move or hardlink)

Post by neocronomican »

Thankyou for your reply rednoah.... Hmmm so make the output simple like this:

Code: Select all

Folder.Title        Folder.Size(GB)     File.Count     Path
Avatar.2009.720p    12.00               3              H:/Movie 
What parameter that I must add to mi.groovy to get like above?
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC Weird (can not do --action move or hardlink)

Post by rednoah »

You mean the number formatting?

Code: Select all

{(folder.listFiles().sum{ it.length() } / (float)(1024.power(3))).round(2)}
Just play with it. All really basic groovy code. You can play with all that in the GUI and the paste it into the script.
:idea: Please read the FAQ and How to Request Help.
neocronomican
Posts: 9
Joined: 05 Oct 2013, 04:04

Re: AMC Weird (can not do --action move or hardlink)

Post by neocronomican »

Thankyou readnoah for the folder size code, how about code to get parameter:

FolderTitle = Avatar.2009.720p (I has try {n.upperInitial().space('.')}.{y}.{vf} but it not work to output the folder title)
File.Count = 3 ( It means in the folder Avatar.2009.720p there are 3 files, that are 1 mkv and 2 srt files)
Path = H:/Movie (the drive and exact location for Avatar.2009.720p folder)

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

Re: AMC Weird (can not do --action move or hardlink)

Post by rednoah »

1. I guess {n} is the file name, folder name looks like this:

Code: Select all

{folder.name}
2. What's not working about this one? It's gonna count all files that are not folders:

Code: Select all

{folder.listFiles().sum{ it.isFile() ? 1 : 0 }}
3. That one is already in the original mi script:

Code: Select all

{file.path}
:idea: Please read the FAQ and How to Request Help.
neocronomican
Posts: 9
Joined: 05 Oct 2013, 04:04

Re: AMC Weird (can not do --action move or hardlink)

Post by neocronomican »

@rednoah : Thankyou very much, 1 and 2 work perfectly...

3. For the folder path maybe I am not clear explain it to you, because my system has more than one hdd, and I categorize my file to Movie, TV-Serials, and Anime so I hope the output path is just Drive letter and Catagorize folder file.... This is the example of input file:

Code: Select all

D:/Movie/AAA.2013.1080p/AAA.2013.1080p.mkv
D:/Movie/AAA.2013.1080p/AAA.2013.1080p.srt

F:/Movie/BBB.2013.1080p/BBB.2013.1080p.mkv
F:/Movie/BBB.2013.1080p/BBB.2013.1080p.srt

H:/TV-Serial/W.D/Season.1/WD.S01E01.1080p.mkv
F:/TV-Serial/W.D/Season.3/WD.S03E01.1080p.mkv
I hope the path output (drive letter and catagorize foldername) like this

Code: Select all

Title               Path
AAA.2013.1080p      D:/Movie
BBB:2013.1080p      F:/Movie
WD.S01E01.1080p     H:/TV-Serial
WD.S03E01.1080p     F:/TV-Serial
Its is possible to output path like that? Thanks before...
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC Weird (can not do --action move or hardlink)

Post by rednoah »

Path Level 0 to 1

Code: Select all

{file[0..1]}
:idea: Please read the FAQ and How to Request Help.
neocronomican
Posts: 9
Joined: 05 Oct 2013, 04:04

Re: AMC Weird (can not do --action move or hardlink)

Post by neocronomican »

Thank you very much rednoah to solve my problem...

I would like to give some sugestion about script.groovy, maybe You can make a script.groovy like amc.groovy to support system that use Download Manager (not Torrent)... The script has same function with amc.grooyv, after all process in amc.script done, it will delete file that do not needed (ex: multipart rar) and capable to make junction link...
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC Weird (can not do --action move or hardlink)

Post by rednoah »

Just deleting some *.rar files is easy. You can modify amc.groovy yourself or just call your own delete script afterwards.
:idea: Please read the FAQ and How to Request Help.
neocronomican
Posts: 9
Joined: 05 Oct 2013, 04:04

Re: AMC Weird (can not do --action move or hardlink)

Post by neocronomican »

rednoah wrote:Just deleting some *.rar files is easy. You can modify amc.groovy yourself or just call your own delete script afterwards.
I realy want to do that, but no skill of java programming...
Post Reply