]> git.parisson.com Git - teleforma.git/commitdiff
fix no markers
authoryomguy <yomguy@parisson.com>
Tue, 15 Jan 2013 10:03:56 +0000 (11:03 +0100)
committeryomguy <yomguy@parisson.com>
Tue, 15 Jan 2013 10:03:56 +0000 (11:03 +0100)
teleforma/management/commands/teleforma-import-seminars.py

index b0cd0ab2099b9a6da97a237245bf3ba912c84457..5f212d4cfcde6ac6d5eb7b6013e736049a7bbcf9 100644 (file)
@@ -145,12 +145,13 @@ class Command(BaseCommand):
                                 print 'thumb added'
                             elif extension[1:] in self.transcoded_formats:
                                 t, c = MediaItemTranscoded.objects.get_or_create(item=item, file=r_path)
-                                print "related added"
+                                print "transcoded added"
                             elif extension[1:] == 'kdenlive':
                                 related, c = MediaItemRelated.objects.get_or_create(item=item, file=r_path)
                                 markers = related.parse_markers()
-                                item.title = markers[0]['comment']
-                                item.save()
+                                if markers:
+                                    item.title = markers[0]['comment']
+                                    item.save()
                                 print "related parsed"
 
                         media, c = Media.objects.get_or_create(item=item, course=course, type=ext)