I have to say you jinxed me,
I tested my command several times and no problems until you mentioned a problem and for some reason my command started to cycle 20 times every time, I tried to trouble shoot and had to extend the amount of lines shown in the VC window, and after doing that I couldn't for the life of me reproduce the problem, so I took a break and looked at your command to look at the regex and I noticed that you are looking for indexerid, but when I look at the output from the snatched history I don't have an indexerid only a tvdbid listed, here is part of the output
"data": [
{
"date": "2015-12-29 21:51",
"episode": 13,
"provider": "Sick Beard Index",
"quality": "SD TV",
"resource": "Marvels.Daredevil.S01E13.WEBRiP.x264-QCF",
"resource_path": "",
"season": 1,
"show_name": "Marvel's Daredevil",
"source": "nzb",
"status": "Snatched",
"tvdbid": 281662
},
I like your regex idea better (I'll have to study some more regex guides) so with the output that I get from sickbeard this is the Regex pattern that works for me:
"show_name":\s"(.*?)" [^\{]*? "tvdbid":\s(\d+)
I like how you stop it from processing the same shows more then once, so I added in a fail safe that will notify with TTS and email if the Sickbeard sever isn't reachable as well,
so here's the command that I ended up with:
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.0.9-->
<commandGroup open="True" name="Sickbeard Check and Compare" enabled="True" prefix="" priority="0" requiredProcess="" description="">
<command id="392" name="Sickbeard Snatched and compare" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>Results.SetVar</cmdType>
<params>
<param>SBIP</param>
<param>Put.SB.IP.Here:PORT</param>
</params>
<cmdRepeat>0</cmdRepeat>
</action>
<action>
<cmdType>Results.SetVar</cmdType>
<params>
<param>SBKEY</param>
<param>API KEY HERE</param>
</params>
<cmdRepeat>0</cmdRepeat>
</action>
<action>
<cmdType>Scrape</cmdType>
<params>
<param>http://{Var.SBIP}/api/{Var.SBKEY}/?cmd=history&type=snatched&limit=10</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Results.RegEx</cmdType>
<params>
<param>"show_name":\s"(.*?)" [^\{]*? "tvdbid":\s(\d+)</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<if ifBlockDisabled="False" ifNot="False">
<ifType>LastActionSuccess</ifType>
<ifParams>&&</ifParams>
<then />
<else>
<action>
<cmdType>TTS.SpeakSync</cmdType>
<params>
<param>your Sick beard server was unreachable</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>SMTP.Send</cmdType>
<params>
<param>YOUR_EMAIL_HERE</param>
<param>Sick Beard update</param>
<param>SickBeard server was unreachable:<br><br><a href="http://{Var.SBIP}/home/">Sickbeard server</a> </param>
<param />
<param>True</param>
</params>
<cmdRepeat>0</cmdRepeat>
</action>
<action>
<cmdType>VC.StopMacro</cmdType>
<params />
<cmdRepeat>1</cmdRepeat>
</action>
</else>
</if>
<action>
<cmdType>Results.SetVar</cmdType>
<params>
<param>TVname{i}</param>
<param>{Match.{i}.1}</param>
</params>
<cmdRepeat>{#M}</cmdRepeat>
</action>
<action>
<cmdType>Results.SetVar</cmdType>
<params>
<param>TVid{i}</param>
<param>{Match.{i}.2}</param>
</params>
<cmdRepeat>{#M}</cmdRepeat>
</action>
<action>
<cmdType>Results.SetVar</cmdType>
<params>
<param>Snatched</param>
<param><![CDATA[ ]]></param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<loop>
<loopParams>
<from>1</from>
<to>10</to>
</loopParams>
<loopActions>
<action>
<cmdType>Scrape</cmdType>
<params>
<param>http://{Var.SBIP}/api/{Var.SBKEY}/?cmd=show.stats&tvdbid={var.TVid{j}}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Results.RegExSingle</cmdType>
<params>
<param>snatched":\s{.*?"total":\s(\d+).*?}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>VC.TriggerEvent</cmdType>
<params>
<param>SB.Snatched</param>
<param>{Var.TVname{j}}</param>
<param>{Match.1.1}</param>
<param>{Var.TVid{j}}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
</loopActions>
</loop>
<if ifBlockDisabled="False" ifNot="False">
<ifType>(A)==(B)</ifType>
<ifParams>{Var.Snatched}&& </ifParams>
<then>
<action>
<cmdType>TTS.SpeakSync</cmdType>
<params>
<param>it appears that all episodes were downloaded correctly</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
</then>
<else>
<action>
<cmdType>TTS.Speak</cmdType>
<params>
<param>it appears that you have some failed downloads, I emailed you a list of shows that contain snatched episodes</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>SMTP.Send</cmdType>
<params>
<param>YOUR_EMAIL_HERE</param>
<param>Sick Beard update</param>
<param>list of failed episodes:<br>{Var.Snatched}</param>
<param />
<param>True</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
</else>
</if>
<action>
<cmdType>Results.SetVar</cmdType>
<params>
<param>SbIDProcessed</param>
<param><![CDATA[ ]]></param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
</command>
<command id="473" name="compare" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<if ifBlockDisabled="False" ifNot="False">
<ifType>(A)Contains(B)</ifType>
<ifParams>{Var.SbIDProcessed}&&{3}</ifParams>
<then>
<action>
<cmdType>VC.StopMacro</cmdType>
<params />
<cmdRepeat>1</cmdRepeat>
</action>
</then>
<else>
<action>
<cmdType>Results.SetVar</cmdType>
<params>
<param>SbIDProcessed</param>
<param>{Var.SbIDProcessed},{3}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
</else>
</if>
<if ifBlockDisabled="False" ifNot="False">
<ifType>(A)<(B)</ifType>
<ifParams>0&&{2}</ifParams>
<then>
<action>
<cmdType>Results.SetVar</cmdType>
<params>
<param>Snatched</param>
<param>{Var.Snatched} <br><br><a href="http://{Var.SBIP}/home/displayShow?show={3}">{1}</a> </param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
</then>
<else />
</if>
<event>SB.Snatched</event>
</command>
</commandGroup>
In the first command you will need to add your Sickbeard IP and Port number to the first action and then add your API key to the second action, there are two different email actions as well that you will need to add your email to, then you will need to enable those actions by changing the 0 to a 1 on the right side of each action that is disabled