Re: Discord / Slack / IRC Channel
Is it still active?
The ultimate TV and Movie Renamer
https://www.filebot.net/forums/
Code: Select all
Locking C:\Users\WAVE111\AppData\Roaming\FileBot\logs\amc.log
Run script [fn:amc] at [Sun Apr 14 14:08:00 AEST 2019]
Parameter: skipExtract = y
Parameter: unsorted = y
Parameter: music = n
Parameter: artwork = n
Parameter: excludeList = excludes.txt
Parameter: ut_dir =
Parameter: ut_kind = multi
Parameter: ut_title =
Parameter: ut_label =
Argument[0]: D:\jDownload\extracted\test
Use excludes: D:\test\excludes.txt
Input: D:\jDownload\extracted\test\tests.mp4
xattr: [test.mp4] => [WWW - 2019x123 - April 2, 2019]
Group: [Series:test] => [test.mp4]
Rename episodes using [TheTVDB]Please post file paths (and logs or screenshots) of files you're having trouble with.
Code: Select all
filebot -script fn:amc --output "\download" --action copy -non-strict "\renamed" --log-file amc.logIf you run this script automatically in intervals every hour or every day, then you must set --def excludeList or you will get banned.rednoah wrote: 01 Aug 2012, 13:04 If you run this script automatically in intervals every hour or every day, then you must set --def excludeList or you will get banned.
Code: Select all
filebot -script fn:amc --output "/path/to/output" --action duplicate -non-strict "/path/to/input" --log-file amc.log --def excludeList=amc.txtCode: Select all
docker run -it -v /path/to/my/folder:/volume1 -v data:/data rednoah/filebot:watcher /volume1/input --output /volume1/output --action duplicate -non-strict --log-file /volume1/amc.log --def excludeList=/volume1/amc.excludesCode: Select all
- nothing provides java-1.8.0-openjdk-openjfx needed by filebot-4.8.5-universal.jdk8.noarch
Code: Select all
W: GPG error: https://get.filebot.net/deb universal Release: Detached signature file '/var/lib/apt/lists/partial/get.filebot.net_deb_dists_universal_Release.gpg' is in unsupported binary format
Code: Select all
root@debian:/etc/apt# apt-key adv --fetch-keys https://get.filebot.net/filebot/KEYS
Executing: /tmp/apt-key-gpghome.3sjEk5Kz9e/gpg.1.sh --fetch-keys https://get.filebot.net/filebot/KEYS
gpg: requesting key from 'https://get.filebot.net/filebot/KEYS'
gpg: key 4E402EBF7C3C6A71: 4 signatures not checked due to missing keys
gpg: key 4E402EBF7C3C6A71: "Reinhard Pointner <[email protected]>" not changed
gpg: Total number processed: 1
gpg: unchanged: 1
Code: Select all
Requires: java-1.8.0-openjdk
Requires: java-1.8.0-openjdk-openjfx
Requires: jna
Requires: mediainfo
Requires: p7zip
Requires: p7zip-pluginsCode: Select all
Hit:4 https://get.filebot.net/deb stable Release
Reading package lists... Done
Building dependency tree
Reading state information... DoneCode: Select all
Run script [fn:amc] at [Thu May 30 13:53:06 CEST 2019]
Parameter: skipExtract = y
Parameter: unsorted = y
Parameter: music = y
Parameter: artwork = y
Parameter: excludeList = excludes.txt
Parameter: ut_dir = D:\Downloads\suitsDEBDTE302
Parameter: ut_kind = multi
Parameter: ut_title = suitsDEBDTE302
Parameter: ut_label = N/A
Use excludes: C:\Users\caserv01-media\Media\excludes.txt
No files selected for processing
Done ¯\_(ツ)_/¯Aaah ok, still I did not get a valid source from the release with this filename:rednoah wrote: 09 Jun 2019, 07:37 {source} is not a MediaInfo binding. {source} is based primary on the filename, i.e. if the filename contains BluRay then {source} will be BluRay, if the filename is abc.mp4 then {source} will be undefined.
Code: Select all
$ filebot -mediainfo . --format "[{source}] {fn}"
[BluRay] Django Unchained (2012) (1080p BluRay x265 HEVC 10bit AAC 5.1 Silence)Right, I should have looked closer in the log...rednoah wrote: 10 Jun 2019, 15:50 {source} does work for this one:Code: Select all
$ filebot -mediainfo . --format "[{source}] {fn}" [BluRay] Django Unchained (2012) (1080p BluRay x265 HEVC 10bit AAC 5.1 Silence)
Some shitty Featurettes messed with this one...Auto-detect movie from context: [/mnt/slow/torrents/media_downloads/Django Unchained (2012) (1080p BluRay x265 HEVC 10bit AAC 5.1 Silence)/Featurettes/The Costume Designs of Sharen Davis.mkv]
[HARDLINK] from [/mnt/slow/torrents/media_downloads/Django Unchained (2012) (1080p BluRay x265 HEVC 10bit AAC 5.1 Silence)/Django Unchained (2012) (1080p BluRay x265 Silence).mkv] to [/mnt/slow/media/Movies/Django Unchained (2012)/Django Unchained (2012) [x265, Blu-ray-1080p, AAC-5.1, KRaLiMaRKo].mkv]
[HARDLINK] from [/mnt/slow/torrents/media_downloads/Django Unchained (2012) (1080p BluRay x265 HEVC 10bit AAC 5.1 Silence)/Featurettes/Reimagining the Spaghetti - Western The Horses And Stunts of Django Unchained.mkv] to [/mnt/slow/media/Movies/Django Unchained (2012)/Django Unchained (2012) [x265, -1080p, AAC-2.0, ].mkv]
[OVERRIDE] Delete [/mnt/slow/media/Movies/Django Unchained (2012)/Django Unchained (2012) [x265, -1080p, AAC-2.0, ].mkv]
Code: Select all
var script = JD_HOME + '/filebotrun.sh'
var path = package.getDownloadFolder()
var name = package.getName()
var label = package.getComment() ? package.getComment() : 'N/A'
var links = package.getDownloadLinks() ? package.getDownloadLinks() : []
function isReallyFinished() {
for (var i = 0; i < links.length; i++) {
if (links[i].getArchive() != null && links[i].getExtractionStatus() != "SUCCESSFUL" || !package.isFinished()) {
return false
}
}
return true
}
if (isReallyFinished()) {
var command = [script, path, name, label, 'PACKAGE_FINISHED']
log(command)
log(callSync(command))
}Code: Select all
#!/bin/bash
LOG="/sharedfolders/Storage/logs/amc.log"
EXC="/sharedfolders/Storage/logs/amc.txt"
SERIEN="/sharedfolders/plexroot/{plex}"
FILME="/sharedfolders/plexroot/{plex}"
USERNAME=root
HOSTS="172.17.0.1"
SCRIPT="filebot -script fn:amc --output "/sharedfolders/plexroot" --def movieformat="/sharedfolders/plexroot/{plex}" --def seriesformat="/sharedfolders/plexroot/{plex}" --action move --conflict auto -non-strict --log-file $LOG --def skipExtract=y unsorted=n music=n artwork=y --def storeReport=y --def clean=y --def plex=192.168.78.58:42Y97c6VATxkqyiNScD7 "
for HOSTNAME in ${HOSTS} ; do
sshpass -p "pwd" ssh -o StrictHostKeyChecking=no -l ${USERNAME} ${HOSTNAME} "${SCRIPT}"
doneCode: Select all
net.sourceforge.htmlunit.corejs.javascript.WrappedException: Wrapped org.jdownloader.extensions.eventscripter.EnvironmentException: Line 20
java.io.IOException: Cannot run program "/config/filebotrun.sh": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:215)
at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:201)
at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:196)
at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment.callSync(ScriptEnvironment.java:263)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:120)
at net.sourceforge.htmlunit.corejs.javascript.NativeJavaMethod.call(NativeJavaMethod.java:213)
at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1531)
at script(:20)
at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798)
at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105)
at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411)
at org.jdownloader.scripting.JSHtmlUnitPermissionRestricter$SandboxContextFactory.doTopCall(JSHtmlUnitPermissionRestricter.java:119)
at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3057)
at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115)
at net.sourceforge.htmlunit.corejs.javascript.Context.evaluateString(Context.java:1212)
at org.jdownloader.extensions.eventscripter.ScriptThread.evalUNtrusted(ScriptThread.java:275)
at org.jdownloader.extensions.eventscripter.ScriptThread.executeScipt(ScriptThread.java:167)
at org.jdownloader.extensions.eventscripter.ScriptThread.run(ScriptThread.java:147)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 21 more
(#20)
at net.sourceforge.htmlunit.corejs.javascript.Context.throwAsScriptRuntimeEx(Context.java:1907)
at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:146)
at net.sourceforge.htmlunit.corejs.javascript.NativeJavaMethod.call(NativeJavaMethod.java:213)
at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1531)
at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798)
at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105)
at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411)
at org.jdownloader.scripting.JSHtmlUnitPermissionRestricter$SandboxContextFactory.doTopCall(JSHtmlUnitPermissionRestricter.java:119)
at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3057)
at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115)
at net.sourceforge.htmlunit.corejs.javascript.Context.evaluateString(Context.java:1212)
at org.jdownloader.extensions.eventscripter.ScriptThread.evalUNtrusted(ScriptThread.java:275)
at org.jdownloader.extensions.eventscripter.ScriptThread.executeScipt(ScriptThread.java:167)
at org.jdownloader.extensions.eventscripter.ScriptThread.run(ScriptThread.java:147)
Caused by: org.jdownloader.extensions.eventscripter.EnvironmentException: Line 20
java.io.IOException: Cannot run program "/config/filebotrun.sh": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:215)
at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:201)
at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:196)
at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment.callSync(ScriptEnvironment.java:263)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:120)
at net.sourceforge.htmlunit.corejs.javascript.NativeJavaMethod.call(NativeJavaMethod.java:213)
at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1531)
at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798)
at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105)
at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411)
at org.jdownloader.scripting.JSHtmlUnitPermissionRestricter$SandboxContextFactory.doTopCall(JSHtmlUnitPermissionRestricter.java:119)
at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3057)
at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115)
at net.sourceforge.htmlunit.corejs.javascript.Context.evaluateString(Context.java:1212)
at org.jdownloader.extensions.eventscripter.ScriptThread.evalUNtrusted(ScriptThread.java:275)
at org.jdownloader.extensions.eventscripter.ScriptThread.executeScipt(ScriptThread.java:167)
at org.jdownloader.extensions.eventscripter.ScriptThread.run(ScriptThread.java:147)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 21 more
at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment.callSync(ScriptEnvironment.java:266)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:120)
... 12 more
Caused by: java.io.IOException: Cannot run program "/config/filebotrun.sh": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:215)
at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:201)
at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:196)
at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment.callSync(ScriptEnvironment.java:263)
... 17 more
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 21 moreI ended up with the same idea in my own download setup. But when I try to schedule a task in FileBot Node docker I just get arednoah wrote: 12 Jun 2019, 06:57 1.
If you're stuck with docker confinement, then i recommend using JD docker and FileBot Node docker.
Then you can create a scheduled task in the FileBot Node docker and execute it via curl from the JD docker.
That'll decoupling everything, making it easy to spot and fix issues.
Code: Select all
{"success":false,"error":"NOT IMPLEMENTED"}I see. Yes, FileBot Node certainly has value in generating CLI commands. You could always use the WebUI to generate commands and the copy & paste that into your scheduled shell script.OutrageousGem wrote: 17 Jun 2019, 09:37 Just because Node makes it much more convenient to rapidly test different iterations of a command and schedule it when it finally does the right thing. (I am just bad at writing shell scripts. Always some typo / unescaped character / etc....). The API Is all I currently really need.
Code: Select all
nCode: Select all
{evaluate 'n'}Code: Select all
{evaluate '{n}'}Code: Select all
def scriptDir = getClass().protectionDomain.codeSource.location.path
include '$scriptDir/getEditions.groovy'Code: Select all
AccessControlException: access denied ("java.lang.RuntimePermission" "getProtectionDomain")Code: Select all
grant {
permission java.security.AllPermission;
};Code: Select all
def x = 1
println '$x = 1' // $x = 1
println "$x = 1" // 1 = 1Code: Select all
export FILEBOT_FORMAT_D="$HOME/.gdrive/FileBot Formats"Code: Select all
_environment.FILEBOT_FORMAT_DCode: Select all
filebot ... --def FormatFolder="$FILEBOT_FORMAT_D"Code: Select all
{defines.FormatFolder}Great!rednoah wrote: 22 Jun 2019, 04:56 FileBot r6524 will now resolve include("files.groovy") relatively to the current script file by default.
Code: Select all
filebot -mediainfo . --filter '!f.metadata' --format {f}Code: Select all
filebot -mediainfo . --filter '!f.metadata' -exec mv -v {f} /path/to/untagged/files/{f.name}Code: Select all
--format /path/to/new/folder/{plex}Code: Select all
--def "exec=chmod -R 775 {quote folder} && chown -R admin:administrators {quote folder}"nothinghere wrote: 13 Jul 2014, 18:57 The ones I am using. Major thanks to Ithiel and Rednoah for some of the parts.
Movies:
I am using the original title if it the alphabet used is latin based. If the original title is not the same as the english title, and the first spoken language is not Swedish, Norwegian or Danish I will add the English title as part of the filename. This way I can keep the original titles which I prefer, but still have a chance to find them/connect them to the English titles most commonly used when talking to people. The Nordic stuff is because I live there so I know which movies they are.Code: Select all
{norm={it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/\u0022/, '\'').replaceAll(/[:|]/, '.').replaceAll(/\?/, '!').replaceAll(/[*\s\.,]+/, '.').replaceAll(/\b[IiVvXx]+\b/, { it.upper() }).replaceAll(/[0-9](th|nd|rd)/, { it.lower() })};isLatin = {java.text.Normalizer.normalize(it, java.text.Normalizer.Form.NFD).replaceAll(/\p{InCombiningDiacriticalMarks}+/, '') ==~ /^\p{InBasicLatin}+$/}; isLatin(info.OriginalName) ? norm(info.OriginalName) : norm(primaryTitle) }.({y}){if(isLatin(info.OriginalName) && info.OriginalName != primaryTitle && !(info.SpokenLanguages[0] ==~ /(sv|da|no)/)) '.'+ norm(primaryTitle) }{'.'+vf}{'.'+source}{fn.contains('3D') || fn.contains('3-D') ? '.3D':''}{'.'+fn.replace(/(?i)\.DC\./, '.directors.cut.').replaceAll(/director\'?s|theatrical|ultimate/,'$0.Cut').matchAll(/UNCENSORED|UNRATED|REMASTERED|EXTENDED|UNCUT|DIRECTOR\'?S.CUT|THEATRICAL.CUT|ULTIMATE.CUT|FINAL.CUT|SPECIAL.EDITION/)*.upperInitial()*.lowerTrail().sort().join('.')}{'.'+fn.matchAll(/PROPER|REPACK/)*.upper().sort().join('.')}{'.'+vc.replace('Microsoft', 'VC-1')}{'.'+ac.replace('MPEG Audio', 'MP3')}{audio.FormatProfile =~ /MA Core/ ? '-HD.MA' : ''}{audio.FormatProfile =~ /ES/ ? '-ES' : ''}{audio.FormatProfile =~ /Pro/ ? '-Pro' : ''}{'.'+af.replace('8 6ch', '7.1').replace('7 6ch', '6.1').replace('6ch', '5.1').replace('3ch', '2.1').replace('2ch','2.0').replace('1ch','1.0')}{def g = c{group}; def m = c{fn.match(/(?:(?<=[-])[a-z0-9]+$)|(?:^[a-z0-9]+(?=[-]))/)}; if(g==null && m!=null) return '-'+m.replace(/^tpz$/, 'TOPAZ'); if(g!=null && m!=null && m.lower()!=g.lower()) return '-'+m.replace(/^tpz$/, 'TOPAZ'); if(g!=null) return '-'+g;}
If you want to use the format but don't want the special hack for Nordic stuff remove the text: "&& !(info.SpokenLanguages[0] ==~ /(sv|da|no)/)"
The audio/movie codecs are hacked a bit to be named by their real/common names instead of the ones defined by mediainfo. I.e. DTS-HD MA, MP3, VC-1 instead of DTS MA Core, MPEG Audio and Microsoft respectively.
Examples:I would have loved to figure out how to keep the transliterated names, but using {transliterate(info.OriginalTitle)}did not work perfectly, which meant a bunch of titles missed when doing searched.Kôkaku.Kidôtai.2.0.(2008).Ghost.In.The.Shell.2.0.720p.REPACK.x264.DTS.5.1-timeshift.mkv // Latin characters but added english name
Jagten.(2012).1080p.BluRay.x264.DTS-HD.MA-GRYM.mkv // Original name only, primary language is Danish
My.Sassy.Girl.(2001).720p.BluRay.x264.AC3.5.1-EbP.mkv // Actual name is 엽기적인 그녀, or transliterated to Yeopgijeogin Geunyeo
For my sassy girl the transliteration was something like Yeobgi-jeogin Geunyeo or the like, which is really close, but far away to miss some lookups.
NOTE: I do not care for multipart files so I do not support them. I rip my movies as single files without any splits.
Series is a bit simpler as I only care about the name we get from TheTVDB (I have long since abandoned any hope that they'll change their mind and structure series as they were intended instead of simply how they where broadcasted):
NOTE: I do not pad the season numbering (i.e. I use Season 1, Season 2 instead of Season 01, Season 02).Code: Select all
{n}/{episode.special ? 'Specials' : 'Season '+s}/{norm={it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/\u0022/, '\'').replaceAll(/[:|]/, '.').replaceAll(/\?/, '!').replaceAll(/[*\s\.]+/, '.').replaceAll(/\b[IiVvXx]+\b/, { it.upper() }).replaceAll(/[0-9](th|nd|rd)/, { it.lower() })};norm(n) }.{episode.special ? 'S00E'+special.pad(2) : s00e00}.{norm(t)}{'.'+vf}{'.'+source}{'.'+fn.matchAll(/PROPER|REPACK/)*.upper().sort().join('.')}{'.'+vc.replace('Microsoft', 'VC-1')}{'.'+ac.replace('MPEG Audio', 'MP3')}{audio.FormatProfile =~ /MA Core/ ? '-HD.MA' : ''}{audio.FormatProfile =~ /ES/ ? '-ES' : ''}{audio.FormatProfile =~ /Pro/ ? '-Pro' : ''}{'.'+af.replace('8 6ch', '7.1').replace('7 6ch', '6.1').replace('6ch', '5.1').replace('3ch', '2.1').replace('2ch','2.0').replace('1ch','1.0')}{def g = c{group}; def m = c{fn.match(/(?:(?<=[-])[a-z0-9]+$)|(?:^[a-z0-9]+(?=[-]))/)}; if(g==null && m!=null) return '-'+m.replace(/^tpz$/, 'TOPAZ'); if(g!=null && m!=null && m.lower()!=g.lower()) return '-'+m.replace(/^tpz$/, 'TOPAZ'); if(g!=null) return '-'+g;}
Specials end up in a /Specials folder instead. Same thing for video/audio as movies have.
Examples:Coupling\Season 1\Coupling.S01E01.Flushed.360p.DVDRip.x264.AAC.mkv
Doctor Horrible's Sing-Along Blog\Season 1\Doctor.Horrible's.Sing-Along.Blog.S01E01.Act.I.1080p.BluRay.x264.DTS-DIMENSION.mkv
If anyone wants to copy my thing entirely the script I use to sort everything is:NOTE: Remember to update the paths to your series/movies and downloads.Code: Select all
filebot -script fn:amc "x:/downloads" --log-file d:\amc-run.log --output "//nas/" --action move --conflict skip -non-strict --def clean=y --def "movieFormat=Movies/{norm={it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/\u0022/, '\'').replaceAll(/[:|]/, '.').replaceAll(/\?/, '!').replaceAll(/[*\s\.,]+/, '.').replaceAll(/\b[IiVvXx]+\b/, { it.upper() }).replaceAll(/[0-9](th|nd|rd)/, { it.lower() })};isLatin = {java.text.Normalizer.normalize(it, java.text.Normalizer.Form.NFD).replaceAll(/\p{InCombiningDiacriticalMarks}+/, '') ==~ /^\p{InBasicLatin}+$/}; isLatin(info.OriginalName) ? norm(info.OriginalName) : norm(primaryTitle) }.({y}){if(isLatin(info.OriginalName) && info.OriginalName != primaryTitle && !(info.SpokenLanguages[0] ==~ /(sv|da|no)/)) '.'+ norm(primaryTitle) }{'.'+vf}{'.'+source}{fn.contains('3D') || fn.contains('3-D') ? '.3D':''}{'.'+fn.replace(/(?i)\.DC\./, '.directors.cut.').replaceAll(/director\'?s|theatrical|ultimate/,'$0.Cut').matchAll(/UNCENSORED|UNRATED|REMASTERED|EXTENDED|UNCUT|DIRECTOR\'?S.CUT|THEATRICAL.CUT|ULTIMATE.CUT|FINAL.CUT|SPECIAL.EDITION/)*.upperInitial()*.lowerTrail().sort().join('.')}{'.'+fn.matchAll(/PROPER|REPACK/)*.upper().sort().join('.')}{'.'+vc.replace('Microsoft', 'VC-1')}{'.'+ac.replace('MPEG Audio', 'MP3')}{audio.FormatProfile =~ /MA Core/ ? '-HD.MA' : ''}{audio.FormatProfile =~ /ES/ ? '-ES' : ''}{audio.FormatProfile =~ /Pro/ ? '-Pro' : ''}{'.'+af.replace('8 6ch', '7.1').replace('7 6ch', '6.1').replace('6ch', '5.1').replace('3ch', '2.1').replace('2ch','2.0').replace('1ch','1.0')}{def g = c{group}; def m = c{fn.match(/(?:(?<=[-])[a-z0-9]+$)|(?:^[a-z0-9]+(?=[-]))/)}; if(g==null && m!=null) return '-'+m.replace(/^tpz$/, 'TOPAZ'); if(g!=null && m!=null && m.lower()!=g.lower()) return '-'+m.replace(/^tpz$/, 'TOPAZ'); if(g!=null) return '-'+g;}" --def "seriesFormat=TV Shows/{n}/{episode.special ? 'Specials' : 'Season '+s}/{norm={it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/\u0022/, '\'').replaceAll(/[:|]/, '.').replaceAll(/\?/, '!').replaceAll(/[*\s\.]+/, '.').replaceAll(/\b[IiVvXx]+\b/, { it.upper() }).replaceAll(/[0-9](th|nd|rd)/, { it.lower() })};norm(n) }.{episode.special ? 'S00E'+special.pad(2) : s00e00}.{norm(t)}{'.'+vf}{'.'+source}{'.'+fn.matchAll(/PROPER|REPACK/)*.upper().sort().join('.')}{'.'+vc.replace('Microsoft', 'VC-1')}{'.'+ac.replace('MPEG Audio', 'MP3')}{audio.FormatProfile =~ /MA Core/ ? '-HD.MA' : ''}{audio.FormatProfile =~ /ES/ ? '-ES' : ''}{audio.FormatProfile =~ /Pro/ ? '-Pro' : ''}{'.'+af.replace('8 6ch', '7.1').replace('7 6ch', '6.1').replace('6ch', '5.1').replace('3ch', '2.1').replace('2ch','2.0').replace('1ch','1.0')}{def g = c{group}; def m = c{fn.match(/(?:(?<=[-])[a-z0-9]+$)|(?:^[a-z0-9]+(?=[-]))/)}; if(g==null && m!=null) return '-'+m.replace(/^tpz$/, 'TOPAZ'); if(g!=null && m!=null && m.lower()!=g.lower()) return '-'+m.replace(/^tpz$/, 'TOPAZ'); if(g!=null) return '-'+g;}"
Paste everything into a file called amc.cmd or something and double click it to run it.
This works great. Any chance of this being an option within the application? Maybe under Preferences?rednoah wrote: 25 Feb 2019, 19:23
- Open Start Menu and search for Set Environment Variables
- Click on New
Name:Value:Code: Select all
FILEBOT_OPTSCode: Select all
-Dnet.filebot.theme=Darcula- Click OK and then relaunch FileBot.
Note that you'll need the latest revision (i.e. r6135 or higher) for any of this to work. The FileBot (platform) launcher is using the Darcula theme by default now as well.
Code: Select all
space + call{fn.matches(/(?i).+\bhevc.+?\b.+/) ? '(x265)' : ' '}+
space + call{fn.matches(/(?i).+\bx265\b.+/) ? '(x265)' : ' '}+
space + call{fn.matches(/(?i).+\b264\b.+/) ? '(x264)' : ' '}+Code: Select all
{'(' + any{vc.match(/x26[45]/)}{vc} + ')'}Not at all. It's just a variety of frequently requested features that more or less fall under the same umbrella. The future plan is to add selected post-processing features to the GUI and allow users to apply some of them as part of the rename process.
A public API is not planned. It doesn't do anything that isn't already implemented in the htpc.groovy script or otherwise commonly handled via -exec calls.
It's doing more or less the same as the artwork.* scripts, using TheMovieDB / TheTVDB / FanartTV as the source of image files.
Code: Select all
/usr/bin/filebot --db TheTVDB \
--q 360733 \
-rename '/media/e1b7/m7eesn/completed/tv/bydb-ttd/byid-360733/Watchmen.S01E02.1080p.WEB.h264-TBS[rarbg]' \
--output '/media/e1b7/m7eesn/media/TV Shows/' \
--format '{n}/Season {s.pad(2)}/{n} - {s00e00} - {t}' \
-non-strict \
--encoding utf8 \
--log all \
--log-file '/media/e1b7/m7eesn/src/logs/amc/2019_11_04.log' \
--action move \
--conflict index \
--def music=false \
--def skipExtract=true \
--def artwork=false \
--def ut_kind=multi \
--def minFileSize=100 \
--def minLengthMS=5
Code: Select all
--file-filter f.videothats great to hear, does the filter include ONLY videos files or subs included as well?rednoah wrote: 04 Nov 2019, 16:56 You can use the --file-filter for that:Code: Select all
--file-filter f.videoviewtopic.php?t=4222
thats great, is it possible to combine two filters for video and subs?, i really just dont want nfo files
Include video or subtitle files:
Code: Select all
--file-filter 'f.video || f.subtitle'Exclude *.nfo files:
Code: Select all
--file-filter 'ext != /nfo/'Thank you, is there any up to date documentation page with those new changes fixes etc? it's really hard hunting those small but important changes.rednoah wrote: 04 Nov 2019, 19:01 1.Include video or subtitle files:Code: Select all
--file-filter 'f.video || f.subtitle'
2.Exclude *.nfo files:Code: Select all
--file-filter 'ext != /nfo/'
The release notes can be found here:kise wrote: 05 Nov 2019, 17:12 Thank you, is there any up to date documentation page with those new changes fixes etc? it's really hard hunting those small but important changes.
What i meant is that having update to date documentation for all those new features and how they work is really helpful instead of hunting for scattered forums posts and obscure URLs, and it would also cut down the amount of those unneeded questions. Also thank you for the changes URL that would be helpful in the future.rednoah wrote: 05 Nov 2019, 17:37The release notes can be found here:kise wrote: 05 Nov 2019, 17:12 Thank you, is there any up to date documentation page with those new changes fixes etc? it's really hard hunting those small but important changes.
https://github.com/filebot/docs/blob/master/CHANGES.md
The --file-filter option was introduced with FileBot 4.8.2 but I'm not sure what that would have to do with changes and fixes, since it was just new at the time, and the examples given above would have worked from day one.
Code: Select all
FileBot 4.8.2 (r5789)
JNA Native: 5.2.2
MediaInfo: 18.05
7-Zip-JBinding: 9.20
Chromaprint: java.io.IOException: Cannot run program "fpcalc": error=2, No such file or directory
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2019-02-26 (r552)
Groovy: 2.5.1
JRE: OpenJDK Runtime Environment 1.8.0_222
JVM: 64-bit OpenJDK 64-Bit Server VM
CPU/MEM: 4 Core / 3 GB Max Memory / 18 MB Used Memory
OS: Linux (amd64) Ubuntu 16.04.6 LTS
HW: Linux nas 4.15.0-15-generic #16~16.04.1-Ubuntu SMP Thu Apr 5 12:19:23 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
DATA: /home/paully/Downloads/filebot/data/paully
Package: TAR
License: FileBot License P8xxxxx3 (Valid-Until: 2020-07-31)
------------------- UPDATE AVAILABLE: FileBot 4.8.5 (r6224) --------------------
Done ヾ(@⌒ー⌒@)ノ
Have you tried this yet?rednoah wrote: 13 Jul 2018, 12:00 The installer/deb.sh will add the repository and install FileBot for you:Code: Select all
bash -xu <<< "$(curl -fsSL https://raw.githubusercontent.com/filebot/plugins/master/installer/deb.sh)"
Code: Select all
find /path/to/files/Temp -maxdepth 1 -type f -exec filebot -rename {} --db TheMovieDB --format "{n.colon(' - ')} ({y}) / {fn}" -non-strict --output "/path/to/files/Temp" -no-xattr ';'Code: Select all
Auto-detect movie from context: [/home/nex/gdrive/Media/HD/Movies/Web/A.Childs.Christmas.2008.1080p.Amazon.WEB-DL.DD2.0.H.264-QOQ.mkv]
[MOVE] from [/home/nex/gdrive/Media/HD/Movies/Web/A.Childs.Christmas.2008.1080p.Amazon.WEB-DL.DD2.0.H.264-QOQ.mkv] to [/home/nex/gdrive/Media/HD/Movies/Web/Web of Desire (2008)/A.Childs.Christmas.2008.1080p.Amazon.WEB-DL.DD2.0.H.264-QOQ.mkv]
Processed 1 files
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/home/nex/gdrive/Media/HD/Movies/Web/Hairtales.2008.1080p.Amazon.WEB-DL.DD2.0.H.264-QOQ.mkv]
[MOVE] from [/home/nex/gdrive/Media/HD/Movies/Web/Hairtales.2008.1080p.Amazon.WEB-DL.DD2.0.H.264-QOQ.mkv] to [/home/nex/gdrive/Media/HD/Movies/Web/Web of Desire (2008)/Hairtales.2008.1080p.Amazon.WEB-DL.DD2.0.H.264-QOQ.mkv]
Processed 1 files
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/home/nex/gdrive/Media/HD/Movies/Web/Hannahs.Gift.2008.1080p.WEBRip.DD2.0.x264-NTb.mkv]
[MOVE] from [/home/nex/gdrive/Media/HD/Movies/Web/Hannahs.Gift.2008.1080p.WEBRip.DD2.0.x264-NTb.mkv] to [/home/nex/gdrive/Media/HD/Movies/Web/Web of Desire (2008)/Hannahs.Gift.2008.1080p.WEBRip.DD2.0.x264-NTb.mkv]
Processed 1 files
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/home/nex/gdrive/Media/HD/Movies/Web/Randy.Newman.Live.in.London.2008.1080p.AMZN.WEB-DL.DD2.0.H.264-SiGMA.mkv]
[MOVE] from [/home/nex/gdrive/Media/HD/Movies/Web/Randy.Newman.Live.in.London.2008.1080p.AMZN.WEB-DL.DD2.0.H.264-SiGMA.mkv] to [/home/nex/gdrive/Media/HD/Movies/Web/Web of Desire (2008)/Randy.Newman.Live.in.London.2008.1080p.AMZN.WEB-DL.DD2.0.H.264-SiGMA.mkv]
Processed 1 files
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/home/nex/gdrive/Media/HD/Movies/Web/Staind.Live.in.Cologne.Germany.2008.1080p.Amazon.WEB-DL.DD2.0.x264-QOQ.mkv]
[MOVE] from [/home/nex/gdrive/Media/HD/Movies/Web/Staind.Live.in.Cologne.Germany.2008.1080p.Amazon.WEB-DL.DD2.0.x264-QOQ.mkv] to [/home/nex/gdrive/Media/HD/Movies/Web/Web of Desire (2008)/Staind.Live.in.Cologne.Germany.2008.1080p.Amazon.WEB-DL.DD2.0.x264-QOQ.mkv]
Processed 1 files
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/home/nex/gdrive/Media/HD/Movies/Web/The.Lost.World.of.Mr.Hardy.2008.1080p.WEBRip.DD2.0.x264-monkee.mkv]
[MOVE] from [/home/nex/gdrive/Media/HD/Movies/Web/The.Lost.World.of.Mr.Hardy.2008.1080p.WEBRip.DD2.0.x264-monkee.mkv] to [/home/nex/gdrive/Media/HD/Movies/Web/Web of Desire (2008)/The.Lost.World.of.Mr.Hardy.2008.1080p.WEBRip.DD2.0.x264-monkee.mkv]
Processed 1 files
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/home/nex/gdrive/Media/HD/Movies/Web/The.Solomon.Treasures.2008.1080p.Amazon.WEB-DL.DD2.0.H.264-QOQ.mkv]
[MOVE] from [/home/nex/gdrive/Media/HD/Movies/Web/The.Solomon.Treasures.2008.1080p.Amazon.WEB-DL.DD2.0.H.264-QOQ.mkv] to [/home/nex/gdrive/Media/HD/Movies/Web/Web of Desire (2008)/The.Solomon.Treasures.2008.1080p.Amazon.WEB-DL.DD2.0.H.264-QOQ.mkv]
Processed 1 files
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/home/nex/gdrive/Media/HD/Movies/Web/Wargames.The.Dead.Code.2008.1080p.AMZN.WEB-DL.DDP5.1.H.264-BLUTONiUM.mkv]
[MOVE] from [/home/nex/gdrive/Media/HD/Movies/Web/Wargames.The.Dead.Code.2008.1080p.AMZN.WEB-DL.DDP5.1.H.264-BLUTONiUM.mkv] to [/home/nex/gdrive/Media/HD/Movies/Web/Web of Desire (2008)/Wargames.The.Dead.Code.2008.1080p.AMZN.WEB-DL.DDP5.1.H.264-BLUTONiUM.mkv]Code: Select all
Auto-detect movie from context: [/home/nex/gdrive/Media/HD/Movies/Temp/A.Childs.Christmas.2008.1080p.Amazon.WEB-DL.DD2.0.H.264-QOQ.mkv]
[MOVE] from [/home/nex/gdrive/Media/HD/Movies/Temp/A.Childs.Christmas.2008.1080p.Amazon.WEB-DL.DD2.0.H.264-QOQ.mkv] to [/home/nex/gdrive/Media/HD/Movies/Temp/Coopers' Camera (2009)/A.Childs.Christmas.2008.1080p.Amazon.WEB-DL.DD2.0.H.264-QOQ.mkv]
Processed 1 files
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/home/nex/gdrive/Media/HD/Movies/Temp/Hairtales.2008.1080p.Amazon.WEB-DL.DD2.0.H.264-QOQ.mkv]
[MOVE] from [/home/nex/gdrive/Media/HD/Movies/Temp/Hairtales.2008.1080p.Amazon.WEB-DL.DD2.0.H.264-QOQ.mkv] to [/home/nex/gdrive/Media/HD/Movies/Temp/Tales (2014)/Hairtales.2008.1080p.Amazon.WEB-DL.DD2.0.H.264-QOQ.mkv]
Processed 1 files
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/home/nex/gdrive/Media/HD/Movies/Temp/Hannahs.Gift.2008.1080p.WEBRip.DD2.0.x264-NTb.mkv]
[MOVE] from [/home/nex/gdrive/Media/HD/Movies/Temp/Hannahs.Gift.2008.1080p.WEBRip.DD2.0.x264-NTb.mkv] to [/home/nex/gdrive/Media/HD/Movies/Temp/Echelon Conspiracy (2009)/Hannahs.Gift.2008.1080p.WEBRip.DD2.0.x264-NTb.mkv]
Processed 1 files
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/home/nex/gdrive/Media/HD/Movies/Temp/Randy.Newman.Live.in.London.2008.1080p.AMZN.WEB-DL.DD2.0.H.264-SiGMA.mkv]
[MOVE] from [/home/nex/gdrive/Media/HD/Movies/Temp/Randy.Newman.Live.in.London.2008.1080p.AMZN.WEB-DL.DD2.0.H.264-SiGMA.mkv] to [/home/nex/gdrive/Media/HD/Movies/Temp/Randy Newman - Live in London (2010)/Randy.Newman.Live.in.London.2008.1080p.AMZN.WEB-DL.DD2.0.H.264-SiGMA.mkv]
Processed 1 files
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/home/nex/gdrive/Media/HD/Movies/Temp/Staind.Live.in.Cologne.Germany.2008.1080p.Amazon.WEB-DL.DD2.0.x264-QOQ.mkv]
[MOVE] from [/home/nex/gdrive/Media/HD/Movies/Temp/Staind.Live.in.Cologne.Germany.2008.1080p.Amazon.WEB-DL.DD2.0.x264-QOQ.mkv] to [/home/nex/gdrive/Media/HD/Movies/Temp/Live! (2007)/Staind.Live.in.Cologne.Germany.2008.1080p.Amazon.WEB-DL.DD2.0.x264-QOQ.mkv]
Processed 1 files
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/home/nex/gdrive/Media/HD/Movies/Temp/The.Lost.World.of.Mr.Hardy.2008.1080p.WEBRip.DD2.0.x264-monkee.mkv]
[MOVE] from [/home/nex/gdrive/Media/HD/Movies/Temp/The.Lost.World.of.Mr.Hardy.2008.1080p.WEBRip.DD2.0.x264-monkee.mkv] to [/home/nex/gdrive/Media/HD/Movies/Temp/The Lost World of Mr. Hardy (2009)/The.Lost.World.of.Mr.Hardy.2008.1080p.WEBRip.DD2.0.x264-monkee.mkv]
Processed 1 files
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/home/nex/gdrive/Media/HD/Movies/Temp/The.Solomon.Treasures.2008.1080p.Amazon.WEB-DL.DD2.0.H.264-QOQ.mkv]
[MOVE] from [/home/nex/gdrive/Media/HD/Movies/Temp/The.Solomon.Treasures.2008.1080p.Amazon.WEB-DL.DD2.0.H.264-QOQ.mkv] to [/home/nex/gdrive/Media/HD/Movies/Temp/Solomon (1997)/The.Solomon.Treasures.2008.1080p.Amazon.WEB-DL.DD2.0.H.264-QOQ.mkv]
Processed 1 files
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/home/nex/gdrive/Media/HD/Movies/Temp/Wargames.The.Dead.Code.2008.1080p.AMZN.WEB-DL.DDP5.1.H.264-BLUTONiUM.mkv]
[MOVE] from [/home/nex/gdrive/Media/HD/Movies/Temp/Wargames.The.Dead.Code.2008.1080p.AMZN.WEB-DL.DDP5.1.H.264-BLUTONiUM.mkv] to [/home/nex/gdrive/Media/HD/Movies/Temp/War Games - The Dead Code (2008)/Wargames.The.Dead.Code.2008.1080p.AMZN.WEB-DL.DDP5.1.H.264-BLUTONiUM.mkv]
Processed 1 files