diff --git a/pandora_client/__init__.py b/pandora_client/__init__.py index 542cea7..cc12a2b 100644 --- a/pandora_client/__init__.py +++ b/pandora_client/__init__.py @@ -155,9 +155,19 @@ class Client(object): def info(self, oshash): conn, c = self._conn() c.execute('SELECT info FROM file WHERE oshash = ?', (oshash, )) + info = None for row in c: - return json.loads(row[0]) - return None + info = json.loads(row[0]) + break + path = self.path(oshash) + if info and path: + path = '/'.join(path[0].split('/')[-self.folderdepth:]) + info.update(ox.movie.parse_path(path)) + if self.folderdepth == 3: + info['director'] = [] + info['directorSort'] = [] + print info + return info def path(self, oshash): conn, c = self._conn()