POSTBUCKET - where random posts in unrelated topics go
-
JonBackhaus
- Posts: 1
- Joined: 09 Sep 2018, 00:45
Re: [DEB] Debian package
Re: [DEB] Debian package
Re: [SNIPPET] Override / Hardcode Series Names
Examples:
Overlord III -> Overlord S3
Owarimonogatari -> Monogatari Series S11
-
TrueTenacity
- Posts: 14
- Joined: 28 Feb 2017, 15:19
Re: Conditional Structures (if-then-else)
How would one go about including folders in this?rednoah wrote: 26 Jul 2018, 01:17 1.
If you just want to add the collection in front of the plex path, then you don't need if-then-else:If you want a default value if collection is undefined, the I'd write something like this:Code: Select all
{collection+'/'}{plex}You can't check if collection == null because of theThe Unwind-on-Undefined Behaviour, meaning collection is never null, it's either not null, or it crashes the {expression}.Code: Select all
{any{collection}{'No Collection'}/{plex}
2.
However, the error message you posted is completely unrelated to if-then-else and just tells us that we can't use the / operator between a String object and a File object.
Movies\Movie Collections\ if there's a collection
Movies\{az} if there isn't one
Re: Conditional Structures (if-then-else)
Code: Select all
{plex[0]}/{any{'Movie Collections/'+collection}{az}}/{plex.tail}Code: Select all
{any{'Movie Collections/'+collection.replaceAll('Collection')}{plex[0]+'/'+az}}/{plex.tail}Code: Select all
{any{'Movie Collections/'+collection.replaceAll('Collection')}{'Movies/'+az}}/{plex.tail}Code: Select all
{any{'Movie Collections/'+collection.replaceAll('Collection')}{(allOf{'Movies/'}{az}).join()}}/{plex.tail}viewtopic.php?f=5&t=4796&p=35841#p35841
-
TrueTenacity
- Posts: 14
- Joined: 28 Feb 2017, 15:19
-
phetrommer
- Posts: 1
- Joined: 18 Sep 2018, 12:02
Re: Exclude Blacklist & Series-Mappings
Re: Conditional Structures (if-then-else)
You mean this ?TrueTenacity wrote:18 Sep 2018, 07:46 Hi there,
I used your suggested fix for separating movies and collections, but I seem to have hit a snag...
My current expression is \\gaia-prime\Movies\{any{'Movie Collections/'+az+'/'+collection+'/'+ny+'/'+ny}{ny+'/'+ny}} [{vf}]{subt}
but when i add the az operator to the movies without a collection, the whole thing stops working.
am I adding it wrong or something?
Code: Select all
\\gaia-prime\Movies\{any{'Movie Collections/'+az+'/'+collection+'/'+ny+'/'+ny}{az+'/'+ny+'/'+ny}} [{vf}]{subt}-
TrueTenacity
- Posts: 14
- Joined: 28 Feb 2017, 15:19
Re: Conditional Structures (if-then-else)
Re: Conditional Structures (if-then-else)
Code: Select all
\\gaia-prime\Movies\{any{'Movie Collections/'+az+'/'+collection+'/'+ny+'/'+ny}{az+'/'+ny+'/'+ny}} [{vf}]{subt}e.g. \\gaia-prime/Movies/D/Demolition Man (1993)/Demolition Man (1993) [720p]
or \\gaia-prime/Movies/Movie Collections/A/Avatar Collection/Avatar (2009)/Avatar (2009) [720p]
try
Code: Select all
\\gaia-prime\Movies\{any{collection ? ('Movie Collections/'+az+'/'+collection+'/'+ny+'/'+ny) : 'collection found but something is wrong'} {az+'/'+ny+'/'+ny} {'WTF'} }"but when you use it on a movie that isn't in one, it only adds the vf and subt part... the file name and path disappear..."
btw: there is a better way to write it
Code: Select all
\\gaia-prime\Movies\{any{'Movie Collections/'+az+'/'+collection}{az}}/{ny}/{ny} [{vf}]{subt}Code: Select all
\\gaia-prime\Movies\{def altDir = ('Movie Collections/'+az+'/'); any{altDir+collection}{az}}/{ny}/{ny} [{vf}]{subt}-
TrueTenacity
- Posts: 14
- Joined: 28 Feb 2017, 15:19
Re: Conditional Structures (if-then-else)
Your better way does the trick!
Thanks!
Re: Exclude Blacklist & Series-Mappings
Re: How about sharing our format expressions?
Re: How about sharing our format expressions?
If you would be willing to share your script for MusicBrainz with me as well that would be awesome.
Thanks.
Re: How about sharing our format expressions?
Greg
-
alteredstate
- Posts: 6
- Joined: 14 Sep 2012, 23:15
Re: [DEB] Debian package
Re: [DEB] Debian package
Re: [DEB] Debian package
Re: [DEB] Debian package
-
cafevincent
- Posts: 65
- Joined: 22 Jun 2017, 10:08
Re: Exclude Blacklist & Series-Mappings
Re: Exclude Blacklist & Series-Mappings
-
cafevincent
- Posts: 65
- Joined: 22 Jun 2017, 10:08
Re: Exclude Blacklist & Series-Mappings
Re: Exclude Blacklist & Series-Mappings
1-2 examples will suffice. I can generalize from that.
2.
The CLI output is the output you get when you use the CLI. Sounds like you're using the GUI. Nevermind CLI output then.
-
nothing919
- Posts: 11
- Joined: 16 Oct 2018, 22:27
Re: [TAR] How to install FileBot on Linux / FreeBSD / Solaris / any Unix OS
Re: [Anime] Convert Absolute to SxE numbers
Thanks for all your hard work!
Re: [Anime] Convert Absolute to SxE numbers
e.g. convert Absolute to SxE in one go using your format:
Code: Select all
filebot -rename "One Piece 501.avi" --db TheTVDB --order Absolute --format "{n}.{y}.{order.airdate.s00e00}.#{absolute}.{t}.[{airdate}]" -non-strictRe: Exclude Blacklist & Series-Mappings
Code: Select all
Luksusfaelden.S21E06.DANiSH.720p.HDTV.x264-DiViSiON/
luksusfaelden.s21e06.720p-divisionRe: Exclude Blacklist & Series-Mappings
Re: Exclude Blacklist & Series-Mappings
Re: Exclude Blacklist & Series-Mappings
Re: Exclude Blacklist & Series-Mappings
if i rename the files to luksusfælden it will match it correctly, but luksusfaelden match wrong everytime
Re: Exclude Blacklist & Series-Mappings
Re: [DEB] Debian package
Just installed via APT and noticed a few odd quirks...
You're probably best not telling people to use --install-suggests. Mostly because a) 'recommends' would be a better fit and b) using --install-suggests is recursive, so you end up with a whole Web server (in my case apache2) being installed just because you installed FileBot
Code: Select all
lantizia@loki:~/Downloads$ aptitude why apache2
i filebot Suggests ffmpeg
i A ffmpeg Suggests ffmpeg-doc
i A ffmpeg-doc Depends libjs-jquery
i A libjs-jquery Recommends javascript-common
i A javascript-common Suggests apache2 (>= 2.4.6~) | lighttpd | httpdPerhaps a better apt-get line would be simply...
Code: Select all
sudo apt-get -y install openjfx mediainfo libchromaprint-tools filebotThanks for all the hard work
Steven
p.s. more info on Debian policy for using suggests/recommends can be found here... https://www.debian.org/doc/debian-polic ... re-depends
Re: [DEB] Debian package
Re: [DEB] Debian package
Well, that definitely sucks...Lantizia wrote: 31 Oct 2018, 12:04 You're probably best not telling people to use --install-suggests. Mostly because a) 'recommends' would be a better fit and b) using --install-suggests is recursive, so you end up with a whole Web server (in my case apache2) being installed just because you installed FileBot...
Due to the changes in JDK 11 (i.e. no more Oracle JRE with JavaFX built-in) there's no point to do this on Linux in the future. Is there a working OpenJFX 11 package in the Debian repository already?Lantizia wrote: 31 Oct 2018, 12:04 Also in your last post to this thread you said the JRE is built in, if that is the case - why is it on the suggests list? (which is currently... openjdk-10-jre
Quite possibly. If Recommends is indeed pulled automatically on Desktop Linux machines, then it makes sense to do:Lantizia wrote: 31 Oct 2018, 12:04 Perhaps a better apt-get line would be simply...Or instead make openjfx, mediainfo and libchromaprint-tools to be 'recommends' instead. Most desktop users are used to extra stuff being pulled in via recommends, whilst server administrators (I do this on my Debian boxes) turn off automatically installing recommends as a matter of course.Code: Select all
sudo apt-get -y install openjfx mediainfo libchromaprint-tools filebot
Code: Select all
Depends: <stuff required for the CLI>
Recommends: <stuff required for the GUI only>Re: [DEB] Debian package
http://packages.debian.org/openjfx (which is OpenJFX v8 in Debian 9 - the latest stable version, but it'll be v11 in the next version of Debian)
http://packages.ubuntu.com/openjfx (again it is v8 in Ubuntu 18.04 - the latest long term version that I use, but its v11 in Ubuntu 18.10 and it'll be v11 in 19.04)
I wouldn't be able to say one way or the other how this affects FileBot as I'm not too familiar with the JFX bit.
Your "DEBIAN/control" file in the package could simply change this one line...
Code: Select all
Suggests: openjdk-10-jre, openjfx, xdg-utils, ffmpeg, mediainfo, libchromaprint-toolsCode: Select all
Recommends: openjdk-10-jre, openjfx, xdg-utils, ffmpeg, mediainfo, libchromaprint-toolsIf 100% of those additional packages are optional, then they need to be "Recommends: "
This is fine as *all* Debian-derived distributions I've ever encountered (BOTH servers and desktops) all install recommended packages by default.
It's only certain server-admins (like me) that manually make it system-wide policy not to install recommends on server - just so that we can see what they'd be and choose to install them after if needed to lower the security footprint of the server.
If you do make the above change, remember that in your deb.sh file you can change...
Code: Select all
sudo apt-get install filebot --install-suggestsCode: Select all
sudo apt-get install filebotBut depends vs recommends vs suggests - this hasn't really got anything to do with purpose such as cli vs gui
Re: [DEB] Debian package
https://get.filebot.net/filebot/FileBot_4.8.5/
The new Debian package is now platform-independent and can work an any architecture, but that means that all native code is handled via APT dependencies, i.e. OpenJDK 11 and OpenJFX 11 is now required.
Re: [DEB] Debian package
Nobody in their right mind runs a non-LTS version of Ubuntu unless they're prepared to deal with the unforeseen consequences of something that...
a) only got knocked up because it happened to be either the month of April or October in a year - and not because it was actually ready or properly tested.
b) only gets support for 9 months.
It's more like a preview release in my mind - not really like bi-annual Windows 10 update... as with a non-LTS Ubuntu *every* package version changes breaking the ability to use many 3rd party bits of software which are not ready for it.
Most people (like me) who use Ubuntu in a production environment (personally for me that is definitely my place of work, but also at home as I don't want to be fixing bugs all day) will use whatever the latest LTS is (usually about 4 months after it came out to let the dust settle) and in the case of 18.04 it'll be supported until April 2023 - but most will switch to 20.04 at around August 2020 (4 months after the release of 20.04).
Please don't make this only usable on (in my opinion) non-stable Ubuntu versions only - and especially on Debian 10 only, as that thing is definitely not stable!
Re: [DEB] Debian package
AFAIK, only OpenJFX is a problem, but that's not even required at all if you're only interested in the CLI tools, and easy to install (i.e. copy files) manually if needed and that I could help automate via shell scripts.
If Java 11 is an issue, then we could consider sticking to Java 8 (which makes JavaFX work out of the box on 18.04 but not work on anything newer) but the portable tar is already there to cover people that need backwards compatibility.
Anyway, I'm open to suggestions here, especially considering that GUI users and CLI users might very likely be running on different environments.
Re: [DEB] Debian package
/usr/bin/filebot: 14: /usr/bin/filebot: java: not found
If you use 'sudo apt -y install ./FileBot_4.8.5.deb' then you'll get...
Error: LinkageError occurred while loading main class net.filebot.Main
java.lang.UnsupportedClassVersionError: net/filebot/Main has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 54.0
Naturally these *can* be resolved after the fact... but that's not really the point
Installing some basic desktop application really ought to just be...
Step 1) Add the additional repository (either graphically through Software & Updates, or via command line)
Step 2) Tell your system the name of the package you want to install (again graphically or command line)
You've kind of got all the information you need, it's up to you how to do this. I suspect you don't package for Linux all that often (just a feeling).
Personally I'd whack arch-dependant versions of openjfx in to the package itself (and the package could stay multi-arch) just like you do libjnidispatch.so.
To be honest including only aarch64/armv7l/i686/x86_64 versions of libjnidispatch.so means the package isn't really 'all' arch anyway - and the Debian lintian systems picks up on that and may warn people the package is of bad quality :S But I don't care about that personally.
Re: [DEB] Debian package
Re: [DEB] Debian package
Another way to look at this is... don't bother giving people a .deb file at all.rednoah wrote: 28 Nov 2018, 08:06 If Java 11 is an issue, then we could consider sticking to Java 8 (which makes JavaFX work out of the box on 18.04 but not work on anything newer)
Make them use the repository - it's the best way IMO. Really .deb files aren't meant to be used in this way (which is why apt only *just* like this/last year got the ability to install from them directly - granted dpkg could, but it wouldn't resolve dependencies without then calling apt-get after to fix the system).
If you stick with the repository you can do what everyone else does and instead of having...
Code: Select all
deb [arch=amd64] https://get.filebot.net/deb/ stable main
Code: Select all
deb https://get.filebot.net/deb raspbian-jessie main
deb https://get.filebot.net/deb raspbian-stretch main
deb [arch=amd64] https://get.filebot.net/deb trusty main
deb [arch=amd64] https://get.filebot.net/deb xenial main
deb [arch=amd64] https://get.filebot.net/deb bionic main
deb [arch=amd64] https://get.filebot.net/deb cosmic main
deb [arch=amd64] https://get.filebot.net/deb jessie main
deb [arch=amd64] https://get.filebot.net/deb stretch mainAdditionally I don't think Recommends are followed when installing an individual .deb package - it is something read by apt... something that is being bypassed by not installing from a repository.
Re: [DEB] Debian package
* Changed to amd64 only and included OpenJFX
* Changed Recommends to Depends
Code: Select all
https://get.filebot.net/filebot/FileBot_4.8.5/FileBot_4.8.5_amd64.debRe: [DEB] Debian package
* universal (requires OpenJDK 11 and OpenJFX 11)
* universal-jdk8 (requires OpenJDK 8 and OpenJFX 8)
The universal one should work on Ubuntu 18.10 / Debian 10. The universal-jdk8 one should work on Ubuntu 16.04 LTS / Ubuntu 18.04 LTS / Debian 9 and Raspbian / Raspberry Pi (untested). Both rely on apt for all native dependencies.
-
Massaguana
- Posts: 36
- Joined: 18 Mar 2018, 14:30
Re: Match by Episode Title
Original Filename: Detektiv.Conan.S01E15.Eine.moerderische.Zahl.German.ANiME.FS.720p.HDTV.x264-ATAX.mkv
Match: Detektiv Conan - S25E82 - Mörderische Zeiten im Cafe Poirot (1).mkv
When i look into TheTVDB the correct name are: S01E13
What can id do to Rename this Anime?
Thanks
Re: Match by Episode Title
Generally speaking, you can always match files and episodes manually:
https://www.youtube.com/watch?v=btNSv7A ... nd&index=2

Re: MediaInfo Inspector
my expression is :
Code: Select all
{s00e00} - {t} ({resolution}_{kbps}_{vc}_{channels}_{ac}_{source}_{languages}_{lang}_{subt})
where does Filebot take the informations {source}, {languages}, {lang} and {subt} from ? MediaInfo for all of them ?
indeed, I have plenty of cartoons and when I look at them with MediaInfo, most of them don't have the language set, neither the source, and when i apply the expression, i get "fra" as language --> why ?
2/I don't see how Filebot could retrieve the "source", as i never saw it in MediaInfo --> does it come from MediaInfo ??? how can i set it in the cartoons ? with which tool ?
thank you very much in advance for your reply
regards
EDIT :
I found mkvtoolnix to set the language, but i don't see how to set the "source"
Re: MediaInfo Inspector
Does NOT use MediaInfo:weyb06 wrote: 05 Dec 2018, 08:09 where does Filebot take the informations {source}, {languages}, {lang} and {subt} from ? MediaInfo for all of them ?
{source} is based on the file path only, matching kown patterns such as BluRay.
{lang} and {subt} is for subtitles, matching the subtitle language suffix from the file path, or by running statistical language detection on the file contents of text-based subtitle files.
Does use MediaInfo:
{languages} is a convenience binding for reading audio languages (via libmediainfo or ffprobe depending on your install).
If the filename doesn't say Bluray / DVDRip / WebDL / etc then {source} won't work. If you just have the video file, then it's impossible to tell if it came from BD / DVD / Netflix / iTunes / etc. You could guess based on file size / resolution / bitrate / etc in your own format code but it's ultimately guesswork unless the file is explicitly tagged in some way.weyb06 wrote: 05 Dec 2018, 08:09 I don't see how Filebot could retrieve the "source", as i never saw it in MediaInfo --> does it come from MediaInfo ??? how can i set it in the cartoons ? with which tool ?
Re: MediaInfo Inspector
thank you for your reply !
i understand a little better how it works !
I found mkvtoolnix to set the language, but i don't see how to set the "source"
--> which property could i set (with mkvtoolnix) as the "source" so filebot recognizes/reads it with MediaInfo (and then afterwards i'll be able to get it), please ?
--> I mean to use a property i don't use to set the "source"...
EDIT : you should precise on https://www.filebot.net/naming.html that {lang} is for subtitles only
Re: MediaInfo Inspector
EDIT: I'll be making changes to FileBot 4.8.5 also check the media title (e.g. from mkv title tag if available) as well for bindings such as {source} that are based on the current or original filename.
Re: MediaInfo Inspector
I saw there is "media" able to get <any any general media parameter>, but how do i do that please ? {media} is enough ?
Re: MediaInfo Inspector
Object/Property style:
Code: Select all
media.EncodedLibraryStringCode: Select all
media['Encoded_Library/String']Re: MediaInfo Inspector
Q : i have set the language with mkvtoolnix, and i can see "Language/String: en" in the audio section of Mediainfo, so why do i get [fra] with {languages} in my expression ?
regards
Re: MediaInfo Inspector
{languages} is the TheTVDB language / TheMovieDB spoken languages field.
{audioLanguages} is the convenience binding for accessing audio languages (as List of Language objects).
{audio.LanguageString} is direct access for the Language/String value for each audio stream.
Re: [TAR] How to install FileBot on Linux / FreeBSD / Solaris / any Unix OS
Code: Select all
~/filebot-portable# sh filebot.sh -script fn:sysinfo
filebot.sh: java: not foundRe: [TAR] How to install FileBot on Linux / FreeBSD / Solaris / any Unix OS
Re: [JDownloader] Setup for Windows, Linux and Mac OS X
I am trying to setup and run your JDownloader script and can't seem to get it to work.
I am using Windows 10 64 bit and JDownloader2 (instead of JDownloader) to download my files to a folder and that is the folder I would then like to be processed by filebot and you AMC script.
I figured out how to install the scripting plugin in to JDownloader2 and I created a script based on what you posted here and the following web site https://github.com/filebot/plugins/tree ... downloader .
When I test run it in the scripter it seems to work but nothing is happening when the download completes. My files are not processed by filebot or the AMC script.
I'm new to this and trying to learn, please help. Also where do I put the files I download that you created if that is the issue.
Re: [JDownloader] Setup for Windows, Linux and Mac OS X
Note that if you're on Windows, you'll need to use the *.cmd script and not the *.sh script, so you'll modify this line:
Code: Select all
var script = JD_HOME + '/jdownloader-postprocess.sh'Code: Select all
var script = 'C:/jdownloader-postprocess.cmd'Re: [JDownloader] Setup for Windows, Linux and Mac OS X
I did make a event script/trigger from other things I read and added your suggestion. Here is the event script/trigger :
Code: Select all
[{
"eventTrigger": "ON_PACKAGE_FINISHED",
"enabled": true,
"name": "Execute FileBot (PackageFinished)",
"script": "var script = 'C:/jdownloader-postprocess.cmd'\n\nvar path = package.getDownloadFolder()\nvar name = package.getName()\nvar label = package.getComment() ? package.getComment() : 'N/A'\n\nvar command = [script, path, name, label, 'PACKAGE_FINISHED']\n\nlog(command)\nlog(callSync(command))\n",
"eventTriggerSettings": {}
}]Re: [JDownloader] Setup for Windows, Linux and Mac OS X
If it's not called, then maybe because the JDownloader hook doesn't work, which means we simplify:
Code: Select all
var command = ['C:/Windows/System32/notepad.exe']
log(command)
log(callSync(command))Re: [JDownloader] Setup for Windows, Linux and Mac OS X
What you gave me to try worked. (as far as executing notepad.exe)
I wasn't able to find out or figure which log was for JDownloader2 and the script I was trying though. So I don't know if it actually runs the CMD file.
Thanks again for the help.
Re: [JDownloader] Setup for Windows, Linux and Mac OS X
If notepad.exe is called, then we know that works, so the next step is to do the same with C:/Windows/System32/cmd.exe /c C:/script.bat.
2.
Just write a script that does something like this:
Code: Select all
DATE /T > C:\date.txtRe: [JDownloader] Setup for Windows, Linux and Mac OS X
var command = ['C:/Windows/System32/cmd.exe /c C:/script.bat']
log(command)
log(callSync(command))
I also created a BAT file with DATE /T > C:\date.txt inside of it and saved it to C for it to be called.
When I did a test run in the scripter in JDownloader2 it came back with an error.
Does the error mean it is not finding the cmd program?
Re: [JDownloader] Setup for Windows, Linux and Mac OS X
Re: [JDownloader] Setup for Windows, Linux and Mac OS X
It is here :
Code: Select all
C:\Users\Chris Chester\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\System Tools
This is the script now
Code: Select all
var command = ['C:/Users/Chris Chester/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/System Tools/cmd.exe /c C:/script.bat']
log(command)
log(callSync(command))Code: Select all
var command = ["C:/Users/Chris Chester/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/System Tools/cmd.exe /c C:/script.bat"]
log(command)
log(callSync(command))Same results either way.
This seems very simple but I am not sure why it just is not working. I do really appreciate your help on this.
Re: [JDownloader] Setup for Windows, Linux and Mac OS X
Code: Select all
var command = ["C:/Users/Chris Chester/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/System Tools/cmd.exe"]
log(command)
log(callSync(command))
Still got errors
Wrapped org.jdownloader.extensions.eventscripter.EnvironmentException: Line 3
java.io.IOException: Cannot run program "C:/Users/Chris Chester/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/System Tools/cmd.exe": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
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:247)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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:254)
at org.jdownloader.extensions.eventscripter.ScriptThread.executeScipt(ScriptThread.java:148)
at org.jdownloader.extensions.eventscripter.ScriptThread.run(ScriptThread.java:128)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 22 more
(#3)Re: [JDownloader] Setup for Windows, Linux and Mac OS X
Code: Select all
var command = ['C:\Windows\System32']
log(command)
log(callSync(command))Code: Select all
net.sourceforge.htmlunit.corejs.javascript.WrappedException: Wrapped org.jdownloader.extensions.eventscripter.EnvironmentException: Line 3
java.io.IOException: Cannot run program "C:Windows System32": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
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:247)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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(:3)
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:254)
at org.jdownloader.extensions.eventscripter.ScriptThread.executeScipt(ScriptThread.java:148)
at org.jdownloader.extensions.eventscripter.ScriptThread.run(ScriptThread.java:128)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 22 more
(#3)
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:254)
at org.jdownloader.extensions.eventscripter.ScriptThread.executeScipt(ScriptThread.java:148)
at org.jdownloader.extensions.eventscripter.ScriptThread.run(ScriptThread.java:128)
Caused by: org.jdownloader.extensions.eventscripter.EnvironmentException: Line 3
java.io.IOException: Cannot run program "C:Windows System32": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
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:247)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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:254)
at org.jdownloader.extensions.eventscripter.ScriptThread.executeScipt(ScriptThread.java:148)
at org.jdownloader.extensions.eventscripter.ScriptThread.run(ScriptThread.java:128)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 22 more
at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment.callSync(ScriptEnvironment.java:250)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:120)
... 12 more
Caused by: java.io.IOException: Cannot run program "C:Windows System32": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
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:247)
... 17 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 22 moreRe: [JDownloader] Setup for Windows, Linux and Mac OS X
Code: Select all
C:\>jdownloader-postprocess.cmd
The syntax of the command is incorrect.
C:\><!DOCTYPE html>Re: [JDownloader] Setup for Windows, Linux and Mac OS X
Did you just "Save as..." a web page and then run it as CMD script?
Here's what a CMD script looks like:
https://raw.githubusercontent.com/fileb ... rocess.cmd
Here's what a HTML web page looks like:
https://raw.githubusercontent.com/fileb ... index.html
2.
Now, the first step is to actually have a working cmd script, but then it'll still probably not work right away, because Windows, and then we're back to where we started.
3.
Here's some general debugging tips. (a) You can't execute a folder. (b) Read the error message. Doesn't this look strange? No \ here? That's because in "..." the \ character almost always has special meaning, meaning that you can't use it literally. (not your fault, Windows engineers made really really bad decisions back in the 80ies, and their mistakes are still coming back to haunt us all)
Code: Select all
Cannot run program "C:Windows System32"Re: [JDownloader] Setup for Windows, Linux and Mac OS X
I saved the file that you just posted.
I will test things but running the cmd on it's own to see if it work then move back to the scripter.
Re: [JDownloader] Setup for Windows, Linux and Mac OS X
C:\>jdownloader-postprocess.cmd
Locking C:\Users\Chris Chester\AppData\Roaming\FileBot\logs\amc.log
Run script [fn:amc] at [Mon Jan 21 10:50:59 EST 2019]
Parameter: skipExtract = y
Illegal usage: no input
Failure (°_°)
I also tried the script again just to see if would at least launch it even if it failed but I get nothing. I can't seem to find the correct log either.
var command = ['/jdownloader-postprocess.cmd']
log(command)
log(callSync(command))
I will keep trying and thanks for all the help. Sorry about the mistakes.
Re: [JDownloader] Setup for Windows, Linux and Mac OS X
Code: Select all
C:\>jdownloader-postprocess.cmd
Locking C:\Users\Chris Chester\AppData\Roaming\FileBot\logs\amc.log
Run script [fn:amc] at [Mon Jan 21 10:50:59 EST 2019]
Parameter: skipExtract = y
Illegal usage: no input
Failure (°_°)Code: Select all
var command = ['/jdownloader-postprocess.cmd']
log(command)
log(callSync(command))Re: Plex Naming Schemes
NOOB here
Using
Code: Select all
{plex.derive{" [$vf.$vc.$ac]"}}https://ibb.co/87vTcrF
How can I get around this?
Thanks.
Re: Plex Naming Schemes
e.g.
Code: Select all
$ filebot -list --q 24 --format {plex} --filter "s == 1 && e <= 3"
TV Shows/24/Season 01/24 - S01E01 - 12.00 A.M. - 1.00 A.M
TV Shows/24/Season 01/24 - S01E02 - 1.00 A.M. - 2.00 A.M
TV Shows/24/Season 01/24 - S01E03 - 2.00 A.M. - 3.00 A.MIf want to preserve the trailing "." then you can use a full custom format such as this:
Code: Select all
TV Shows/{n}/Season {s.pad 2}/{n} - {s00e00} - {t} [{vf}.{vc}.{ac}]Re: [JDownloader] Setup for Windows, Linux and Mac OS X
Code: Select all
var command = ['C:\\absolute\\path\\to\\cmd.exe', '-c', 'C:\\absolute\\path\\to\\jdownloader-postprocess.cmd']Re: [JDownloader] Setup for Windows, Linux and Mac OS X
This is what I put in my script based on the info you gave and I have:
Code: Select all
var command = ['C:\\Windows\\System32\\cmd.exe', '-c', 'C:\\jdownloader-postprocess.cmd']
log(command)
log(callSync(command))I found the log I think for it:
Code: Select all
------------------------Thread: 1792:ScriptEnvironment.log-----------------------
--ID:1792TS:1548138130189-1/22/19 1:22:10 AM - [org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment(log)] -> [ "C:\\Windows\\System32\\cmd.exe", "-c", "C:\\jdownloader-postprocess.cmd" ]
--ID:1792TS:1548138132497-1/22/19 1:22:12 AM - [org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment(log)] -> Microsoft Windows [Version 10.0.17763.253]
(c) 2018 Microsoft Corporation. All rights reserved.
C:\Users\Chris Chester\AppData\Local\JDownloader 2.0>Re: [JDownloader] Setup for Windows, Linux and Mac OS X
Code: Select all
C:\Users\Chris Chester\AppData\Local\JDownloader 2.0>
------------------------Thread: 2094:ScriptEnvironment.log-----------------------
--ID:2094TS:1548142207563-1/22/19 2:30:07 AM - [org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment(log)] -> [ "C:\\Windows\\System32\\cmd.exe", "-c", "C:\\jdownloader-postprocess.cmd" ]
--ID:2094TS:1548142207651-1/22/19 2:30:07 AM - [org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment(log)] -> Microsoft Windows [Version 10.0.17763.253]
(c) 2018 Microsoft Corporation. All rights reserved.Re: [JDownloader] Setup for Windows, Linux and Mac OS X
I changed what you gave me to this as my event script.
Code: Select all
@ECHO OFF
:: Input Parameters
set ARG_PATH=%1
set ARG_NAME=%2
set ARG_LABEL=%3
:: Configuration
set CONFIG_OUTPUT="C:/Torrent-Completed"
filebot -script fn:amc "C:/Users/Chris Chester/Media" --output "C:/Torrent-Completed" --action duplicate --conflict skip -non-strict --log-file amc.log --def skipExtract=y unsorted=y music=y artwork=y excludeList=excludes.txtThis is the log.
Code: Select all
------------------------Thread: 2152:ScriptEnvironment.log-----------------------
--ID:2152TS:1548143057335-1/22/19 2:44:17 AM - [org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment(log)] -> C:\jdownloader-postprocess.cmd
--ID:2152TS:1548143061629-1/22/19 2:44:21 AM - [org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment(log)] -> Locking C:\Users\Chris Chester\AppData\Roaming\FileBot\logs\amc.log
Run script [fn:amc] at [Tue Jan 22 02:44:20 EST 2019]
Parameter: skipExtract = y
Parameter: unsorted = y
Parameter: music = y
Parameter: artwork = y
Parameter: excludeList = excludes.txt
Argument[0]: C:\Users\Chris Chester\Media
Use excludes: C:\Torrent-Completed\excludes.txt (28)
No files selected for processing
Done ?(?????)?Re: [JDownloader] Setup for Windows, Linux and Mac OS X
1.
Start from the beginning:
viewtopic.php?f=4&t=3478#p19358
2.
Modify the JD scripts to make them work on your Windows system.
i.e. change this:
Code: Select all
var script = JD_HOME + '/jdownloader-postprocess.sh'
Code: Select all
var script = ['C:\\Windows\\System32\\cmd.exe', '-c', 'C:\\jdownloader-postprocess.cmd']
3.
(Optional) Modify FileBot output folder if you're not happy with the default.
i.e. change this:
Code: Select all
set CONFIG_OUTPUT=%USERPROFILE%/MediaCode: Select all
set CONFIG_OUTPUT="X:/Media"Re: Plex Naming Schemes
Re: Plex Naming Schemes
Code: Select all
{n.colon(' - ')}The {plex} format does take care of these corner cases already, and if you need all of those but if you want more control, then you can start with a format such as this, and then modify it to your needs:
Code: Select all
TV Shows/{n}/{episode.special ? 'Specials' : 'Season '+s.pad(2)}/{n} - {episode.special ? 'S00E'+special.pad(2) : s00e00} - {t.replaceAll(/[`´‘’ʻ]/, /'/).replaceAll(/[!?.]+$/).replacePart(', Part $1')}{'.'+lang}Re: [JDownloader] Setup for Windows, Linux and Mac OS X
Ok, I started over.
So I went to the website and copied what you had in the script window for Execute FileBot (PackageFinished) and the went into JDownloader2 and created the event script.
Am I supposed to download this instead of copying the code and if so where do I store it so JDownloader2 can find it?
I changed only var script = JD_HOME + '/jdownloader-postprocess.sh' to var script = ['C:\\Windows\\System32\\cmd.exe', '-c', 'C:\\jdownloader-postprocess.cmd']
I then went on to do the same with the other script I went to the website and copied what you had in the script window for Execute FileBot (ArchiveExtracted) and the went into JDownloader2 and created the event script.
Am I supposed to download this instead of copying the code and if so where do I store it so JDownloader2 can find it?
I changed only var script = JD_HOME + '/jdownloader-postprocess.sh' to var script = ['C:\\Windows\\System32\\cmd.exe', '-c', 'C:\\jdownloader-postprocess.cmd']
I then downloaded the jdownloader-postprocess.cmd from the website.
In that file I only changed set CONFIG_OUTPUT=%USERPROFILE%/Media to set CONFIG_OUTPUT="F:\Media"
**** Question : Is this supposed to point to where my files I want processed are or where I want them to goto? ********
So after all of that I ran a Test Run in the Scripter in JDownloader2 and it came back with errors still.
The first picture is what I did in JDownloader2 including what my script looks like. I noticed it highlights somethings are they errors?
https://drive.google.com/file/d/1P98dvB ... sp=sharing
The next picture is what JDownloader gives me as my error and it seems like it is the same as before.
https://drive.google.com/file/d/1BFGiEP ... sp=sharing
I do want to get more advance with this later and I have been reading up on Filebot and AMC but I just want the basic for now.
Anymore thoughts, and again this is my first time trying this and using java to do it so I really do apologize for my ignorance.
Re: [JDownloader] Setup for Windows, Linux and Mac OS X
I think you need to copy & paste them into the UI. JD will store them in some file somewhere, but we don't need to care about that.
2.
Yes, the output option refers to the destination folder where files will end up. The input folder / file / name / label is passed in via command-line arguments 1, 2 and 3 so that's something JD will pass along to our cmd script via the JD event scripts. You don't need to worry about that.
3.
Didn't you already confirm that JD can make that call? Did you check where cmd.exe is actually located? Or did it work by just calling the *.bat file directly?
4.
Note that everything we're doing here has nothing to do with Java or FileBot specifically. We're just trying to get JD to call a command, could be any command.
Re: [JDownloader] Setup for Windows, Linux and Mac OS X
Remove this line:
Code: Select all
var script = JD_HOME + '/jdownloader-postprocess.sh'Code: Select all
var command = [script, path, name, label, 'PACKAGE_FINISHED']Code: Select all
var command = ['C:\\Windows\\System32\\cmd.exe', '-c', 'C:\\jdownloader-postprocess.cmd', path, name, label, 'PACKAGE_FINISHED']Re: [JDownloader] Setup for Windows, Linux and Mac OS X
Currently this is what it looks like:
Code: Select all
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 = ['C:\\Windows\\System32\\cmd.exe', '-c', 'C:\\jdownloader-postprocess.cmd', path, name, label, 'PACKAGE_FINISHED']
log(command)
log(callSync(command))
}Code: Select all
------------------------Thread: 3968:ScriptEnvironment.log-----------------------
--ID:3968TS:1548172736591-1/22/19 10:58:56 AM - [org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment(log)] -> [ "C:\\Windows\\System32\\cmd.exe", "-c", "C:\\jdownloader-postprocess.cmd", "C:\\Users\\Chris Chester\\AppData\\Local\\JDownloader 2.0", "Example FilePackage Name", "N/A", "PACKAGE_FINISHED" ]
--ID:3968TS:1548172739263-1/22/19 10:58:59 AM - [org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment(log)] -> Microsoft Windows [Version 10.0.17763.253]
(c) 2018 Microsoft Corporation. All rights reserved.1) Ok thats what I was thinking.
2) Ok that clears that up and what I was thinking in how it worked.
3) I thought I did confirm that JD makes the call but I could be wrong cmd.exe is located in C:\Windows\System32 which is where you are pointing it. As far as the jdownloader-postprocess.cmd file yes I did run it on its own from the command line to check to see if it ran correctly and it did before but not now. I get the following when I run it on its own:
Code: Select all
C:\>jdownloader-postprocess.cmd
Locking C:\Users\Chris Chester\AppData\Roaming\FileBot\logs\amc.log
Run script [fn:amc] at [Tue Jan 22 10:59:38 EST 2019]
Parameter: skipExtract = y
Parameter: unsorted = y
Parameter: music = y
Parameter: artwork = y
Parameter: excludeList = excludes.txt
Parameter: ut_dir =
Parameter: ut_kind = multi
Parameter: ut_title =
Parameter: ut_label =
Illegal usage: no input
Failure (°_°)Re: [JDownloader] Setup for Windows, Linux and Mac OS X
Code: Select all
------------------------Thread: 3968:ScriptEnvironment.log-----------------------
--ID:3968TS:1548172736591-1/22/19 10:58:56 AM - [org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment(log)] -> [ "C:\\Windows\\System32\\cmd.exe", "-c", "C:\\jdownloader-postprocess.cmd", "C:\\Users\\Chris Chester\\AppData\\Local\\JDownloader 2.0", "Example FilePackage Name", "N/A", "PACKAGE_FINISHED" ]
--ID:3968TS:1548172739263-1/22/19 10:58:59 AM - [org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment(log)] -> Microsoft Windows [Version 10.0.17763.253]
(c) 2018 Microsoft Corporation. All rights reserved.Code: Select all
--ID:2152TS:1548143061629-1/22/19 2:44:21 AM - [org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment(log)] -> Locking C:\Users\Chris Chester\AppData\Roaming\FileBot\logs\amc.log
Run script [fn:amc] at [Tue Jan 22 02:44:20 EST 2019]Maybe this is bad?
Code: Select all
var command = ['C:\\Windows\\System32\\cmd.exe', '-c', 'C:\\jdownloader-postprocess.cmd', path, name, label, 'PACKAGE_FINISHED']
Code: Select all
var command = ['C:\\jdownloader-postprocess.cmd', path, name, label, 'PACKAGE_FINISHED']
3.
If you call the cmd script with no arguments, i.e. no input, then this is the expected console output.
Re: [JDownloader] Setup for Windows, Linux and Mac OS X
In the previous log that showed that it was working it might have been when I ran the post processing command file on its own. I don't remember at this point. I was tring test test everything to see what worked to narrow down where the issue started.
I don't understand the issue and why it is not working.
If I bring up a run dialog in windows and type "cmd" and hit enter the command window opens but no matter which way I try it with the script it wont launch it like it did with "notepad".
Since the "postprocessing cmd file" was running correctly is there not another way to tell the script to just launch that file instead of trying to go through the command program?
Re: [JDownloader] Setup for Windows, Linux and Mac OS X
Code: Select all
var command = ['C:\\jdownloader-postprocess.cmd', path, name, label, 'PACKAGE_FINISHED']
log(command)
log(callSync(command))Re: [JDownloader] Setup for Windows, Linux and Mac OS X
On test run it came back with the error:
net.sourceforge.htmlunit.corejs.javascript.EcmaError: ReferenceError: "path" is not defined. (#1)
at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3629)
at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3613)
at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.notFoundError(ScriptRuntime.java:3683)
at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.name(ScriptRuntime.java:1690)
at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1622)
at script(:1)
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:254)
at org.jdownloader.extensions.eventscripter.ScriptThread.executeScipt(ScriptThread.java:148)
at org.jdownloader.extensions.eventscripter.ScriptThread.run(ScriptThread.java:128)
Re: [JDownloader] Setup for Windows, Linux and Mac OS X
Anyway, let's try this:
Code: Select all
var script = 'C:\\jdownloader-postprocess.cmd'
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))
}Re: [JDownloader] Setup for Windows, Linux and Mac OS X
Code: Select all
------------------------Thread: 4454:ScriptEnvironment.log-----------------------
--ID:4454TS:1548178299692-1/22/19 12:31:39 PM - [org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment(log)] -> [ "C:\\jdownloader-postprocess.cmd", "C:\\Users\\Chris Chester\\AppData\\Local\\JDownloader 2.0", "Example FilePackage Name", "N/A", "PACKAGE_FINISHED" ]
--ID:4454TS:1548178310151-1/22/19 12:31:50 PM - [org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment(log)] -> Locking C:\Users\Chris Chester\AppData\Roaming\FileBot\logs\amc.log
Run script [fn:amc] at [Tue Jan 22 12:31:45 EST 2019]
Parameter: skipExtract = y
Parameter: unsorted = y
Parameter: music = y
Parameter: artwork = y
Parameter: excludeList = excludes.txt
Parameter: ut_dir = C:\Users\Chris Chester\AppData\Local\JDownloader 2.0
Parameter: ut_kind = multi
Parameter: ut_title = Example FilePackage Name
Parameter: ut_label = N/ARe: [JDownloader] Setup for Windows, Linux and Mac OS X
Re: [JDownloader] Setup for Windows, Linux and Mac OS X
Re: [JDownloader] Setup for Windows, Linux and Mac OS X
Presumably, the event script is called, but the isReallyFinished() returns false for some reason. Maybe at lots of logging for all the variables & conditions will help you figure out why:JStrach wrote: 22 Jan 2019, 20:43 Hi, I created the events as well as the cmd file (running on Windows 10), but am having issues getting filebot to run. I've looked at the logs, and from what I can gather, the event script for running after the package finishes is actually set up to work fine. If I test run it from the edit dialog, it actually calls the cmd file, and filebot runs according to the filebot log. The issue seems to be that the event is never actually called once a package is finished. Does anyone know why this would be?
https://github.com/filebot/plugins/blob ... inished.js
Re: [JDownloader] Setup for Windows, Linux and Mac OS X
If that were the case, wouldn't there be a record of the event being called in the event scripter log? I don't see any instances of it being called after a package finishes, only when I perform a test run. Also, there are no logs for the archive extraction event, from test runs or real-world runs. Does it need to run first for the package finish run to be called properly? Should it be showing up in the event log?rednoah wrote: 22 Jan 2019, 22:06 Presumably, the event script is called, but the isReallyFinished() returns false for some reason. Maybe at lots of logging for all the variables & conditions will help you figure out why:
https://github.com/filebot/plugins/blob ... inished.js
Re: [JDownloader] Setup for Windows, Linux and Mac OS X
Code: Select all
log("Hello World")Re: [JDownloader] Setup for Windows, Linux and Mac OS X
Re: [JDownloader] Setup for Windows, Linux and Mac OS X
Re: [JDownloader] Setup for Windows, Linux and Mac OS X
The only thing these two event scripts are trying to do, is to just call filebot, either after download complete, or after extract complete, whichever makes sense, but not two times, and not zero times either.
If it's not working as expected, you'll just have to sprinkle in lots of log() statements, then check the log, and then figure out what's happening, and why it's doing or not doing things.
Re: [Anime] Convert Absolute to SxE numbers
I am interested as well but I can find only help for the windows version of filebot
I am runnning filebot node and would be curious to have the absolut to serial converter on my synology !!
I run the following format for animes:
Code: Select all
Anime/{n}/{episode.special ? 'Special' : 'Season '+s}/{n}.{episode.special ? 'S00E'+special.pad(2) : s00e00}.{t}Anime/JoJo's Bizarre Adventure (2012)/Season 1/JoJo's Bizarre Adventure (2012).S01E01.Dio the Destroyer.mkv
But I have to manually researche from Absolute to SxxExx on wikies quickly add just the SxxExx numbering and then run filebot node; painful
what would be he changes from above code to have both SxxExx and #xxx in the file name ?
in advance thank you for any support you can give me