Fix a bug when cleaning up thumbnails where all presentation controllers, whether enabled or not, would be cycled through.

This commit is contained in:
Raoul Snyman 2019-06-30 16:28:38 -07:00
parent 28da80ecf9
commit 61b85f15bc

View File

@ -246,6 +246,9 @@ class PresentationMediaItem(MediaManagerItem):
:rtype: None :rtype: None
""" """
for cidx in self.controllers: for cidx in self.controllers:
if not self.controllers[cidx].enabled():
# skip presentation controllers that are not enabled
continue
file_ext = file_path.suffix[1:] file_ext = file_path.suffix[1:]
if file_ext in self.controllers[cidx].supports or file_ext in self.controllers[cidx].also_supports: if file_ext in self.controllers[cidx].supports or file_ext in self.controllers[cidx].also_supports:
doc = self.controllers[cidx].add_document(file_path) doc = self.controllers[cidx].add_document(file_path)