Author Topic: Modified categoryID() function in api for sickbeard/nzbdrone compatibility  (Read 5985 times)

Offline predator314

  • Junior Indexer
  • **
  • Posts: 5
  • Helpful: +1/-0
I modified the categoryID() function in api.php so that the Web-DL category will be included if HD was specified in cat.

This would be for people that want to maintain the Web-DL category, but also allow sickbeard and nzbdrone to find Web-DL releases (the both only search SD and HD categories).  I'm not sure if the category IDs are universal/static, so some cleanup may be required by the powers that be, but here's my minor contribution so far.

Code: [Select]
 * Verify cat parameter.
 * @return array
function categoryID()
        $categoryID[] = -1;
        if (isset($_GET['cat'])) {
                $cat = $_GET['cat'];
                // Append Web-DL category code if HD present for Sickbeard/NZBDrone compatibility
                if ((strpos($cat,'5040') !== false) && (strpos($cat,'5010') === false)) {
                        $cat = $cat.',5010';
                $categoryID = explode(',', $cat);
        return $categoryID;