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
151711ac
Commit
151711ac
authored
Aug 17, 2015
by
Dustyn Gibson
Browse files
Options
Downloads
Patches
Plain Diff
Don't search backlog on show update! Save episodes from memory to db!
parent
cc09aa02
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/show_queue.py
+13
-12
13 additions, 12 deletions
sickbeard/show_queue.py
with
13 additions
and
12 deletions
sickbeard/show_queue.py
+
13
−
12
View file @
151711ac
...
...
@@ -393,6 +393,7 @@ class QueueItemAdd(ShowQueueItem):
sickbeard
.
traktRollingScheduler
.
action
.
updateWantedList
(
self
.
show
.
indexerid
)
# if they set default ep status to WANTED then run the backlog to search for episodes
# FIXME: This needs to be a backlog queue item!!!
if
self
.
show
.
default_ep_status
==
WANTED
:
logger
.
log
(
u
"
Launching backlog for this show since its episodes are WANTED
"
)
sickbeard
.
backlogSearchScheduler
.
action
.
searchBacklog
([
self
.
show
])
...
...
@@ -548,6 +549,7 @@ class QueueItemUpdate(ShowQueueItem):
logger
.
log
(
u
"
Error loading IMDb info:
"
+
ex
(
e
),
logger
.
ERROR
)
logger
.
log
(
traceback
.
format_exc
(),
logger
.
DEBUG
)
# have to save show before reading episodes from db
try
:
self
.
show
.
saveToDB
()
except
Exception
,
e
:
...
...
@@ -567,7 +569,6 @@ class QueueItemUpdate(ShowQueueItem):
self
.
show
.
indexer
).
name
+
"
, the show info will not be refreshed:
"
+
ex
(
e
),
logger
.
ERROR
)
IndexerEpList
=
None
foundMissingEps
=
False
if
IndexerEpList
is
None
:
logger
.
log
(
u
"
No data returned from
"
+
sickbeard
.
indexerApi
(
self
.
show
.
indexer
).
name
+
"
, unable to update this show
"
,
logger
.
ERROR
)
...
...
@@ -575,15 +576,13 @@ class QueueItemUpdate(ShowQueueItem):
# for each ep we found on the Indexer delete it from the DB list
for
curSeason
in
IndexerEpList
:
for
curEpisode
in
IndexerEpList
[
curSeason
]:
logger
.
log
(
u
"
Removing
"
+
str
(
curSeason
)
+
"
x
"
+
str
(
curEpisode
)
+
"
from the DB list
"
,
logger
.
DEBUG
)
curEp
=
self
.
show
.
getEpisode
(
curSeason
,
curEpisode
)
curEp
.
saveToDB
()
if
curSeason
in
DBEpList
and
curEpisode
in
DBEpList
[
curSeason
]:
del
DBEpList
[
curSeason
][
curEpisode
]
else
:
# found missing episodes
foundMissingEps
=
True
#
for the
remaining episodes in the DB list just delete them from the DB
# remaining episodes in the DB list
are not on the indexer,
just delete them from the DB
for
curSeason
in
DBEpList
:
for
curEpisode
in
DBEpList
[
curSeason
]:
logger
.
log
(
u
"
Permanently deleting episode
"
+
str
(
curSeason
)
+
"
x
"
+
str
(
...
...
@@ -594,10 +593,12 @@ class QueueItemUpdate(ShowQueueItem):
except
exceptions
.
EpisodeDeletedException
:
pass
# if they set default ep status to WANTED then run the backlog
if
foundMissingEps
and
self
.
show
.
default_ep_status
==
WANTED
:
logger
.
log
(
u
"
Launching backlog for this show since we found missing episodes
"
)
sickbeard
.
backlogSearchScheduler
.
action
.
searchBacklog
([
self
.
show
])
# save show again, in case episodes have changed
try
:
self
.
show
.
saveToDB
()
except
Exception
,
e
:
logger
.
log
(
u
"
Error saving show info to the database:
"
+
ex
(
e
),
logger
.
ERROR
)
logger
.
log
(
traceback
.
format_exc
(),
logger
.
DEBUG
)
logger
.
log
(
u
"
Finished update of
"
+
self
.
show
.
name
,
logger
.
DEBUG
)
...
...
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