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
edf9f316
Commit
edf9f316
authored
Dec 1, 2015
by
miigotu
Browse files
Options
Downloads
Plain Diff
Merge pull request #338 from CristianBB/develop
Newpct: some improvements
parents
7eaa6c5f
cfaa8cdd
Loading
Loading
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
sickbeard/providers/newpct.py
+20
-18
20 additions, 18 deletions
sickbeard/providers/newpct.py
with
20 additions
and
18 deletions
sickbeard/providers/newpct.py
+
20
−
18
View file @
edf9f316
...
@@ -51,19 +51,19 @@ class newpctProvider(generic.TorrentProvider):
...
@@ -51,19 +51,19 @@ class newpctProvider(generic.TorrentProvider):
"""
"""
Search query:
Search query:
http://www.newpct.com/index.php?l=doSearch&q=fringe&category_=
767
&idioma_=1&bus_de_=All
http://www.newpct.com/index.php?l=doSearch&q=fringe&category_=
All
&idioma_=1&bus_de_=All
q => Show name
q => Show name
category_ = Category
"
Shows
"
(767)
category_ = Category
"
Shows
"
(767)
idioma_ = Language Spanish (1)
idioma_ = Language Spanish (1)
bus_de_ = Date from (All,
Semana
)
bus_de_ = Date from (All,
hoy
)
"""
"""
self
.
search_params
=
{
self
.
search_params
=
{
'
l
'
:
'
doSearch
'
,
'
l
'
:
'
doSearch
'
,
'
q
'
:
''
,
'
q
'
:
''
,
'
category_
'
:
767
,
'
category_
'
:
'
All
'
,
'
idioma_
'
:
1
,
'
idioma_
'
:
1
,
'
bus_de_
'
:
'
All
'
'
bus_de_
'
:
'
All
'
}
}
...
@@ -80,7 +80,7 @@ class newpctProvider(generic.TorrentProvider):
...
@@ -80,7 +80,7 @@ class newpctProvider(generic.TorrentProvider):
logger
.
log
(
u
"
Search Mode: %s
"
%
mode
,
logger
.
DEBUG
)
logger
.
log
(
u
"
Search Mode: %s
"
%
mode
,
logger
.
DEBUG
)
# Only search if user conditions are true
# Only search if user conditions are true
if
self
.
onlyspasearch
and
lang_info
!=
'
es
'
and
mode
is
not
'
RSS
'
:
if
self
.
onlyspasearch
and
lang_info
!=
'
es
'
and
mode
!=
'
RSS
'
:
logger
.
log
(
u
"
Show info is not spanish, skipping provider search
"
,
logger
.
DEBUG
)
logger
.
log
(
u
"
Show info is not spanish, skipping provider search
"
,
logger
.
DEBUG
)
continue
continue
...
@@ -88,8 +88,8 @@ class newpctProvider(generic.TorrentProvider):
...
@@ -88,8 +88,8 @@ class newpctProvider(generic.TorrentProvider):
if
mode
!=
'
RSS
'
:
if
mode
!=
'
RSS
'
:
logger
.
log
(
u
"
Search string: %s
"
%
search_string
,
logger
.
DEBUG
)
logger
.
log
(
u
"
Search string: %s
"
%
search_string
,
logger
.
DEBUG
)
self
.
search_params
[
'
q
'
]
=
search_string
.
strip
()
if
mode
is
not
'
RSS
'
else
''
self
.
search_params
[
'
q
'
]
=
search_string
.
strip
()
if
mode
!=
'
RSS
'
else
''
self
.
search_params
[
'
bus_de_
'
]
=
'
All
'
if
mode
is
not
'
RSS
'
else
'
semana
'
self
.
search_params
[
'
bus_de_
'
]
=
'
All
'
if
mode
!=
'
RSS
'
else
'
hoy
'
searchURL
=
self
.
urls
[
'
search
'
]
+
'
?
'
+
urllib
.
parse
.
urlencode
(
self
.
search_params
)
searchURL
=
self
.
urls
[
'
search
'
]
+
'
?
'
+
urllib
.
parse
.
urlencode
(
self
.
search_params
)
logger
.
log
(
u
"
Search URL: %s
"
%
searchURL
,
logger
.
DEBUG
)
logger
.
log
(
u
"
Search URL: %s
"
%
searchURL
,
logger
.
DEBUG
)
...
@@ -220,21 +220,23 @@ class newpctProvider(generic.TorrentProvider):
...
@@ -220,21 +220,23 @@ class newpctProvider(generic.TorrentProvider):
title
=
title
[
22
:]
title
=
title
[
22
:]
# Quality - Use re module to avoid case sensitive problems with replace
# Quality - Use re module to avoid case sensitive problems with replace
title
=
re
.
sub
(
'
\[HDTV 1080p.*]
'
,
'
1080p HDTV x264
'
,
title
,
flags
=
re
.
IGNORECASE
)
title
=
re
.
sub
(
'
\[HDTV 1080p[^\[]*]
'
,
'
1080p HDTV x264
'
,
title
,
flags
=
re
.
IGNORECASE
)
title
=
re
.
sub
(
'
\[HDTV 720p.*]
'
,
'
720p HDTV x264
'
,
title
,
flags
=
re
.
IGNORECASE
)
title
=
re
.
sub
(
'
\[HDTV 720p[^\[]*]
'
,
'
720p HDTV x264
'
,
title
,
flags
=
re
.
IGNORECASE
)
title
=
re
.
sub
(
'
\[ALTA DEFINICION 720p[^\[]*]
'
,
'
720p HDTV x264
'
,
title
,
flags
=
re
.
IGNORECASE
)
title
=
re
.
sub
(
'
\[HDTV]
'
,
'
HDTV x264
'
,
title
,
flags
=
re
.
IGNORECASE
)
title
=
re
.
sub
(
'
\[HDTV]
'
,
'
HDTV x264
'
,
title
,
flags
=
re
.
IGNORECASE
)
title
=
re
.
sub
(
'
\[DVD
.
*]
'
,
'
DVDrip x264
'
,
title
,
flags
=
re
.
IGNORECASE
)
title
=
re
.
sub
(
'
\[DVD
[^\[]
*]
'
,
'
DVDrip x264
'
,
title
,
flags
=
re
.
IGNORECASE
)
title
=
re
.
sub
(
'
\[BluRay 1080p
.
*]
'
,
'
1080p BlueRay x264
'
,
title
,
flags
=
re
.
IGNORECASE
)
title
=
re
.
sub
(
'
\[BluRay 1080p
[^\[]
*]
'
,
'
1080p BlueRay x264
'
,
title
,
flags
=
re
.
IGNORECASE
)
title
=
re
.
sub
(
'
\[BluRay MicroHD
.
*]
'
,
'
1080p BlueRay x264
'
,
title
,
flags
=
re
.
IGNORECASE
)
title
=
re
.
sub
(
'
\[BluRay MicroHD
[^\[]
*]
'
,
'
1080p BlueRay x264
'
,
title
,
flags
=
re
.
IGNORECASE
)
title
=
re
.
sub
(
'
\[MicroHD 1080p
.
*]
'
,
'
1080p BlueRay x264
'
,
title
,
flags
=
re
.
IGNORECASE
)
title
=
re
.
sub
(
'
\[MicroHD 1080p
[^\[]
*]
'
,
'
1080p BlueRay x264
'
,
title
,
flags
=
re
.
IGNORECASE
)
title
=
re
.
sub
(
'
\[BLuRay
.
*]
'
,
'
720p BlueRay x264
'
,
title
,
flags
=
re
.
IGNORECASE
)
title
=
re
.
sub
(
'
\[BLuRay
[^\[]
*]
'
,
'
720p BlueRay x264
'
,
title
,
flags
=
re
.
IGNORECASE
)
title
=
re
.
sub
(
'
\[BRrip
.
*]
'
,
'
720p BlueRay x264
'
,
title
,
flags
=
re
.
IGNORECASE
)
title
=
re
.
sub
(
'
\[BRrip
[^\[]
*]
'
,
'
720p BlueRay x264
'
,
title
,
flags
=
re
.
IGNORECASE
)
title
=
re
.
sub
(
'
\[BDrip
.
*]
'
,
'
720p BlueRay x264
'
,
title
,
flags
=
re
.
IGNORECASE
)
title
=
re
.
sub
(
'
\[BDrip
[^\[]
*]
'
,
'
720p BlueRay x264
'
,
title
,
flags
=
re
.
IGNORECASE
)
#Language
#Language
title
=
re
.
sub
(
'
\[Spanish.*]
'
,
'
SPANISH AUDIO
'
,
title
,
flags
=
re
.
IGNORECASE
)
title
=
re
.
sub
(
'
\[Spanish[^\[]*]
'
,
'
SPANISH AUDIO
'
,
title
,
flags
=
re
.
IGNORECASE
)
title
=
re
.
sub
(
ur
'
\[Español.*]
'
,
'
SPANISH AUDIO
'
,
title
,
flags
=
re
.
IGNORECASE
)
title
=
re
.
sub
(
'
\[Castellano[^\[]*]
'
,
'
SPANISH AUDIO
'
,
title
,
flags
=
re
.
IGNORECASE
)
title
=
re
.
sub
(
u
'
\[AC3 5\.1 Español.*]
'
,
'
SPANISH AUDIO
'
,
title
,
flags
=
re
.
IGNORECASE
)
title
=
re
.
sub
(
ur
'
\[Español[^\[]*]
'
,
'
SPANISH AUDIO
'
,
title
,
flags
=
re
.
IGNORECASE
)
title
=
re
.
sub
(
u
'
\[AC3 5\.1 Español[^\[]*]
'
,
'
SPANISH AUDIO
'
,
title
,
flags
=
re
.
IGNORECASE
)
title
+=
'
-NEWPCT
'
title
+=
'
-NEWPCT
'
...
...
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