Small adjustments

This commit is contained in:
Tomas Groth 2014-07-07 13:30:03 +02:00
parent 32ff9cdeb7
commit bec0071e7c

View File

@ -244,11 +244,7 @@ class MediaClipSelectorForm(QtGui.QDialog, Ui_MediaClipSelector):
'VLC player failed playing the media')) 'VLC player failed playing the media'))
self.toggle_disable_load_media(False) self.toggle_disable_load_media(False)
return return
# Sleep 1 second to make sure VLC has the needed metadata
self.vlc_media_player.audio_set_mute(True) self.vlc_media_player.audio_set_mute(True)
#sleep(1)
#self.vlc_media_player.set_pause(1)
#self.vlc_media_player.set_time(0)
if not self.audio_cd: if not self.audio_cd:
# Get titles, insert in combobox # Get titles, insert in combobox
titles = self.vlc_media_player.video_get_title_description() titles = self.vlc_media_player.video_get_title_description()
@ -401,10 +397,8 @@ class MediaClipSelectorForm(QtGui.QDialog, Ui_MediaClipSelector):
return return
self.vlc_media_player.audio_set_mute(True) self.vlc_media_player.audio_set_mute(True)
# Sleep 1 second to make sure VLC has the needed metadata # Sleep 1 second to make sure VLC has the needed metadata
#sleep(1) sleep(1)
# pause
self.vlc_media_player.set_time(0) self.vlc_media_player.set_time(0)
#self.vlc_media_player.set_pause(1)
# Get audio tracks, insert in combobox # Get audio tracks, insert in combobox
audio_tracks = self.vlc_media_player.audio_get_track_description() audio_tracks = self.vlc_media_player.audio_get_track_description()
self.audio_tracks_combobox.clear() self.audio_tracks_combobox.clear()
@ -425,6 +419,7 @@ class MediaClipSelectorForm(QtGui.QDialog, Ui_MediaClipSelector):
if len(subtitles_tracks) > 0: if len(subtitles_tracks) > 0:
self.subtitle_tracks_combobox.setDisabled(False) self.subtitle_tracks_combobox.setDisabled(False)
self.vlc_media_player.audio_set_mute(False) self.vlc_media_player.audio_set_mute(False)
self.vlc_media_player.set_pause(1)
# If a title or audio track is available the player is enabled # If a title or audio track is available the player is enabled
if self.title_combo_box.count() > 0 or len(audio_tracks) > 0: if self.title_combo_box.count() > 0 or len(audio_tracks) > 0:
self.toggle_disable_player(False) self.toggle_disable_player(False)