Compare commits
3 commits
9145ef5df6
...
c43ccd319d
| Author | SHA1 | Date | |
|---|---|---|---|
| c43ccd319d | |||
| ee586ee194 | |||
| 216b880151 |
4 changed files with 22 additions and 12 deletions
|
|
@ -36,9 +36,9 @@ To update to latest version:
|
|||
|
||||
./ctl update
|
||||
|
||||
On Linux you need a working python3.4 installation with pillow, python-lxml, pyOpenSSL and pyCrypto and popler-utils:
|
||||
On Linux you need a working python3.6 installation with pillow, python-lxml, pyOpenSSL and pyCrypto and popler-utils:
|
||||
|
||||
apt-get install python3.4 python3-pil python3-lxml \
|
||||
apt-get install python3.6 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.4 installation and the dependencies
|
||||
not supported, you need a working python 3.6 installation and the dependencies
|
||||
listed in requirements.txt and requirements-shared.txt:
|
||||
|
||||
pip3 install -r requirements.txt
|
||||
|
|
|
|||
6
ctl
6
ctl
|
|
@ -147,7 +147,11 @@ if [ "$1" == "open" ]; then
|
|||
if [ $SYSTEM == "Linux" ]; then
|
||||
if [ -e "$PID" ]; then
|
||||
if ps -p `cat "$PID"` > /dev/null; then
|
||||
xdg-open "file://${BASE}/openmedialibrary/static/html/load.html"
|
||||
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
|
||||
else
|
||||
$PYTHON "${NAME}/oml/gtkstatus.py" $@
|
||||
exit $?
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
10
oml/utils.py
10
oml/utils.py
|
|
@ -264,7 +264,10 @@ def open_file(path=None):
|
|||
if sys.platform == 'darwin':
|
||||
cmd += ['open', path]
|
||||
elif sys.platform.startswith('linux'):
|
||||
cmd += ['xdg-open', path]
|
||||
if os.path.exists('/usr/bin/gio'):
|
||||
cmd += ['gio', 'open', path]
|
||||
else:
|
||||
cmd += ['xdg-open', path]
|
||||
elif sys.platform == 'win32':
|
||||
path = '\\'.join(path.split('/'))
|
||||
os.startfile(path)
|
||||
|
|
@ -285,7 +288,10 @@ def open_folder(folder=None, path=None):
|
|||
path = folder
|
||||
cmd += ['open', '-R', path]
|
||||
elif sys.platform.startswith('linux'):
|
||||
cmd += ['xdg-open', folder]
|
||||
if os.path.exists('/usr/bin/gio'):
|
||||
cmd += ['gio', 'open', folder]
|
||||
else:
|
||||
cmd += ['xdg-open', folder]
|
||||
elif sys.platform == 'win32':
|
||||
path = '\\'.join(path.split('/'))
|
||||
cmd = 'explorer.exe /select,"%s"' % path
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue