From fd9b50e2dcd427ca4c4c4ee0f91ee74850a9e008 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Wed, 1 Dec 2010 00:33:42 +0100 Subject: [PATCH] use oxdb_id for parse_path too. pytohn-ox needs /home/j --- etc/init/pandora.conf | 1 + pandora/item/models.py | 2 +- pandora/item/utils.py | 9 +++++---- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/etc/init/pandora.conf b/etc/init/pandora.conf index 5909dd6d..9a0588c7 100644 --- a/etc/init/pandora.conf +++ b/etc/init/pandora.conf @@ -10,6 +10,7 @@ respawn env VENV=/srv/pandora env USER=pandora +env HOME=/home/pandora script test -e /var/log/pandora || (mkdir -p /var/log/pandora && chown $USER:$USER /var/log/pandora) diff --git a/pandora/item/models.py b/pandora/item/models.py index 88eb9b2e..4c655cdd 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -283,7 +283,7 @@ class Item(models.Model): return self.get('title') def get_absolute_url(self): - return '/timeline#%s' % self.itemId + return '/%s' % self.itemId def save(self, *args, **kwargs): self.json = self.get_json() diff --git a/pandora/item/utils.py b/pandora/item/utils.py index e6e87220..a57efedd 100644 --- a/pandora/item/utils.py +++ b/pandora/item/utils.py @@ -157,10 +157,11 @@ def parse_path(path): r['series_title'] = oxdb_series_title(path) r['imdbId'] = ox.web.imdb.guess(search_title, ', '.join(r['directors']), timeout=-1) - r['oxdbId'] = oxid(r['title'], r['directors'], - seriesTitle=r['series_title'], - episodeTitle=r['episode_title'], - season=r['season'], episode=r['episode']) + r['oxdbId'] = oxdb_id(r['title'], r['directors'], r.get('year', ''), + r.get('season', ''), r.get('episode', ''), + episode_title=r['episode_title'], + episode_directors=[], + episode_year='') return r def sort_title(title):