use oxdb_id for parse_path too. pytohn-ox needs /home/j

This commit is contained in:
j 2010-12-01 00:33:42 +01:00
parent 7013814af8
commit fd9b50e2dc
3 changed files with 7 additions and 5 deletions

View file

@ -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)

View file

@ -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()

View file

@ -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):