forked from openlp/openlp
Fix for bug #1387286, playing audio CD clips on windows
Fixes: https://launchpad.net/bugs/1387286
This commit is contained in:
parent
74b582032f
commit
6500a4b813
|
@ -167,6 +167,8 @@ class VlcPlayer(MediaPlayer):
|
|||
path = os.path.normcase(file_path)
|
||||
# create the media
|
||||
if controller.media_info.media_type == MediaType.CD:
|
||||
if is_win():
|
||||
path = '/' + path
|
||||
display.vlc_media = display.vlc_instance.media_new_location('cdda://' + path)
|
||||
display.vlc_media_player.set_media(display.vlc_media)
|
||||
display.vlc_media_player.play()
|
||||
|
|
|
@ -219,7 +219,7 @@ class MediaClipSelectorForm(QtGui.QDialog, Ui_MediaClipSelector, RegistryPropert
|
|||
return
|
||||
# VLC behaves a bit differently on windows and linux when loading, which creates problems when trying to
|
||||
# detect if we're dealing with a DVD or CD, so we use different loading approaches depending on the OS.
|
||||
if os.name == 'nt':
|
||||
if is_win():
|
||||
# If the given path is in the format "D:\" or "D:", prefix it with "/" to make VLC happy
|
||||
pattern = re.compile('^\w:\\\\*$')
|
||||
if pattern.match(path):
|
||||
|
|
Loading…
Reference in New Issue