Compare commits
No commits in common. "c43ccd319dc6f38bcfb9b8dd46d3be58cd5b510e" and "9145ef5df6bcc90b9ed897988c4f09ae8c6578b8" have entirely different histories.
c43ccd319d
...
9145ef5df6
4 changed files with 12 additions and 22 deletions
|
|
@ -36,9 +36,9 @@ To update to latest version:
|
||||||
|
|
||||||
./ctl update
|
./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 \
|
python3-openssl python3-crypto poppler-utils \
|
||||||
libevent-2.0-5
|
libevent-2.0-5
|
||||||
|
|
||||||
|
|
@ -46,7 +46,7 @@ Platform
|
||||||
----------
|
----------
|
||||||
|
|
||||||
If you install Open Media Library on a architecture/os that is currently
|
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:
|
listed in requirements.txt and requirements-shared.txt:
|
||||||
|
|
||||||
pip3 install -r requirements.txt
|
pip3 install -r requirements.txt
|
||||||
|
|
|
||||||
6
ctl
6
ctl
|
|
@ -147,11 +147,7 @@ if [ "$1" == "open" ]; then
|
||||||
if [ $SYSTEM == "Linux" ]; then
|
if [ $SYSTEM == "Linux" ]; then
|
||||||
if [ -e "$PID" ]; then
|
if [ -e "$PID" ]; then
|
||||||
if ps -p `cat "$PID"` > /dev/null; then
|
if ps -p `cat "$PID"` > /dev/null; then
|
||||||
if [ -e /usr/bin/gio ]; then
|
xdg-open "file://${BASE}/openmedialibrary/static/html/load.html"
|
||||||
gio open "file://${BASE}/openmedialibrary/static/html/load.html"
|
|
||||||
else
|
|
||||||
xdg-open "file://${BASE}/openmedialibrary/static/html/load.html"
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
$PYTHON "${NAME}/oml/gtkstatus.py" $@
|
$PYTHON "${NAME}/oml/gtkstatus.py" $@
|
||||||
exit $?
|
exit $?
|
||||||
|
|
|
||||||
|
|
@ -38,13 +38,13 @@ def json_dumps(obj):
|
||||||
return json.dumps(obj, indent=indent, default=_to_json, ensure_ascii=False).encode()
|
return json.dumps(obj, indent=indent, default=_to_json, ensure_ascii=False).encode()
|
||||||
|
|
||||||
def run_async(func):
|
def run_async(func):
|
||||||
@wraps(func)
|
@wraps(func)
|
||||||
def async_func(*args, **kwargs):
|
def async_func(*args, **kwargs):
|
||||||
func_hl = Thread(target=func, args=args, kwargs=kwargs)
|
func_hl = Thread(target = func, args = args, kwargs = kwargs)
|
||||||
func_hl.start()
|
func_hl.start()
|
||||||
return func_hl
|
return func_hl
|
||||||
|
|
||||||
return async_func
|
return async_func
|
||||||
|
|
||||||
def trim(docstring):
|
def trim(docstring):
|
||||||
if not docstring:
|
if not docstring:
|
||||||
|
|
|
||||||
10
oml/utils.py
10
oml/utils.py
|
|
@ -264,10 +264,7 @@ def open_file(path=None):
|
||||||
if sys.platform == 'darwin':
|
if sys.platform == 'darwin':
|
||||||
cmd += ['open', path]
|
cmd += ['open', path]
|
||||||
elif sys.platform.startswith('linux'):
|
elif sys.platform.startswith('linux'):
|
||||||
if os.path.exists('/usr/bin/gio'):
|
cmd += ['xdg-open', path]
|
||||||
cmd += ['gio', 'open', path]
|
|
||||||
else:
|
|
||||||
cmd += ['xdg-open', path]
|
|
||||||
elif sys.platform == 'win32':
|
elif sys.platform == 'win32':
|
||||||
path = '\\'.join(path.split('/'))
|
path = '\\'.join(path.split('/'))
|
||||||
os.startfile(path)
|
os.startfile(path)
|
||||||
|
|
@ -288,10 +285,7 @@ def open_folder(folder=None, path=None):
|
||||||
path = folder
|
path = folder
|
||||||
cmd += ['open', '-R', path]
|
cmd += ['open', '-R', path]
|
||||||
elif sys.platform.startswith('linux'):
|
elif sys.platform.startswith('linux'):
|
||||||
if os.path.exists('/usr/bin/gio'):
|
cmd += ['xdg-open', folder]
|
||||||
cmd += ['gio', 'open', folder]
|
|
||||||
else:
|
|
||||||
cmd += ['xdg-open', folder]
|
|
||||||
elif sys.platform == 'win32':
|
elif sys.platform == 'win32':
|
||||||
path = '\\'.join(path.split('/'))
|
path = '\\'.join(path.split('/'))
|
||||||
cmd = 'explorer.exe /select,"%s"' % path
|
cmd = 'explorer.exe /select,"%s"' % path
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue