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
93b785bb
Commit
93b785bb
authored
Nov 26, 2015
by
Dustyn Gibson
Browse files
Options
Downloads
Patches
Plain Diff
Try and fix
https://github.com/SickRage/sickrage-issues/issues/8
Added a log line to help debug if it doesnt work. Please test.
parent
2d58a29e
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
sickbeard/postProcessor.py
+8
-3
8 additions, 3 deletions
sickbeard/postProcessor.py
with
8 additions
and
3 deletions
sickbeard/postProcessor.py
+
8
−
3
View file @
93b785bb
...
@@ -486,7 +486,7 @@ class PostProcessor(object):
...
@@ -486,7 +486,7 @@ class PostProcessor(object):
# search the database for a possible match and return immediately if we find one
# search the database for a possible match and return immediately if we find one
myDB
=
db
.
DBConnection
()
myDB
=
db
.
DBConnection
()
for
curName
in
names
:
for
curName
in
names
:
search_name
=
re
.
sub
(
r
"
[\.\-
\
]
"
,
"
_
"
,
curName
)
search_name
=
re
.
sub
(
r
"
[\.\- ]
"
,
"
_
"
,
curName
)
sql_results
=
myDB
.
select
(
"
SELECT * FROM history WHERE resource LIKE ?
"
,
[
search_name
])
sql_results
=
myDB
.
select
(
"
SELECT * FROM history WHERE resource LIKE ?
"
,
[
search_name
])
if
len
(
sql_results
)
==
0
:
if
len
(
sql_results
)
==
0
:
...
@@ -504,7 +504,7 @@ class PostProcessor(object):
...
@@ -504,7 +504,7 @@ class PostProcessor(object):
self
.
in_history
=
True
self
.
in_history
=
True
self
.
version
=
version
self
.
version
=
version
to_return
=
(
show
,
season
,
[],
quality
,
version
)
to_return
=
(
str
(
show
)
,
season
,
[],
quality
,
version
)
self
.
_log
(
"
Found result in history:
"
+
str
(
to_return
),
logger
.
DEBUG
)
self
.
_log
(
"
Found result in history:
"
+
str
(
to_return
),
logger
.
DEBUG
)
return
to_return
return
to_return
...
@@ -853,6 +853,11 @@ class PostProcessor(object):
...
@@ -853,6 +853,11 @@ class PostProcessor(object):
return
True
return
True
_
,
old_ep_quality
=
common
.
Quality
.
splitCompositeStatus
(
ep_obj
.
status
)
_
,
old_ep_quality
=
common
.
Quality
.
splitCompositeStatus
(
ep_obj
.
status
)
self
.
_log
(
u
"
old_ep_quality = %s, new_ep_quality %s
"
%
(
common
.
Quality
.
qualityStrings
[
old_ep_quality
],
common
.
Quality
.
qualityStrings
[
new_ep_quality
]),
logger
.
DEBUG
)
if
old_ep_quality
==
common
.
Quality
.
UNKNOWN
and
new_ep_quality
!=
common
.
Quality
.
UNKNOWN
:
self
.
_log
(
u
"
Old episode has an unknown quality, so any known quality is better
"
,
logger
.
DEBUG
)
return
True
# if SR downloaded this on purpose we likely have a priority download
# if SR downloaded this on purpose we likely have a priority download
if
self
.
in_history
or
ep_obj
.
status
in
common
.
Quality
.
SNATCHED
+
common
.
Quality
.
SNATCHED_PROPER
+
common
.
Quality
.
SNATCHED_BEST
:
if
self
.
in_history
or
ep_obj
.
status
in
common
.
Quality
.
SNATCHED
+
common
.
Quality
.
SNATCHED_PROPER
+
common
.
Quality
.
SNATCHED_BEST
:
...
@@ -933,7 +938,7 @@ class PostProcessor(object):
...
@@ -933,7 +938,7 @@ class PostProcessor(object):
else
:
else
:
new_ep_quality
=
self
.
_get_quality
(
ep_obj
)
new_ep_quality
=
self
.
_get_quality
(
ep_obj
)
logger
.
log
(
u
"
Quality of the episode we
'
re processing: %s
"
%
new_ep_quality
,
logger
.
DEBUG
)
logger
.
log
(
u
"
Quality of the episode we
'
re processing: %s
"
%
common
.
Quality
.
qualityStrings
[
new_ep_quality
]
,
logger
.
DEBUG
)
# see if this is a priority download (is it snatched, in history, PROPER, or BEST)
# see if this is a priority download (is it snatched, in history, PROPER, or BEST)
priority_download
=
self
.
_is_priority
(
ep_obj
,
new_ep_quality
)
priority_download
=
self
.
_is_priority
(
ep_obj
,
new_ep_quality
)
...
...
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