I noticed in the past 2-3 days now that any exec commands I produce through filebot never run, even though when looking in the filebot logs it said it executes it and no errors are produced at all. So I went in digging today running my script a different way (running through cmd with output going to a text file so I can grab the error) to get the full output of my whole command to see what could be the issue, and noticed that when it hits the execute part it throws an error and just continues on with the rest of the normal filebot command.
The error that it is outputting:
Code: Select all
& : The term 'filebot -script
C:\Users\JourneyOver\Dropbox/Public/Filebot/Update_Sonarr_Radarr.groovy --def type=Episode
id=75978' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:3
+ & @'
+ ~~
+ CategoryInfo : ObjectNotFound: (filebot -script...pisode id=75978:String) [], Comma
ndNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
As you notice it for some reason is not calling the exec command correctly and it's throwing an error that the term is not recognized which is weird as normal filebot commands run just perfectly and even running the command that I'm trying to have filebot execute as well manually it works just fine. It just doesn't run when the execute command is run through filebot through the exec stuff.
I am posting below my script, the Update_Sonarr_Radarr.groovy, the normal filebot log, and the log that I had gotten from outputting the full command into a text file with the error message.
Script (I had to post it on pastebin because everytime I tried to post it, the forums always threw an error message...):
https://pastebin.com/3RfLfvPn
Update_Sonarr_Radarr.groovy:
Code: Select all
// TVDB/TMDB ID
def id = id as int
// Video Type
def type = type
// Sonarr API Configuration
if (type =~ /Episode/) {
def url = new URL('http://localhost:8989')
def header = ['X-Api-Key': '']
def sonarrSeriesId = new JsonSlurper()
.parseText(new URL(url, '/sonarr/api/series')
.get(header)
.text)
.find {
it.tvdbId == id
}.id
println new URL(url, '/sonarr/api/command').post(
JsonOutput.toJson(
[name: 'rescanSeries', seriesId: sonarrSeriesId]
).getBytes('UTF-8'),
'application/json',
header
).text
}
// Radarr API Configuration
if (type =~ /Movie/) {
def url = new URL('http://localhost:7878')
def header = ['X-Api-Key': '']
def radarrMovieId = new JsonSlurper()
.parseText(new URL(url, '/radarr/api/v3/movie')
.get(header)
.text)
.find {
it.tmdbId == id
}.id
println new URL(url, '/radarr/api/v3/command').post(
JsonOutput.toJson(
[name: 'rescanMovie', movieId: radarrMovieId]
).getBytes('UTF-8'),
'application/json',
header
).text
}
https://pastebin.com/qakcFtdF
log with error message in it (and again had to pastebin because of forum errors, plus it's super long..):
https://pastebin.com/6NxAib3x
out of everything though the only relevant part of it all is just the error message which I posted above and I will post again below with the execute part included:
Code: Select all
Execute: filebot -script C:\Users\JourneyOver\Dropbox/Public/Filebot/Update_Sonarr_Radarr.groovy --def type=Episode id=75978
& : The term 'filebot -script
C:\Users\JourneyOver\Dropbox/Public/Filebot/Update_Sonarr_Radarr.groovy --def type=Episode
id=75978' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:3
+ & @'
+ ~~
+ CategoryInfo : ObjectNotFound: (filebot -script...pisode id=75978:String) [], Comma
ndNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
and here is the relevant sysinfo:
Code: Select all
FileBot 4.9.2 (r8060)
JNA Native: 6.1.0
MediaInfo: 20.08
7-Zip-JBinding: 16.02
Chromaprint: 1.5.0
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2020-10-11 (r675)
Groovy: 3.0.6
JRE: OpenJDK Runtime Environment 15
JVM: 64-bit OpenJDK 64-Bit Server VM
CPU/MEM: 16 Core / 4.3 GB Max Memory / 84 MB Used Memory
OS: Windows 10 (amd64)
HW: MSYS_NT-10.0-19041 DESKTOP-CAR0BHN 3.1.6-340.x86_64 2020-07-09 14:33 UTC x86_64 Msys
STORAGE: NTFS [Alpha] @ 626 GB | NTFS [Beta] @ 691 GB | NTFS [Gamma] @ 398 GB | NTFS [Delta] @ 908 GB | NTFS [Epsilon] @ 130 GB | FAT32 [KINGSTON] @ 7 GB | NTFS [Zeta] @ 1.3 TB
Package: APPX
License: Microsoft Store License
Done ?(?????)?
Edit: So it seems like if I just put in filebot to execute without the
Code: Select all
-script blahblahblah
Code: Select all
filebot -script
Edit2: also should mention that I have already tried uninstalling and reinstalling filebot.
Edit3: seems like even having something like
Code: Select all
exec=powershell C:/Users/JourneyOver/Dropbox/Public/Filebot/test.ps1 type={type} id={id}
Code: Select all
exec=C:/Users/JourneyOver/Dropbox/Public/Filebot/test.ps1 type={type} id={id}
which explains why things like
Code: Select all
filebot -script fn:amc --output "D:/Media" --log-file "C:\Users\JourneyOver\Dropbox\Public\Filebot\logs\filebot-amc.log" --action move --conflict override -non-strict C:/Users/JourneyOver/Desktop/QBT --def "seriesFormat=/TV Shows/{N}/Season {S.pad(2)}/{N.replaceTrailingBrackets()} - {episode.special ? 'S00E'+special.pad(2) : S00E00} - {T.replacePart(', Part $1')}" "exec=echo type={type} id={id}"
Edit4: so it looks to be an issue with exec trying to call something that has a space in the command.. if it's something like
Code: Select all
"exec=path/to/whatever.extension"
Code: Select all
filebot
Code: Select all
"exec=path/to/whatever.extension type={type}"
Code: Select all
filebot -script fn:sysinfo