Skip to content

Commit 8f10f66

Browse files
committed
Make sure that content was found in page
- e.g. when switching sites without rematch)
1 parent d2d6f69 commit 8f10f66

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Contents/Code/__init__.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,8 +521,17 @@ def update(self, metadata, media, lang, force=False):
521521
for r in html.xpath('//li[contains (@class, "seriesLabel")]'):
522522
series = self.getStringContentFromXPath(r, '//li[contains (@class, "seriesLabel")]//a[1]')
523523
#Log(series.strip())
524-
525-
524+
525+
526+
#
527+
# Make sure that content was found in page
528+
# - happens when switching sites without rematch
529+
#
530+
if date is None:
531+
Log("***** COULD NOT RETRIEVE ANY DATA FOR ITEM: %s *****", metadata.id)
532+
# TODO: communicate this somehow?
533+
return
534+
526535
#cleanup synopsis
527536
synopsis = synopsis.replace("<i>", "")
528537
synopsis = synopsis.replace("</i>", "")

0 commit comments

Comments
 (0)