From b1fb45f33363b9e4c3336c0ab596dff9f8477298 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 30 Apr 2013 14:08:24 +0200 Subject: [PATCH] skip non media files --- pandora_client/server.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pandora_client/server.py b/pandora_client/server.py index efde2a9..d2f2730 100644 --- a/pandora_client/server.py +++ b/pandora_client/server.py @@ -128,6 +128,9 @@ class Server(Resource): if os.path.exists(f): response['oshash'] = oshash info = self.client.info(oshash) + if not 'video' in info: + print oshash, f, 'not media file skipped' + continue url = 'http://%s:%s/get/%s' % (request.host.host, request.host.port, oshash) output = '/tmp/%s.%s' % (oshash, self.client.profile) response['cmd'] = extract.video_cmd(url, output, self.client.profile, info)