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:
Mattias Põldaru 2011-02-21 17:49:09 +02:00
parent 7d7f9a7d98
commit 24519832df

View File

@ -54,19 +54,16 @@ class MediaPlugin(Plugin):
self._addToList(self.audio_list, mimetype)
elif mimetype.startswith(u'video/'):
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):
# Is it a media type
extensions = mimetypes.guess_all_extensions(unicode(mimetype))
for extension in extensions:
ext = u'*%s' % extension
if ext not in list:
list.append(ext)
self.serviceManager.supportedSuffixes(extension[1:])
log.info(u'MediaPlugin: %s extensions: %s' % (mimetype,
u' '.join(extensions)))
def about(self):
about_text = translate('MediaPlugin', '<strong>Media Plugin</strong>'