From 8c77e6259af33b979f7309664a1de69e40592391 Mon Sep 17 00:00:00 2001
From: supergonkas <duramato@users.noreply.github.com>
Date: Wed, 18 Nov 2015 00:31:27 +0000
Subject: [PATCH] Add RSS to BTDigg

---
 sickbeard/providers/btdigg.py | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/sickbeard/providers/btdigg.py b/sickbeard/providers/btdigg.py
index 70ee530ed..798b3614f 100644
--- a/sickbeard/providers/btdigg.py
+++ b/sickbeard/providers/btdigg.py
@@ -97,12 +97,13 @@ class BTDiggCache(tvcache.TVCache):
 
         tvcache.TVCache.__init__(self, provider_obj)
 
-        # set this 0 to suppress log line, since we aren't updating it anyways
-        self.minTime = 0
+        # Cache results for a hour ,since BTDigg takes some time to crawl
+        self.minTime = 60
 
     def _getRSSData(self):
-        # no rss for btdigg, can't search with empty string
-        # newest results are always > 1 day since added anyways
-        return {'entries': {}}
+
+        # Use x264 for RSS search since most results will use that codec and since the site doesnt have latest results search
+        search_params = {'RSS': ['x264']}
+        return {'entries': self.provider._doSearch(search_params)}
 
 provider = BTDIGGProvider()
-- 
GitLab