Private GIT
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SickRage-1
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vlbox
SickRage-1
Commits
a5c89279
Commit
a5c89279
authored
9 years ago
by
supergonkas
Committed by
Dustyn Gibson
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Rewrite BTDigg & add better daily search
parent
e2c68bbf
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
sickbeard/providers/btdigg.py
+18
-9
18 additions, 9 deletions
sickbeard/providers/btdigg.py
with
18 additions
and
9 deletions
sickbeard/providers/btdigg.py
+
18
−
9
View file @
a5c89279
# Author: Jodi Jones <venom@gen-x.co.nz>
# URL: http://code.google.com/p/sickbeard/
#
#
Ported to s
ick
r
age
by: matigonkas
#
Author: Gonçalo <matigonkas@hotmail.com>
#
URL: https://github.com/S
ick
R
age
/SickRage
#
# This file is part of SickRage.
#
...
...
@@ -19,7 +19,7 @@
# along with Sick Beard. If not, see <http://www.gnu.org/licenses/>.
from
sickbeard.providers
import
generic
from
urllib
import
urlencode
from
sickbeard
import
logger
from
sickbeard
import
tvcache
...
...
@@ -32,10 +32,16 @@ class BTDIGGProvider(generic.TorrentProvider):
self
.
public
=
True
self
.
ratio
=
0
self
.
urls
=
{
'
url
'
:
u
'
https://btdigg.org/
'
,
'
api
'
:
u
'
https://api.btdigg.org/
'
}
'
api
'
:
u
'
https://api.btdigg.org/
api/private-341ada3245790954/s02
'
}
self
.
url
=
self
.
urls
[
'
url
'
]
self
.
search_params
=
{
'
q
'
:
''
,
'
order
'
:
'
1
'
,
'
p
'
:
1
,
}
self
.
cache
=
BTDiggCache
(
self
)
def
_doSearch
(
self
,
search_strings
,
search_mode
=
'
eponly
'
,
epcount
=
0
,
age
=
0
,
epObj
=
None
):
...
...
@@ -50,7 +56,10 @@ class BTDIGGProvider(generic.TorrentProvider):
if
mode
is
not
'
RSS
'
:
logger
.
log
(
u
"
Search string: %s
"
%
search_string
,
logger
.
DEBUG
)
searchURL
=
self
.
urls
[
'
api
'
]
+
"
api/private-341ada3245790954/s02?q=
"
+
search_string
+
"
&p=0&order=1
"
self
.
search_params
[
'
q
'
]
=
search_string
.
encode
(
'
utf-8
'
)
self
.
search_params
[
'
order
'
]
=
'
1
'
if
mode
is
not
'
RSS
'
else
'
2
'
searchURL
=
self
.
urls
[
'
api
'
]
+
'
?
'
+
urlencode
(
self
.
search_params
)
logger
.
log
(
u
"
Search URL: %s
"
%
searchURL
,
logger
.
DEBUG
)
jdata
=
self
.
getURL
(
searchURL
,
json
=
True
)
...
...
@@ -97,13 +106,13 @@ class BTDiggCache(tvcache.TVCache):
tvcache
.
TVCache
.
__init__
(
self
,
provider_obj
)
# Cache results for a
hour
,since BTDigg takes some time to crawl
self
.
minTime
=
6
0
# Cache results for a
30min
,since BTDigg takes some time to crawl
self
.
minTime
=
3
0
def
_getRSSData
(
self
):
# Use
x264
for RSS search since most results will use th
at
codec
and since the site doesnt have latest results search
search_params
=
{
'
RSS
'
:
[
'
x264
'
]}
# Use
this hacky way
for RSS search since most results will use th
is
codec
s
search_params
=
{
'
RSS
'
:
[
'
x264
'
,
'
x264.HDTV
'
,
'
720.HDTV.x264
'
]}
return
{
'
entries
'
:
self
.
provider
.
_doSearch
(
search_params
)}
provider
=
BTDIGGProvider
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment