mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-19 21:03:14 -07:00
add remote path handling for LazyLibrarian #1223
This commit is contained in:
parent
52cae37609
commit
5375d46c32
3 changed files with 26 additions and 2 deletions
|
@ -12,7 +12,12 @@ import requests
|
||||||
import core
|
import core
|
||||||
from core import logger
|
from core import logger
|
||||||
from core.auto_process.common import ProcessResult
|
from core.auto_process.common import ProcessResult
|
||||||
from core.utils import convert_to_ascii, server_responding
|
from core.utils import (
|
||||||
|
convert_to_ascii,
|
||||||
|
remote_dir,
|
||||||
|
server_responding,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
requests.packages.urllib3.disable_warnings()
|
requests.packages.urllib3.disable_warnings()
|
||||||
|
|
||||||
|
@ -28,6 +33,7 @@ def process(section, dir_name, input_name=None, status=0, client_agent='manual',
|
||||||
ssl = int(cfg.get('ssl', 0))
|
ssl = int(cfg.get('ssl', 0))
|
||||||
web_root = cfg.get('web_root', '')
|
web_root = cfg.get('web_root', '')
|
||||||
protocol = 'https://' if ssl else 'http://'
|
protocol = 'https://' if ssl else 'http://'
|
||||||
|
remote_path = int(cfg.get('remote_path', 0))
|
||||||
|
|
||||||
url = '{0}{1}:{2}{3}/api'.format(protocol, host, port, web_root)
|
url = '{0}{1}:{2}{3}/api'.format(protocol, host, port, web_root)
|
||||||
if not server_responding(url):
|
if not server_responding(url):
|
||||||
|
@ -42,7 +48,7 @@ def process(section, dir_name, input_name=None, status=0, client_agent='manual',
|
||||||
params = {
|
params = {
|
||||||
'apikey': apikey,
|
'apikey': apikey,
|
||||||
'cmd': 'forceProcess',
|
'cmd': 'forceProcess',
|
||||||
'dir': dir_name,
|
'dir': remote_dir(dir_name) if remote_path else dir_name,
|
||||||
}
|
}
|
||||||
logger.debug('Opening URL: {0} with params: {1}'.format(url, params), section)
|
logger.debug('Opening URL: {0} with params: {1}'.format(url, params), section)
|
||||||
|
|
||||||
|
|
|
@ -59,6 +59,19 @@
|
||||||
# set this to where your LazyLibrarian completed downloads are.
|
# set this to where your LazyLibrarian completed downloads are.
|
||||||
#llwatch_dir=
|
#llwatch_dir=
|
||||||
|
|
||||||
|
# LazyLibrarian and NZBGet are a different system (0, 1).
|
||||||
|
#
|
||||||
|
# Enable to replace local path with the path as per the mountPoints below.
|
||||||
|
#llremote_path=0
|
||||||
|
|
||||||
|
## Network
|
||||||
|
|
||||||
|
# Network Mount Points (Needed for remote path above)
|
||||||
|
#
|
||||||
|
# Enter Mount points as LocalPath,RemotePath and separate each pair with '|'
|
||||||
|
# e.g. mountPoints=/volume1/Public/,E:\|/volume2/share/,\\NAS\
|
||||||
|
#mountPoints=
|
||||||
|
|
||||||
## Posix
|
## Posix
|
||||||
|
|
||||||
# Niceness for external tasks Extractor and Transcoder.
|
# Niceness for external tasks Extractor and Transcoder.
|
||||||
|
|
|
@ -444,6 +444,11 @@
|
||||||
# set this to where your LazyLibrarian completed downloads are.
|
# set this to where your LazyLibrarian completed downloads are.
|
||||||
#llwatch_dir=
|
#llwatch_dir=
|
||||||
|
|
||||||
|
# LazyLibrarian and NZBGet are a different system (0, 1).
|
||||||
|
#
|
||||||
|
# Enable to replace local path with the path as per the mountPoints below.
|
||||||
|
#llremote_path=0
|
||||||
|
|
||||||
## Network
|
## Network
|
||||||
|
|
||||||
# Network Mount Points (Needed for remote path above)
|
# Network Mount Points (Needed for remote path above)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue