forked from openlp/openlp
More informational noise to debug log, extensions by mimetype. To justify: it seems that extension list is an important thing.
This commit is contained in:
parent
7d7f9a7d98
commit
24519832df
@ -54,19 +54,16 @@ class MediaPlugin(Plugin):
|
|||||||
self._addToList(self.audio_list, mimetype)
|
self._addToList(self.audio_list, mimetype)
|
||||||
elif mimetype.startswith(u'video/'):
|
elif mimetype.startswith(u'video/'):
|
||||||
self._addToList(self.video_list, mimetype)
|
self._addToList(self.video_list, mimetype)
|
||||||
log.info(u'MediaPlugin handles audio extensions: %s',
|
|
||||||
u' '.join(self.audio_list))
|
|
||||||
log.info(u'MediaPlugin handles video extensions: %s',
|
|
||||||
u' '.join(self.video_list))
|
|
||||||
|
|
||||||
def _addToList(self, list, mimetype):
|
def _addToList(self, list, mimetype):
|
||||||
# Is it a media type
|
|
||||||
extensions = mimetypes.guess_all_extensions(unicode(mimetype))
|
extensions = mimetypes.guess_all_extensions(unicode(mimetype))
|
||||||
for extension in extensions:
|
for extension in extensions:
|
||||||
ext = u'*%s' % extension
|
ext = u'*%s' % extension
|
||||||
if ext not in list:
|
if ext not in list:
|
||||||
list.append(ext)
|
list.append(ext)
|
||||||
self.serviceManager.supportedSuffixes(extension[1:])
|
self.serviceManager.supportedSuffixes(extension[1:])
|
||||||
|
log.info(u'MediaPlugin: %s extensions: %s' % (mimetype,
|
||||||
|
u' '.join(extensions)))
|
||||||
|
|
||||||
def about(self):
|
def about(self):
|
||||||
about_text = translate('MediaPlugin', '<strong>Media Plugin</strong>'
|
about_text = translate('MediaPlugin', '<strong>Media Plugin</strong>'
|
||||||
|
Loading…
Reference in New Issue
Block a user