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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vlbox
SickRage-1
Commits
13c75e4e
Commit
13c75e4e
authored
9 years ago
by
Dustyn Gibson
Browse files
Options
Downloads
Plain Diff
Merge branch 'develop'
parents
2996c9d4
8426a061
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
sickbeard/helpers.py
+10
-0
10 additions, 0 deletions
sickbeard/helpers.py
sickbeard/subtitles.py
+4
-0
4 additions, 0 deletions
sickbeard/subtitles.py
with
14 additions
and
0 deletions
sickbeard/helpers.py
+
10
−
0
View file @
13c75e4e
...
...
@@ -1358,13 +1358,20 @@ def headURL(url, params=None, headers={}, timeout=30, session=None, json=False,
except
requests
.
exceptions
.
HTTPError
,
e
:
logger
.
log
(
u
"
HTTP error in headURL {0}. Error: {1}
"
.
format
(
url
,
e
.
errno
),
logger
.
WARNING
)
pass
except
requests
.
exceptions
.
ConnectionError
,
e
:
logger
.
log
(
u
"
Connection error to {0}. Error: {1}
"
.
format
(
url
,
e
.
message
),
logger
.
WARNING
)
pass
except
requests
.
exceptions
.
Timeout
,
e
:
logger
.
log
(
u
"
Connection timed out accessing {0}. Error: {1}
"
.
format
(
url
,
e
.
message
),
logger
.
WARNING
)
pass
except
requests
.
exceptions
.
ContentDecodingError
:
logger
.
log
(
u
"
Content-Encoding was gzip, but content was not compressed
"
,
logger
.
WARNING
)
pass
except
Exception
as
e
:
logger
.
log
(
u
"
Unknown exception in headURL {0}. Error: {1}
"
.
format
(
url
,
e
.
message
),
logger
.
WARNING
)
logger
.
log
(
traceback
.
format_exc
(),
logger
.
WARNING
)
pass
return
False
...
...
@@ -1408,6 +1415,9 @@ def getURL(url, post_data=None, params={}, headers={}, timeout=30, session=None,
except
requests
.
exceptions
.
Timeout
,
e
:
logger
.
log
(
u
"
Connection timed out accessing {0}. Error: {1}
"
.
format
(
url
,
e
.
message
),
logger
.
WARNING
)
return
except
requests
.
exceptions
.
ContentDecodingError
:
logger
.
log
(
u
"
Content-Encoding was gzip, but content was not compressed
"
,
logger
.
WARNING
)
return
except
Exception
as
e
:
logger
.
log
(
u
"
Unknown exception in getURL {0}. Error: {1}
"
.
format
(
url
,
e
.
message
),
logger
.
WARNING
)
logger
.
log
(
traceback
.
format_exc
(),
logger
.
WARNING
)
...
...
This diff is collapsed.
Click to expand it.
sickbeard/subtitles.py
+
4
−
0
View file @
13c75e4e
...
...
@@ -89,6 +89,10 @@ def wantedLanguages(sqlLike = False):
def
subtitlesLanguages
(
video_path
):
"""
Return a list detected subtitles for the given video file
"""
resultList
=
[]
if
sickbeard
.
SUBTITLES_DIR
and
ek
.
ek
(
os
.
path
.
exists
,
sickbeard
.
SUBTITLES_DIR
):
video_path
=
ek
.
ek
(
os
.
path
.
join
,
sickbeard
.
SUBTITLES_DIR
,
ek
.
ek
(
os
.
path
.
basename
,
video_path
))
languages
=
subliminal
.
video
.
scan_subtitle_languages
(
video_path
)
for
language
in
languages
:
...
...
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