~vincent-vandevyvre/qarte/trunk

« back to all changes in this revision

Viewing changes to artePlus.py

  • Committer: Vincent Vande Vyvre
  • Date: 2015-11-01 06:27:59 UTC
  • Revision ID: vincent.vandevyvre@oqapy.eu-20151101062759-bm7f19uavuoxisv2
Update the parsing

Show diffs side-by-side

added added

removed removed

Lines of Context:
126
126
        logger.info(u"Display thumbnails finished")
127
127
        if startup:
128
128
            self.main.check_parsing()
129
 
            self.pprs.update_all()
 
129
            #self.pprs.update_all()
130
130
 
131
131
    def next_thumbnail(self, idx, video, thumb):
132
132
        """Insert thumbnail in preview.
646
646
 
647
647
        if self.videos[idx].summary is None:
648
648
            self.videos[idx].summary = u"No informations"
649
 
        d = self.videos[idx].duration
650
 
        dur = ""
651
 
        if d is not None:
652
 
            try:
653
 
                d = int(d)
654
 
                h, m = divmod(d, 60)
655
 
                if h:
656
 
                    dur += "  (%s h. %s m.)" % (h, m)
657
 
                else:
658
 
                    dur += "  (%s m.)" % m
659
 
            except:
660
 
                pass
661
649
 
662
650
        summary = self.videos[idx].summary.decode('utf-8', 'replace')
663
651
        font = QtGui.QFont("sans", 10)
672
660
        self.ui.editor_plus.appendPlainText(self.videos[idx].title)
673
661
 
674
662
        self.ui.editor_plus.setCurrentCharFormat(c_form)
675
 
        t = "  " + self.videos[idx].date
676
 
        t += dur
 
663
        t = "  %s " % self.videos[idx].date
 
664
        t += self.videos[idx].duration
677
665
        self.ui.editor_plus.insertPlainText(t)
678
666
        t = "".join([self.videos[idx].orig, "\n"])
679
667
        self.ui.editor_plus.appendPlainText(t)