mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-03-12 12:35:28 -07:00
add remote path handling for LazyLibrarian #1223
This commit is contained in:
parent
52cae37609
commit
5375d46c32
@ -12,7 +12,12 @@ import requests
|
||||
import core
|
||||
from core import logger
|
||||
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()
|
||||
|
||||
@ -28,6 +33,7 @@ def process(section, dir_name, input_name=None, status=0, client_agent='manual',
|
||||
ssl = int(cfg.get('ssl', 0))
|
||||
web_root = cfg.get('web_root', '')
|
||||
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)
|
||||
if not server_responding(url):
|
||||
@ -42,7 +48,7 @@ def process(section, dir_name, input_name=None, status=0, client_agent='manual',
|
||||
params = {
|
||||
'apikey': apikey,
|
||||
'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)
|
||||
|
||||
|
@ -59,6 +59,19 @@
|
||||
# set this to where your LazyLibrarian completed downloads are.
|
||||
#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
|
||||
|
||||
# Niceness for external tasks Extractor and Transcoder.
|
||||
|
@ -444,6 +444,11 @@
|
||||
# set this to where your LazyLibrarian completed downloads are.
|
||||
#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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user