From bdbc4571be24df2a6756e0848ff1899fd5192887 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Sat, 19 Oct 2013 03:15:05 +0000 Subject: [PATCH] * include Folder Size / File Count --- website/data/query-blacklist.txt | 1 + website/scripts/mi.groovy | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/website/data/query-blacklist.txt b/website/data/query-blacklist.txt index 827e8da7..058ed9cb 100644 --- a/website/data/query-blacklist.txt +++ b/website/data/query-blacklist.txt @@ -120,6 +120,7 @@ Channel.4 Channel.5 CLASSIC CN +CODIFICAR ConvertedTV Custom.DKsubs CVCD diff --git a/website/scripts/mi.groovy b/website/scripts/mi.groovy index f0ac571e..7e2c9f80 100644 --- a/website/scripts/mi.groovy +++ b/website/scripts/mi.groovy @@ -3,8 +3,11 @@ /* * Print media info of all video files to CSV file */ -def model = 'Name;Container;Resolution;Video Codec;Video Format;Audio Codec;Audio Format;Audio Language(s);Duration;File Size;Path' -def template = '{fn};{cf};{resolution};{vc};{vf};{ac};{af};{media.AudioLanguageList};{media.DurationString3};{file.length()};{file.getCanonicalPath()}' +def model = '''Name;Container;Resolution;Video Codec;Video Format;Audio Codec;Audio Format;Audio Language(s);Duration;File Size;Folder Size;Folder Count;Path''' +def template = '''{fn};{cf};{resolution};{vc};{vf};{ac};{af};{media.AudioLanguageList};{media.DurationString3};{file.length()};{folder.listFiles().sum{ it.length() }};{folder.listFiles().sum{ it.isFile() ? 1 : 0 }};{file.getCanonicalPath()}''' + +// sanity check +if (args.size() != 2) throw new Exception('Invalid arguments:' + args) // open destination file (writing files requires -trust-script) args[1].withWriter{ output ->