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
8e38759d
Commit
8e38759d
authored
9 years ago
by
Dustyn Gibson
Browse files
Options
Downloads
Patches
Plain Diff
Performance improvement in subtitles code check
parent
4d9663c1
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/databases/mainDB.py
+2
-4
2 additions, 4 deletions
sickbeard/databases/mainDB.py
with
2 additions
and
4 deletions
sickbeard/databases/mainDB.py
+
2
−
4
View file @
8e38759d
...
...
@@ -26,7 +26,7 @@ from sickbeard import db, common, helpers, logger
from
sickbeard
import
encodingKludge
as
ek
from
sickbeard.name_parser.parser
import
NameParser
,
InvalidNameException
,
InvalidShowException
from
babelfish
import
L
anguage
from
babelfish
import
l
anguage
_converters
MIN_DB_VERSION
=
9
# oldest db version we support migrating from
MAX_DB_VERSION
=
42
...
...
@@ -211,9 +211,7 @@ class MainSanityCheck(db.DBSanityCheck):
(
sqlResult
[
'
episode_id
'
],
sqlResult
[
'
subtitles
'
]),
logger
.
DEBUG
)
for
subcode
in
sqlResult
[
'
subtitles
'
].
split
(
'
,
'
):
try
:
Language
.
fromopensubtitles
(
subcode
)
except
Exception
:
if
not
len
(
subcode
)
is
3
or
not
subcode
in
language_converters
[
'
opensubtitles
'
].
codes
:
logger
.
log
(
"
Fixing subtitle codes for episode_id: %s, invalid code: %s
"
%
(
sqlResult
[
'
episode_id
'
],
subcode
),
logger
.
DEBUG
)
continue
...
...
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