Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
SiCKRAGE
sickrage
Commits
731233a8
Commit
731233a8
authored
Nov 02, 2021
by
echel0n
Browse files
fixed issues with adding/updating shows from TheTVDB
parent
6540d978
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
sickrage/checksums.md5
View file @
731233a8
This diff is collapsed.
Click to expand it.
sickrage/series_providers/thetvdb.py
View file @
731233a8
...
...
@@ -105,28 +105,28 @@ class TheTVDB(SeriesProvider):
sickrage
.
app
.
log
.
debug
(
f
"[
{
sid
}
]: Unable to get series info from
{
self
.
name
}
"
)
return
None
# add season data to cache
for
season
in
resp
[
'seasons'
]:
season_number
=
int
(
float
(
season
.
get
(
'seasonNumber'
)))
for
k
,
v
in
season
.
items
():
self
.
cache
.
add_season_data
(
sid
,
season_number
,
k
,
v
)
# add series data to cache
[
self
.
cache
.
add_show_data
(
sid
,
k
,
v
)
for
k
,
v
in
resp
.
items
()]
[
self
.
cache
.
add_show_data
(
sid
,
k
,
v
)
for
k
,
v
in
resp
.
items
()
if
k
!=
'seasons'
]
# get season and episode data
sickrage
.
app
.
log
.
debug
(
f
'[
{
sid
}
]: Getting episode data from
{
self
.
name
}
'
)
season_type
=
'dvd'
if
dvd_order
else
'
default
'
season_type
=
'dvd'
if
dvd_order
else
'
official
'
resp
=
sickrage
.
app
.
api
.
series_provider
.
get_episodes_info
(
provider
=
self
.
slug
,
series_id
=
sid
,
season_type
=
season_type
,
language
=
language
)
if
not
resp
or
'seasons'
not
in
resp
or
'episodes'
not
in
resp
:
sickrage
.
app
.
log
.
debug
(
f
"[
{
sid
}
]: Unable to get
season and
episode data from
{
self
.
name
}
"
)
if
not
resp
:
sickrage
.
app
.
log
.
debug
(
f
"[
{
sid
}
]: Unable to get episode data from
{
self
.
name
}
"
)
return
None
# add season data to cache
for
season
in
resp
[
'seasons'
]:
season_number
=
int
(
float
(
season
.
get
(
'seasonNumber'
)))
for
k
,
v
in
season
.
items
():
self
.
cache
.
add_season_data
(
sid
,
season_number
,
k
,
v
)
# add episode data to cache
episode_incomplete
=
False
for
episode
in
resp
[
'episodes'
]
:
for
episode
in
resp
:
season_number
,
episode_number
=
episode
.
get
(
'seasonNumber'
),
episode
.
get
(
'episodeNumber'
)
if
season_number
is
None
or
episode_number
is
None
:
episode_incomplete
=
True
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment