From 16dbedfa8162ede056cb85687798a8aec62228c4 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Mon, 21 Feb 2011 11:25:13 +0100 Subject: [PATCH] no oxdb_id without title --- pandora/item/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandora/item/models.py b/pandora/item/models.py index 94af172a..2ae690b4 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -383,6 +383,8 @@ class Item(models.Model): def oxdb_id(self): if not settings.USE_IMDB: return self.itemId + if not self.get('title', None) and not self.get('director', None): + return None return utils.oxdb_id(self.get('title', ''), self.get('director', []), str(self.get('year', '')), self.get('season', ''), self.get('episode', ''), self.get('episode_title', ''), self.get('episode_director', []), self.get('episode_year', ''))