forked from openlp/openlp
Head r718
This commit is contained in:
commit
0c97973469
@ -61,9 +61,9 @@ class MediaMediaItem(MediaManagerItem):
|
|||||||
|
|
||||||
def retranslateUi(self):
|
def retranslateUi(self):
|
||||||
self.OnNewPrompt = self.trUtf8('Select Media')
|
self.OnNewPrompt = self.trUtf8('Select Media')
|
||||||
self.OnNewFileMasks = self.trUtf8('Videos (*.avi *.mpeg *.mpg *.wmv '
|
self.OnNewFileMasks = self.trUtf8('Videos (%s);;'
|
||||||
'*.mov *.mp4 *.flv);;Audio (*.ogg *.mp3 *.wma *.wav *.flac)'
|
'Audio (%s);;'
|
||||||
';;All files (*)')
|
'All files (*)' % (self.parent.video_list, self.parent.audio_list))
|
||||||
|
|
||||||
def requiredIcons(self):
|
def requiredIcons(self):
|
||||||
MediaManagerItem.requiredIcons(self)
|
MediaManagerItem.requiredIcons(self)
|
||||||
|
@ -41,9 +41,25 @@ class MediaPlugin(Plugin):
|
|||||||
# passed with drag and drop messages
|
# passed with drag and drop messages
|
||||||
self.dnd_id = u'Media'
|
self.dnd_id = u'Media'
|
||||||
self.status = PluginStatus.Active
|
self.status = PluginStatus.Active
|
||||||
# print Phonon.BackendCapabilities.availableMimeTypes()
|
self.audio_list = u''
|
||||||
# for mimetype in Phonon.BackendCapabilities.availableMimeTypes():
|
self.video_list = u''
|
||||||
# print mimetype
|
for mimetype in Phonon.BackendCapabilities.availableMimeTypes():
|
||||||
|
mimetype = unicode(mimetype)
|
||||||
|
type = mimetype.split(u'audio/x-')
|
||||||
|
self.audio_list, mimetype = self._add_to_list(self.audio_list, type, mimetype)
|
||||||
|
type = mimetype.split(u'audio/')
|
||||||
|
self.audio_list, mimetype = self._add_to_list(self.audio_list, type, mimetype)
|
||||||
|
type = mimetype.split(u'video/x-')
|
||||||
|
self.video_list, mimetype = self._add_to_list(self.video_list, type, mimetype)
|
||||||
|
type = mimetype.split(u'video/')
|
||||||
|
self.video_list, mimetype = self._add_to_list(self.video_list, type, mimetype)
|
||||||
|
|
||||||
|
def _add_to_list(self, list, value, type):
|
||||||
|
if len(value) == 2:
|
||||||
|
if list.find(value[1]) == -1:
|
||||||
|
list += u'*.%s ' % value[1]
|
||||||
|
type = u''
|
||||||
|
return list, type
|
||||||
|
|
||||||
def initialise(self):
|
def initialise(self):
|
||||||
log.info(u'Plugin Initialising')
|
log.info(u'Plugin Initialising')
|
||||||
|
@ -1 +1 @@
|
|||||||
1.9.0-716
|
1.9.0-718
|
||||||
|
Loading…
Reference in New Issue
Block a user