Author Topic: Controlling sab, sb cp.  (Read 2465 times)

0 Members and 1 Guest are viewing this topic.

Hellow

  • Contributor
  • ***
  • Posts: 50
  • Karma: 0
    • View Profile
Controlling sab, sb cp.
« 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.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Controlling sab, sb cp.
« Reply #1 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:
Code: [Select]
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.

Code: [Select]
<?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.
« Last Edit: August 20, 2013, 10:34:34 AM by jitterjames »

Hellow

  • Contributor
  • ***
  • Posts: 50
  • Karma: 0
    • View Profile
Re: Controlling sab, sb cp.
« Reply #2 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.

IKROWNI

  • $upporter
  • Sr. Member
  • *****
  • Posts: 146
  • Karma: 2
    • View Profile
Re: Controlling sab, sb cp.
« Reply #3 on: November 05, 2013, 05:33:19 PM »
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.

Hellow

  • Contributor
  • ***
  • Posts: 50
  • Karma: 0
    • View Profile
Re: Controlling sab, sb cp.
« Reply #4 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