diff --git a/README.md b/README.md index 0c94025..3eb0d64 100644 --- a/README.md +++ b/README.md @@ -36,9 +36,9 @@ To update to latest version: ./ctl update -On Linux you need a working python3.6 installation with pillow, python-lxml, pyOpenSSL and pyCrypto and popler-utils: +On Linux you need a working python3.4 installation with pillow, python-lxml, pyOpenSSL and pyCrypto and popler-utils: - apt-get install python3.6 python3-pil python3-lxml \ + apt-get install python3.4 python3-pil python3-lxml \ python3-openssl python3-crypto poppler-utils \ libevent-2.0-5 @@ -46,7 +46,7 @@ Platform ---------- If you install Open Media Library on a architecture/os that is currently -not supported, you need a working python 3.6 installation and the dependencies +not supported, you need a working python 3.4 installation and the dependencies listed in requirements.txt and requirements-shared.txt: pip3 install -r requirements.txt diff --git a/ctl b/ctl index f02ceeb..a7e8b6f 100755 --- a/ctl +++ b/ctl @@ -147,11 +147,7 @@ if [ "$1" == "open" ]; then if [ $SYSTEM == "Linux" ]; then if [ -e "$PID" ]; then if ps -p `cat "$PID"` > /dev/null; then - if [ -e /usr/bin/gio ]; then - gio open "file://${BASE}/openmedialibrary/static/html/load.html" - else - xdg-open "file://${BASE}/openmedialibrary/static/html/load.html" - fi + xdg-open "file://${BASE}/openmedialibrary/static/html/load.html" else $PYTHON "${NAME}/oml/gtkstatus.py" $@ exit $? diff --git a/oml/oxtornado.py b/oml/oxtornado.py index 322c6a8..db15793 100644 --- a/oml/oxtornado.py +++ b/oml/oxtornado.py @@ -38,13 +38,13 @@ def json_dumps(obj): return json.dumps(obj, indent=indent, default=_to_json, ensure_ascii=False).encode() def run_async(func): - @wraps(func) - def async_func(*args, **kwargs): - func_hl = Thread(target=func, args=args, kwargs=kwargs) - func_hl.start() - return func_hl + @wraps(func) + def async_func(*args, **kwargs): + func_hl = Thread(target = func, args = args, kwargs = kwargs) + func_hl.start() + return func_hl - return async_func + return async_func def trim(docstring): if not docstring: diff --git a/oml/utils.py b/oml/utils.py index 50e2e9e..a3463f4 100644 --- a/oml/utils.py +++ b/oml/utils.py @@ -264,10 +264,7 @@ def open_file(path=None): if sys.platform == 'darwin': cmd += ['open', path] elif sys.platform.startswith('linux'): - if os.path.exists('/usr/bin/gio'): - cmd += ['gio', 'open', path] - else: - cmd += ['xdg-open', path] + cmd += ['xdg-open', path] elif sys.platform == 'win32': path = '\\'.join(path.split('/')) os.startfile(path) @@ -288,10 +285,7 @@ def open_folder(folder=None, path=None): path = folder cmd += ['open', '-R', path] elif sys.platform.startswith('linux'): - if os.path.exists('/usr/bin/gio'): - cmd += ['gio', 'open', folder] - else: - cmd += ['xdg-open', folder] + cmd += ['xdg-open', folder] elif sys.platform == 'win32': path = '\\'.join(path.split('/')) cmd = 'explorer.exe /select,"%s"' % path