From b63024df02b0512bf554dbfe68896e89e754ff99 Mon Sep 17 00:00:00 2001 From: j Date: Thu, 30 Jun 2016 00:23:56 +0200 Subject: [PATCH] show source info if encode fails --- pandora/archive/models.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pandora/archive/models.py b/pandora/archive/models.py index 1f21659b..dc0d7b13 100644 --- a/pandora/archive/models.py +++ b/pandora/archive/models.py @@ -2,6 +2,7 @@ # vi:si:et:sw=4:sts=4:ts=4 from __future__ import division, with_statement +import json import os.path import shutil import tempfile @@ -371,7 +372,8 @@ class File(models.Model): if self.failed: state = 'failed' error = '\n\n'.join(['Failed to encode %s:\n%s' % (s.name(), s.error) - for s in self.streams.exclude(error='') if s.error]) + for s in self.streams.exclude(error='') if s.error]) + \ + '\n\nSource Info:\n' + json.dumps(self.info, indent=2) elif self.encoding: state = 'encoding' elif self.queued: