rednoah wrote:Try adding cmd /c before your bat script.
running
Code: Select all
filebot -script fn:amc --log-file amc.log --conflict override -non-strict --filter "age < 170" --def "ut_dir=%F" "ut_kind=multi" "ut_title=%N" "ut_label=%L" "seriesFormat=D:/Shows/TV Shows/{n}/season {s.pad(2)}/{n.replaceTrailingBrackets()} - {s00e00} - {t.replaceAll(/[!?.]+$/).replaceAll(/[\`´‘’ʻ]/, /"'/") .lowerTrail().replacePart(', Part $1')}" "movieFormat=D:/Shows/Movies/{n} {[y]}/{n.replaceTrailingBrackets() replaceAll(/[!?.]+$/).replaceAll(/[\`´‘’ʻ]/, /"'/") lowerTrail()} [{y}]" "animeFormat=D:/Shows/Anime/{n}/season {s.pad(2)}/{n.replaceTrailingBrackets()} - {s00e00} - {t.replaceAll(/[!?.]+$/).replaceAll(/[\`´‘’ʻ]/, /"'/") .lowerTrail().replacePart(', Part $1')}" deleteAfterExtract=y clean=y --def exec="cmd /c C:\Users\timta\Dropbox\Public\Folders\Filebot\Groovy\callpowershell.bat"
produced
Code: Select all
Run script [fn:amc] at [Sun May 15 01:13:17 CDT 2016]
Parameter: ut_dir = C:\Users\timta\Desktop\QBT\The.Flash.2014.S02E21.720p.WEB-DL.DD5.1.H.264-VietHD.mkv
Parameter: ut_kind = multi
Parameter: ut_title = The.Flash.2014.S02E21.720p.WEB-DL.DD5.1.H.264-VietHD.mkv
Parameter: ut_label = tv-sonarr
Parameter: seriesFormat = D:/Shows/TV Shows/{n}/season {s.pad(2)}/{n.replaceTrailingBrackets()} - {s00e00} - {t.replaceAll(/[!?.]+$/).replaceAll(/[\`´‘’?]/, /'/) .lowerTrail().replacePart(', Part $1')}
Parameter: movieFormat = D:/Shows/Movies/{n} {[y]}/{n.replaceTrailingBrackets() replaceAll(/[!?.]+$/).replaceAll(/[\`´‘’?]/, /'/) lowerTrail()} [{y}]
Parameter: animeFormat = D:/Shows/Anime/{n}/season {s.pad(2)}/{n.replaceTrailingBrackets()} - {s00e00} - {t.replaceAll(/[!?.]+$/).replaceAll(/[\`´‘’?]/, /'/) .lowerTrail().replacePart(', Part $1')}
Parameter: deleteAfterExtract = y
Parameter: clean = y
Parameter: exec = cmd /c C:\Users\timta\Dropbox\Public\Folders\Filebot\Groovy\callpowershell.bat
Input: C:\Users\timta\Desktop\QBT\The.Flash.2014.S02E21.720p.WEB-DL.DD5.1.H.264-VietHD.mkv
Group: [tvs:the flash 2014] => [The.Flash.2014.S02E21.720p.WEB-DL.DD5.1.H.264-VietHD.mkv]
Rename episodes using [TheTVDB]
Auto-detected query: [The Flash 2014]
Fetching episode data for [The Flash (2014)]
Apply Filter: {age < 170}
Include [The Flash (2014) - 2x08 - Legends of Today (1)]
Include [The Flash (2014) - 2x09 - Running to Stand Still]
Include [The Flash (2014) - 2x10 - Potential Energy]
Include [The Flash (2014) - 2x11 - The Reverse-Flash Returns]
Include [The Flash (2014) - 2x12 - Fast Lane]
Include [The Flash (2014) - 2x13 - Welcome to Earth-2]
Include [The Flash (2014) - 2x14 - Escape from Earth-2]
Include [The Flash (2014) - 2x15 - King Shark]
Include [The Flash (2014) - 2x16 - Trajectory]
Include [The Flash (2014) - 2x17 - Flash Back]
Include [The Flash (2014) - 2x18 - Versus Zoom]
Include [The Flash (2014) - 2x19 - Back to Normal]
Include [The Flash (2014) - 2x20 - Rupture]
Include [The Flash (2014) - 2x21 - The Runaway Dinosaur]
Include [The Flash (2014) - 0xSpecial 1 - The Chronicles Of Cisco: Entry 0419 - Part 1]
Include [The Flash (2014) - 0xSpecial 2 - The Chronicles Of Cisco: Entry 0419 - Part 2]
Include [The Flash (2014) - 0xSpecial 3 - The Chronicles Of Cisco: Entry 0419 - Part 3]
Include [The Flash (2014) - 0xSpecial 4 - The Chronicles Of Cisco: Entry 0419 - Part 4]
[MOVE] Rename [C:\Users\timta\Desktop\QBT\The.Flash.2014.S02E21.720p.WEB-DL.DD5.1.H.264-VietHD.mkv] to [D:\Shows\TV Shows\The Flash (2014)\season 02\The Flash - S02E21 - The Runaway Dinosaur.mkv]
Processed 1 files
Execute: cmd /c C:\Users\timta\Dropbox\Public\Folders\Filebot\Groovy\callpowershell.bat
Done ヾ(@⌒ー⌒@)ノ
Still executed the bat file which should execute the powershell script (i've run the bat file by itself before and it executes the powershell just fine so I know the bat file works) yet still it didn't refresh the series on sonarr.
Moving the first " so it looks like --def exec=cmd /c "C:\Users\timta\Dropbox\Public\Folders\Filebot\Groovy\callpowershell.bat" produces just errors and the amc script doesn't completely run.
deleting the "" so its like --def exec=cmd /c C:\Users\timta\Dropbox\Public\Folders\Filebot\Groovy\callpowershell.bat does the same and produces an error and amc script doesn't completely run.
so I have to stick to --def exec="cmd /c C:\Users\timta\Dropbox\Public\Folders\Filebot\Groovy\callpowershell.bat" but yet it still doesn't work...
I'm so at a loss on getting this to work -.- and its getting really really aggravating... it feels like I have to stay on filebot 4.6.1 even though it makes me want to just kill my computer and toss it out a window because I don't want to stay on 4.6.1 and want to update to 4.7
--------------------------------------------------------------------------------------------------------
Well once again I am getting closer again it seems...
I searched a bit more for commands for sonarr and found a commands page on there wiki and two of them was RefreshSeries and RescanSeries, and they actually refresh and rescan when initiated through powershell with
Code: Select all
$url = "http://localhost:8989/api/command"
$json = "{ ""name"": ""RescanSeries"" }"
Write-Host "Publishing update $version ($branch) to: $url"
Invoke-RestMethod -Uri $url -Method Post -Body $json -Headers @{"X-Api-Key"="6e7bff2e25e24317924907b16e6b7eee"}
or
Code: Select all
$url = "http://localhost:8989/api/command"
$json = "{ ""name"": ""RefreshSeries"" }"
Write-Host "Publishing update $version ($branch) to: $url"
Invoke-RestMethod -Uri $url -Method Post -Body $json -Headers @{"X-Api-Key"="6e7bff2e25e24317924907b16e6b7eee"}
so I at least got that part figured out for the most part, the thing is though is that I don't need/want it to refresh/rescan every single show/series I have on sonarr I only need it to refresh/rescan the series that I have downloaded the episode for..
To do this I can run the parameter
Code: Select all
Parameters
Optional:
seriesId (int) - if not set all series will be refreshed and scanned
But I don't know where to put it at exactly in the powershell script, I tried putting it after the refresh/rescanseries thing in """" but it throws errors.. but I am at least getting a bit closer to being able to update filebot and keep sonarr..