File Bot wont extract

Running FileBot from the console, Groovy / FileBot scripting, shell scripts, etc
Post Reply
raulm753
Posts: 13
Joined: 30 Apr 2012, 16:47

File Bot wont extract

Post by raulm753 » 01 May 2012, 13:59

I got this code snipet from my modifed sorty.groovy script
I calling the script like this:
filebot -script "G:\Media Files\Completed\sorty.groovy" -non-strict -trust-script "-Xut_dir=G:\Media Files\Completed\Movies\Test" "-Xut_file=%F" "-Xut_label=Movies" "-Xut_state=%S" "-Xut_kind=%K"
Inside the Test folder there is a compressed movie with rar files.
I'm using the lastest version of FileBot: filebot-2.61-r990-include.jar

Code: Select all

// extract completed multi-volume rar files
// extract all archives found in this folder
if (!new File(ut_dir).hasFile{ incomplete(it) } && new File(ut_dir).hasFile{ it =~ /[.]rar$/ }) {
	println "Extracting Video Processing $ut_dir"
	def paths = extract(folder:ut_dir)
	
	// delete original archive volumes after successful extraction
	if (paths != null && !paths.isEmpty()) {
		ut_dir.listFiles{ it =~ /[.]rar$|[.]r[\d]+$/ }*.delete()
	}
}
Im not getting any errrors and the println statment is being print out
Thank you in advance

This is the rest of the code

Code: Select all

// filebot -script "sorty.groovy" -non-strict -trust-script "-Xut_dir=%D" "-Xut_file=%F" "-Xut_label=%L" "-Xut_state=%S" "-Xut_kind=%K"
// PERSONALIZED SETTINGS
def episodeDir    = "G:/Media Files/Completed/TV"
def episodeFormat = "G:/Media Files/TV/{n}/Season {s}/{n} - {s00e00} - {t}"
def movieDir      = "G:/Media Files/Completed/Movies"
def movieFormat   = "G:/Media Files/Movies/{n} ({y})/{n} ({y})"
def animeDir      = "G:/Media Files/Completed/Anime"
def animeFormat   = "G:/Media Files/Anime/{n}/Season {s}/{n} - {s00e00} - {t}"

// XBMC ON LOCAL MACHINE 
def xbmc = [] // (use [] to not notify any XBMC instances about updates)



// ignore chunk, part, par and hidden files
def incomplete(f) { f.name =~ /[.]incomplete|[.]chunk|[.]par$|[.]dat$/ || f.isHidden() }

//Remove Sample Video
if (!new File(ut_dir).hasFile{ incomplete(it) } ) {
	println "Deleting Sample Video Processing $ut_dir"
	def files = new File(ut_dir).listFiles{ it.isVideo() }
	// if name contains "sample" and filesize is less than 20 MB
	//def selection = args.getFiles{ it.name =~ "sample" && it.length() < 20 * 1024 * 1024}
	def selection = new File(ut_dir).getFiles{ (it.name =~ "sample" || it.name =~ "Sample") && it.length() < 150 * 1024 * 1024}
	selection.each{ println "delete $it" }

	// delete all
	selection*.delete()
}

// extract completed multi-volume rar files
// extract all archives found in this folder
if (!new File(ut_dir).hasFile{ incomplete(it) } && new File(ut_dir).hasFile{ it =~ /[.]rar$/ }) {
	println "Extracting Video Processing $ut_dir"
	def paths = extract(folder:ut_dir)
	
	// delete original archive volumes after successful extraction
	if (paths != null && !paths.isEmpty()) {
		ut_dir.listFiles{ it =~ /[.]rar$|[.]r[\d]+$/ }*.delete()
	}
}

//Remove Sample Video
if (!new File(ut_dir).hasFile{ incomplete(it) } ) {
	println "Deleting Sample Video Processing $ut_dir"
	def files = new File(ut_dir).listFiles{ it.isVideo() }
	// if name contains "sample" and filesize is less than 20 MB
	//def selection = args.getFiles{ it.name =~ "sample" && it.length() < 20 * 1024 * 1024}
	def selection = new File(ut_dir).getFiles{ (it.name =~ "sample" || it.name =~ "Sample") && it.length() < 150 * 1024 * 1024}
	selection.each{ println "delete $it" }

	// delete all
	selection*.delete()
}



//Fetch subtitles and sort into folders
 
//TV
if (ut_label == "TV") {
	println "TV Processing $ut_dir"
	files = new File(ut_dir).listFiles{ it.isVideo() }

	// fetch subtitles
	//files += getSubtitles(file:files)
	
	// sort episodes / subtitles
	rename(file:files, db:'TVRage', format:episodeFormat)
}

//Movies
if (ut_label == "Movies") {
	println "Movies Processing $ut_dir"
	files = new File(ut_dir).listFiles{ it.isVideo() }
	
	// fetch subtitles
	//files += getSubtitles(file:files)
	
	// sort movies / subtitles
	rename(file:files, db:'TheMovieDB', format:movieFormat)
}

//Anime
if (ut_label == "Anime") {
	println "Anime Processing $ut_dir"
	files = new File(ut_dir).listFiles{ it.isVideo() }
	
	// fetch subtitles
	//files += getSubtitles(file:files)
	
	// sort episodes / subtitles
	rename(file:files, db:'anidb', format:animeFormat)
}


// make XBMC scan for new content
xbmc.each { host ->
	telnet(host, 9090) { writer, reader ->
		// API call for latest XBMC release
		def msg = '{"id":1,"method":"VideoLibrary.Scan","params":[],"jsonrpc":"2.0"}'
		
		// API call for XBMC Dharma-Release or older
		// def msg = '{"id":1,"method":"VideoLibrary.ScanForContent","params":[],"jsonrpc":"2.0"}'
				
		writer.println(msg)
	}
}

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

Re: File Bot wont extract

Post by rednoah » 01 May 2012, 15:46

Try something basic first. This works for me:

Code: Select all

println extract(folder:"E:/Storage/300")
Where there is [300.part01.rar, ...] in that folder.
:idea: Please read the FAQ and How to Request Help.

raulm753
Posts: 13
Joined: 30 Apr 2012, 16:47

Re: File Bot wont extract

Post by raulm753 » 02 May 2012, 02:10

all I get is this

Code: Select all

[]
The files are in the format name.rar, name.rXX: where XX is a two digit number from 00 to whatever.

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

Re: File Bot wont extract

Post by rednoah » 02 May 2012, 02:31

Alright, got that as well. It's bug.

EDIT: Fixed with r992
:idea: Please read the FAQ and How to Request Help.

raulm753
Posts: 13
Joined: 30 Apr 2012, 16:47

Re: File Bot wont extract

Post by raulm753 » 02 May 2012, 02:48

That was fast. Thank you. How do I get r992?

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

Re: File Bot wont extract

Post by rednoah » 02 May 2012, 02:54

Check the HEAD downloads later. Uploading right now.
:idea: Please read the FAQ and How to Request Help.

raulm753
Posts: 13
Joined: 30 Apr 2012, 16:47

Re: File Bot wont extract

Post by raulm753 » 02 May 2012, 02:59

Thank you so much man. You are the best.

Post Reply