Call os.chdir() before importing vlc, only if we are running from source. Restore the original current dir after that. Changed wx.NewId() calls to wx.ID_ANY

This commit is contained in:
Jose Manuel Delicado
2018-08-12 14:50:58 +02:00
parent f4e20f8ed4
commit 83612b6a3c
2 changed files with 6 additions and 4 deletions

View File

@@ -11,8 +11,13 @@ import subprocess
import platform
import output
import youtube_utils
import vlc
system = platform.system()
if system=="Windows" and not hasattr(sys, 'frozen'): # We are running from source on Windows
current_dir=os.getcwd()
os.chdir(os.environ['PYTHON_VLC_MODULE_PATH'])
import vlc
if system=="Windows" and not hasattr(sys, 'frozen'): # Restore the original folder
os.chdir(current_dir)
from mysc.repeating_timer import RepeatingTimer
from mysc.thread_utils import call_threaded
import application