~raoul-snyman/openlp/fix-presentations-cleanup-bug

« back to all changes in this revision

Viewing changes to openlp/plugins/presentations/lib/mediaitem.py

  • Committer: Raoul Snyman
  • Date: 2019-06-30 23:28:38 UTC
  • Revision ID: raoul@snyman.info-20190630232838-whemuu8ct5brlvx4
Fix a bug when cleaning up thumbnails where all presentation controllers, whether enabled or not, would be cycled through.

Show diffs side-by-side

added added

removed removed

Lines of Context:
246
246
        :rtype: None
247
247
        """
248
248
        for cidx in self.controllers:
 
249
            if not self.controllers[cidx].enabled():
 
250
                # skip presentation controllers that are not enabled
 
251
                continue
249
252
            file_ext = file_path.suffix[1:]
250
253
            if file_ext in self.controllers[cidx].supports or file_ext in self.controllers[cidx].also_supports:
251
254
                doc = self.controllers[cidx].add_document(file_path)