Private GIT
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SickRage
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
Commits
af7bbac7
Commit
af7bbac7
authored
Jun 11, 2015
by
Dustyn Gibson
Browse files
Options
Downloads
Patches
Plain Diff
Log regex mode only on error, disable unnecessary pp messages
parent
6b816adf
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
sickbeard/name_parser/parser.py
+5
-5
5 additions, 5 deletions
sickbeard/name_parser/parser.py
sickbeard/processTV.py
+3
-6
3 additions, 6 deletions
sickbeard/processTV.py
with
8 additions
and
11 deletions
sickbeard/name_parser/parser.py
+
5
−
5
View file @
af7bbac7
...
@@ -78,13 +78,13 @@ class NameParser(object):
...
@@ -78,13 +78,13 @@ class NameParser(object):
def
_compile_regexes
(
self
,
regexMode
):
def
_compile_regexes
(
self
,
regexMode
):
if
regexMode
==
self
.
ANIME_REGEX
:
if
regexMode
==
self
.
ANIME_REGEX
:
logger
.
log
(
u
"
Using ANIME regexs
"
,
logger
.
DEBUG
)
dbg_str
=
u
"
ANIME
"
uncompiled_regex
=
[
regexes
.
anime_regexes
,
regexes
.
normal_regexes
]
uncompiled_regex
=
[
regexes
.
anime_regexes
,
regexes
.
normal_regexes
]
elif
regexMode
==
self
.
NORMAL_REGEX
:
elif
regexMode
==
self
.
NORMAL_REGEX
:
logger
.
log
(
u
"
Using NORMAL regexs
"
,
logger
.
DEBUG
)
dbg_str
=
u
"
NORMAL
"
uncompiled_regex
=
[
regexes
.
normal_regexes
]
uncompiled_regex
=
[
regexes
.
normal_regexes
]
else
:
else
:
logger
.
log
(
u
"
Using ALL regexes
"
,
logger
.
DEBUG
)
dbg_str
=
u
"
ALL
"
uncompiled_regex
=
[
regexes
.
normal_regexes
,
regexes
.
anime_regexes
]
uncompiled_regex
=
[
regexes
.
normal_regexes
,
regexes
.
anime_regexes
]
self
.
compiled_regexes
=
[]
self
.
compiled_regexes
=
[]
...
@@ -93,7 +93,7 @@ class NameParser(object):
...
@@ -93,7 +93,7 @@ class NameParser(object):
try
:
try
:
cur_regex
=
re
.
compile
(
cur_pattern
,
re
.
VERBOSE
|
re
.
IGNORECASE
)
cur_regex
=
re
.
compile
(
cur_pattern
,
re
.
VERBOSE
|
re
.
IGNORECASE
)
except
re
.
error
,
errormsg
:
except
re
.
error
,
errormsg
:
logger
.
log
(
u
"
WARNING: Invalid episode_pattern, %s. %s
"
%
(
errormsg
,
cur_pattern
))
logger
.
log
(
u
"
WARNING: Invalid episode_pattern
using %s regexs
, %s. %s
"
%
(
dbg_str
,
errormsg
,
cur_pattern
))
else
:
else
:
self
.
compiled_regexes
.
append
((
cur_pattern_num
,
cur_pattern_name
,
cur_regex
))
self
.
compiled_regexes
.
append
((
cur_pattern_num
,
cur_pattern_name
,
cur_regex
))
...
...
This diff is collapsed.
Click to expand it.
sickbeard/processTV.py
+
3
−
6
View file @
af7bbac7
...
@@ -444,8 +444,7 @@ def already_postprocessed(dirName, videofile, force, result):
...
@@ -444,8 +444,7 @@ def already_postprocessed(dirName, videofile, force, result):
myDB
=
db
.
DBConnection
()
myDB
=
db
.
DBConnection
()
sqlResult
=
myDB
.
select
(
"
SELECT * FROM tv_episodes WHERE release_name = ?
"
,
[
dirName
])
sqlResult
=
myDB
.
select
(
"
SELECT * FROM tv_episodes WHERE release_name = ?
"
,
[
dirName
])
if
sqlResult
:
if
sqlResult
:
result
.
output
+=
logHelper
(
u
"
You
'
re trying to post process a dir that
'
s already been processed, skipping
"
,
#result.output += logHelper(u"You're trying to post process a dir that's already been processed, skipping", logger.DEBUG)
logger
.
DEBUG
)
return
True
return
True
else
:
else
:
...
@@ -455,8 +454,7 @@ def already_postprocessed(dirName, videofile, force, result):
...
@@ -455,8 +454,7 @@ def already_postprocessed(dirName, videofile, force, result):
sqlResult
=
myDB
.
select
(
"
SELECT * FROM tv_episodes WHERE release_name = ?
"
,
[
videofile
.
rpartition
(
'
.
'
)[
0
]])
sqlResult
=
myDB
.
select
(
"
SELECT * FROM tv_episodes WHERE release_name = ?
"
,
[
videofile
.
rpartition
(
'
.
'
)[
0
]])
if
sqlResult
:
if
sqlResult
:
result
.
output
+=
logHelper
(
u
"
You
'
re trying to post process a video that
'
s already been processed, skipping
"
,
#result.output += logHelper(u"You're trying to post process a video that's already been processed, skipping", logger.DEBUG)
logger
.
DEBUG
)
return
True
return
True
#Needed if we have downloaded the same episode @ different quality
#Needed if we have downloaded the same episode @ different quality
...
@@ -479,8 +477,7 @@ def already_postprocessed(dirName, videofile, force, result):
...
@@ -479,8 +477,7 @@ def already_postprocessed(dirName, videofile, force, result):
search_sql
+=
"
and history.resource LIKE ?
"
search_sql
+=
"
and history.resource LIKE ?
"
sqlResult
=
myDB
.
select
(
search_sql
,
[
u
'
%
'
+
videofile
])
sqlResult
=
myDB
.
select
(
search_sql
,
[
u
'
%
'
+
videofile
])
if
sqlResult
:
if
sqlResult
:
result
.
output
+=
logHelper
(
u
"
You
'
re trying to post process a video that
'
s already been processed, skipping
"
,
#result.output += logHelper(u"You're trying to post process a video that's already been processed, skipping", logger.DEBUG)
logger
.
DEBUG
)
return
True
return
True
return
False
return
False
...
...
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