From 2ff41313f88f8f55ab2e7e0bad7da17d33144aeb Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Wed, 12 Jul 2017 21:36:19 +0300 Subject: [PATCH] default profile bug fix. install.md fix --- docs/install.md | 6 +++--- toxygen/settings.py | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/install.md b/docs/install.md index c9e12cc..3f29b79 100644 --- a/docs/install.md +++ b/docs/install.md @@ -17,7 +17,7 @@ Run app using ``toxygen`` command. 2. Install PortAudio: ``sudo apt-get install portaudio19-dev`` 3. For 32-bit Linux install PyQt5: ``sudo apt-get install python3-pyqt5`` -4. Install [OpenCV](http://docs.opencv.org/trunk/d7/d9f/tutorial_linux_install.html) +4. Install [OpenCV](http://docs.opencv.org/trunk/d7/d9f/tutorial_linux_install.html) or via ``sudo apt-get install python3-opencv`` 5. Install toxygen: ``sudo pip3 install toxygen`` 6. Run toxygen using ``toxygen`` command. @@ -38,10 +38,10 @@ Note: 32-bit Python isn't supported due to bug with videocalls. It is strictly r 2. Install PyQt5: ``pip install pyqt5`` 3. Install PyAudio: ``pip install pyaudio`` 4. Install numpy: ``pip install numpy`` -5. Install OpenCV: ``pip install opencv-python`` or via ``sudo apt-get install python3-opencv`` +5. Install OpenCV: ``pip install opencv-python`` 6. [Download toxygen](https://github.com/toxygen-project/toxygen/archive/master.zip) 7. Unpack archive -8. Download latest libtox.dll build, download latest libsodium.a build, put it into \src\libs\ +8. Download latest libtox.dll build, download latest libsodium.a build, put it into \toxygen\libs\ 9. Run \toxygen\main.py. Optional: install toxygen using setup.py: ``python setup.py install`` diff --git a/toxygen/settings.py b/toxygen/settings.py index 5457ba6..b0d0502 100644 --- a/toxygen/settings.py +++ b/toxygen/settings.py @@ -57,7 +57,10 @@ class Settings(dict, Singleton): data = fl.read() auto = json.loads(data) if 'path' in auto and 'name' in auto: - return str(auto['path']), str(auto['name']) + path = str(auto['path']) + name = str(auto['name']) + if os.path.isfile(append_slash(path) + name + '.tox'): + return path, name return '', '' @staticmethod