VoxCommando Forum

VoxNastics (User Guides and Mods) => Tips and Tricks => Topic started by: Hellow on August 20, 2013, 07:30:00 AM

Title: Controlling sab, sb cp.
Post by: Hellow on August 20, 2013, 07:30:00 AM
I wondering if any have tried to control  sick beard from vc? I can't be the only one that have thought about it :D

I was think something like: sickbeard add new show homeland as wanted

If no one have tried ill take a take a look.
Title: Controlling sab, sb cp.
Post by: jitterjames on August 20, 2013, 09:26:21 AM
I don't use sickbeard but looking at their api it should be relatively easy.

You can search for a show using the scrape command like this: http://localhost:8081/api/123YOURAPIKEY456/?cmd=sb.searchtvdb&name=homeland&lang=en

You will get back multiple shows sometimes but assuming you are feeling lucky you can try to use this command.  You will need to adjust the IP and API key and the location where downloads are stored according to your setup.

<?xml version="1.0" encoding="utf-16"?>
<command id="415" name="sick beard add new show {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
 <action>
   <cmdType>OSD.SetFontSize</cmdType>
   <cmdString>12</cmdString>
   <cmdRepeat>1</cmdRepeat>
 </action>
 <action>
   <cmdType>Scrape</cmdType>
   <cmdString>http://localhost:8081/api/123YOURAPIKEY456/?cmd=sb.searchtvdb&amp;name={1}&amp;lang=en</cmdString>
   <cmdRepeat>1</cmdRepeat>
 </action>
 <action>
   <cmdType>Results.RegEx</cmdType>
   <cmdString>tvdbid...(.*)</cmdString>
   <cmdRepeat>1</cmdRepeat>
 </action>
 <action>
   <cmdType>OSD.ShowText</cmdType>
   <cmdString>{Match.1}</cmdString>
   <cmdRepeat>1</cmdRepeat>
 </action>
 <action>
   <cmdType>Scrape</cmdType>
   <cmdString>http://localhost:8081/api/123YOURAPIKEY456/?cmd=show.addnew&amp;tvdbid={Match.1}&amp;location=F:\sickbeard&amp;status=archived&amp;lang=en</cmdString>
   <cmdRepeat>1</cmdRepeat>
 </action>
 <action>
   <cmdType>Results.RegEx</cmdType>
   <cmdString>message.*\"(.*)\"</cmdString>
   <cmdRepeat>1</cmdRepeat>
 </action>
 <action>
   <cmdType>OSD.AddText</cmdType>
   <cmdString>{Match.1}</cmdString>
   <cmdRepeat>1</cmdRepeat>
 </action>
 <phrase>sick beard add new show {1}</phrase>
 <payloadDictation>payloadDictation: Regular</payloadDictation>
</command>


Obviously more can be done with this code (checking for no show found or letting you select from multiple shows found), but it should get you started.
Title: Re: Controlling sab, sb cp.
Post by: Hellow on August 20, 2013, 12:51:13 PM
Thanks! I needed the XML. Ill see if i cant make a Python script with some logic to handle the rest.
Title: Re: Controlling sab, sb cp.
Post by: IKROWNI on November 05, 2013, 05:33:19 PM
Quote from: Hellow on August 20, 2013, 07:30:00 AM
I wondering if any have tried to control  sick beard from vc? I can't be the only one that have thought about it :D

I was think something like: sickbeard add new show homeland as wanted

If no one have tried ill take a take a look.

This sounds awesome.
Title: Re: Controlling sab, sb cp.
Post by: Hellow on November 05, 2013, 08:59:33 PM
Qbittorrent and sabnzbd is like 90% done. They have basic functions like, set speed, pause, remove, what seeding/downloaded failed etc