Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/extension manager #76

Merged
merged 199 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
199 commits
Select commit Hold shift + click to select a range
96fbdcc
init: JSON Read func, refs instead of raw pointers
dnzbk Nov 6, 2023
c2ef1b5
add: boost license info
dnzbk Nov 6, 2023
ba1bf4c
find manifest test
dnzbk Nov 6, 2023
9627f18
use static
dnzbk Nov 7, 2023
14f7bff
basic strategies
dnzbk Nov 8, 2023
a07b874
Merge branch 'develop' into feature/script-manifests
dnzbk Nov 8, 2023
cf22f3a
Added: Header Config Based strategy
dnzbk Nov 9, 2023
6cdfb09
Uncomment loader, fixed declaration
dnzbk Nov 9, 2023
f93c81d
use smart pointer, refactoring
dnzbk Nov 11, 2023
b3b7ec6
fix: condition, use std::string
dnzbk Nov 12, 2023
33ca646
Loader: done
dnzbk Nov 13, 2023
4859367
clean up
dnzbk Nov 13, 2023
c53aa91
Add: test bin addon
dnzbk Nov 13, 2023
c13268b
Add: Email manifest
dnzbk Nov 13, 2023
4ecdf99
Add: parse options, commands, task
dnzbk Nov 13, 2023
0c07599
Fix: static linking
dnzbk Nov 15, 2023
d79888a
Merge branch 'develop' into feature/script-manifests
dnzbk Nov 23, 2023
c7665bb
Merge, JSON tests
dnzbk Nov 23, 2023
c8661da
Fix: formatting
dnzbk Nov 24, 2023
9b6e716
Add: src files
dnzbk Nov 24, 2023
d65c628
Add: Boost json dependency
dnzbk Nov 27, 2023
6cd1da0
Add: manifest validation, tests
dnzbk Nov 27, 2023
577424a
Fix: script naming conflicts
dnzbk Nov 27, 2023
a966610
Fix: posix build, do not check boost version
dnzbk Nov 27, 2023
96b3385
Fix: Namespace name
dnzbk Nov 28, 2023
9d147d4
Add: filter
dnzbk Nov 28, 2023
8eac8bc
Refactor: use 'taskTime' instead of 'task'
dnzbk Nov 28, 2023
cabeef1
Add: queue events
dnzbk Nov 28, 2023
f2f23cc
Refactor: manifest based extension loader optimization
dnzbk Nov 28, 2023
ed593fe
Add: Options and Commands parsing init
dnzbk Nov 28, 2023
a005257
Add: ddescription, taskTime, queueEvents parsing
dnzbk Nov 29, 2023
2c9e893
Add: header config parser
dnzbk Nov 29, 2023
dab9b8b
Add: tests
dnzbk Nov 29, 2023
780cbd9
Add: author, version, description, license
dnzbk Nov 29, 2023
74dc291
Add: Serialize to JSON
dnzbk Dec 1, 2023
62f6291
Merge branch 'develop' into feature/extensions
dnzbk Dec 1, 2023
ee2b127
Refactor: use 'main' instead of entry
dnzbk Dec 1, 2023
03d96cf
Add: init communication
dnzbk Dec 1, 2023
23c31c9
Refactor: Move BuildScriptName to loader
dnzbk Dec 1, 2023
f29084f
Add: use libxml2 on Windows
dnzbk Dec 4, 2023
ba566ee
Update SETUP.md
dnzbk Dec 4, 2023
65dcd00
Formating
dnzbk Dec 4, 2023
593ce25
Rename SETUP to INSTALLATION
dnzbk Dec 4, 2023
2e5f60a
Fix: INSTALLATION header
dnzbk Dec 4, 2023
e779e89
Merge branch 'feature/libxml2' into feature/extensions
dnzbk Dec 4, 2023
a3c5883
Merge conflicts
dnzbk Dec 4, 2023
0be7446
Add: init extension manager
dnzbk Dec 4, 2023
a8d348d
Add: ExtensionManager
dnzbk Dec 5, 2023
969ef4a
Add: tests
dnzbk Dec 6, 2023
f390960
Init: webui refactoring
dnzbk Dec 6, 2023
55f9504
Fix: toJson and tests
dnzbk Dec 7, 2023
b3bb9ad
Fix: webui
dnzbk Dec 7, 2023
463b215
Fix: commands
dnzbk Dec 7, 2023
6c87a59
Add: Type info
dnzbk Dec 8, 2023
d3e5604
Merge branch 'develop' into feature/extensions
dnzbk Dec 8, 2023
11ec6e3
Fix: g_ExtensionManager
dnzbk Dec 8, 2023
ebaae82
Refactor: clean up config template response
dnzbk Dec 8, 2023
120a0ba
Add: init xml serialization
dnzbk Dec 8, 2023
5d8ad04
Add: xml support
dnzbk Dec 11, 2023
0f93b69
Refactor: use ExtensionManager instead of ScriptConfig
dnzbk Dec 11, 2023
22681f7
Add: error handling
dnzbk Dec 11, 2023
cce635a
Refactor: clean uo ScriptConfig
dnzbk Dec 11, 2023
00a328b
Fix: merge conflicts
dnzbk Dec 11, 2023
af0f674
Fix: webui
dnzbk Dec 11, 2023
c8f42f6
Add extension caption
dnzbk Dec 12, 2023
1be542c
Add: homepage and about
dnzbk Dec 12, 2023
da0cbd4
Fix: Description and About
dnzbk Dec 12, 2023
6b97841
Fix: check commas
dnzbk Dec 12, 2023
27e5414
Merge branch 'develop' into feature/extensions
dnzbk Dec 14, 2023
e5b588d
Fix: manifest validation
dnzbk Dec 14, 2023
322dfbe
Add: requirements
dnzbk Dec 14, 2023
0450358
Refactoring: add comments
dnzbk Dec 14, 2023
530e562
remove line
dnzbk Dec 15, 2023
82c4673
leave only new scripts
dnzbk Dec 15, 2023
ae7b739
Update: INSTALLATION.md
dnzbk Dec 15, 2023
b54434f
Merge branch 'develop' into feature/extensions
dnzbk Dec 15, 2023
112bbc3
formatting
dnzbk Dec 15, 2023
7908d6a
Add: new sripts to Makefile
dnzbk Dec 15, 2023
f3f5d7d
Fix: windows build
dnzbk Dec 15, 2023
6121b0e
Fix: linux build
dnzbk Dec 15, 2023
c14b535
Clean up: delete redundant rvalues, console.warn
dnzbk Dec 18, 2023
923df44
Add: macOS build
dnzbk Dec 18, 2023
e84900c
Fix: boost lib and includes path
dnzbk Dec 18, 2023
6544009
Refactor: fetch tar.gz instead of src due to speed
dnzbk Dec 18, 2023
2809ccf
Fix: wrong curl flags
dnzbk Dec 18, 2023
9586a54
Add Synology boost-json build
phnzb Dec 18, 2023
0310eb1
Merge branch 'feature/extensions' of github.com:nzbgetcom/nzbget into…
phnzb Dec 18, 2023
eef935b
Refactor: use array of lines instead of string
dnzbk Dec 19, 2023
4d630ed
Fix: option and command name in webui
dnzbk Dec 19, 2023
d04ac6d
Email: formatting
dnzbk Dec 20, 2023
2e1b5e9
Remove code_revision
dnzbk Dec 20, 2023
810c168
Fix: redundant copy
dnzbk Dec 21, 2023
2872a0e
Increase synology build jobs
phnzb Dec 21, 2023
35cbe9f
Docker build fixes
phnzb Dec 22, 2023
ab8643f
Merge branch 'feature/extensions' of github.com:nzbgetcom/nzbget into…
phnzb Dec 22, 2023
81b0cf9
Add: numbers support
dnzbk Dec 23, 2023
39ec1f0
Remove redundant line
dnzbk Dec 23, 2023
f667cf6
Fix: script names in webui
dnzbk Dec 23, 2023
1e8ee32
Add: explicit noexcept keywords for readability
dnzbk Dec 23, 2023
f2d2a2e
init
dnzbk Dec 25, 2023
365ed9a
Init: extension deletion
dnzbk Dec 26, 2023
bba36a5
tmp
dnzbk Dec 26, 2023
602361d
Fix: extension entry path
dnzbk Dec 26, 2023
f87287c
Extension delete debug
dnzbk Dec 27, 2023
e8d99e1
Add: fetch extensions.json
dnzbk Dec 27, 2023
e3c9366
Merge branch 'develop' into feature/extensions
dnzbk Dec 27, 2023
ef88863
Merge branch 'feature/extensions' into feature/extension-downloader
dnzbk Dec 27, 2023
94d04e9
Fix: seg fault
dnzbk Dec 27, 2023
b906eac
Fix: comparator on Windows
dnzbk Dec 27, 2023
c985f82
Merge branch 'feature/extensions' into feature/extension-downloader
dnzbk Dec 27, 2023
da2cd92
Add: downalod extension command, fixed extensionsUrl
dnzbk Dec 28, 2023
52cb77b
Change dest dir
dnzbk Dec 28, 2023
86c9489
Delete conf options checkbox
dnzbk Dec 29, 2023
c263a3a
temp
dnzbk Dec 29, 2023
4bfcbec
Fix: webui script names
dnzbk Dec 29, 2023
07ad65a
Merge branch 'feature/extensions' into feature/extension-downloader
dnzbk Dec 29, 2023
a86cb00
Add: delete extension dir or file
dnzbk Jan 3, 2024
4c8f0f2
Add more unit tests
dnzbk Jan 3, 2024
6aaf39f
Add: unpack and install extension
dnzbk Jan 9, 2024
56e8690
Add: updater
dnzbk Jan 10, 2024
282edc6
Fix: now way to delete when extension is outdated
dnzbk Jan 10, 2024
9ef2f40
Fix: Update btn color
dnzbk Jan 10, 2024
ae9397b
Fix: launching without a file extension on POSIX systems
dnzbk Jan 11, 2024
6976c12
Fix: Save All Changes button removes extensions saved settings
dnzbk Jan 12, 2024
5301403
Fix: compiler warnings
dnzbk Jan 12, 2024
3600df1
Refactoring: extension manager ui
dnzbk Jan 15, 2024
1f9accc
Add: loader and error banners
dnzbk Jan 16, 2024
9d6bbc4
clean up
dnzbk Jan 16, 2024
ed72683
Delete scripts
dnzbk Jan 16, 2024
5faf8a0
Fix: bold font
dnzbk Jan 16, 2024
fdca42d
delete unused arg
dnzbk Jan 16, 2024
f9b49f8
Fix: update if multiple Script dirs
dnzbk Jan 17, 2024
85eaf63
Fix: rootdir
dnzbk Jan 17, 2024
c70b5d8
Fix: extension deletion data race
dnzbk Jan 18, 2024
7eee232
Improve error messages
dnzbk Jan 18, 2024
1ffd1da
Fix: Delete config options checkobx
dnzbk Jan 18, 2024
096a95d
Add: Delete extension test
dnzbk Jan 18, 2024
09f0b93
rename test
dnzbk Jan 18, 2024
9c6ee58
fix: warning
dnzbk Jan 18, 2024
1881548
Update: extensions.json url
dnzbk Jan 18, 2024
a8bfb60
Merge branch 'develop' into feature/extensions
dnzbk Jan 18, 2024
5bae9d5
Remove: mention of the Logger and EMail in synology readme
dnzbk Jan 18, 2024
9ab9404
Fix: 7zipCmd can be empty
dnzbk Jan 18, 2024
5b77c9f
Fix: BString conversion
dnzbk Jan 18, 2024
9e15733
Delete: scripts dir from linux app installer
dnzbk Jan 18, 2024
b6c4b19
revert scripts dir
dnzbk Jan 18, 2024
8c584bc
revert entrypoint.sh
dnzbk Jan 18, 2024
ad810f5
revert scripts dir in Makefile
dnzbk Jan 18, 2024
658b7b0
Fix: cp scripts dir even if it's empty
dnzbk Jan 18, 2024
497b2f4
Fix: scripts dir
dnzbk Jan 19, 2024
119a4da
Fix: restore settings
dnzbk Jan 19, 2024
dd8469f
Add: configure button
dnzbk Jan 19, 2024
bf3bfaa
Delete extension dropdown
dnzbk Jan 19, 2024
7aa5cf6
reorder list
dnzbk Jan 19, 2024
0611001
Add: active column
dnzbk Jan 22, 2024
5ae9d63
Add: show/hide Save all changes btn
dnzbk Jan 22, 2024
48587a4
Fix: typo
dnzbk Jan 22, 2024
43dbc99
Add: extension manager about
dnzbk Jan 22, 2024
dfe81d3
Add: activate/deactivate ext buttons
dnzbk Jan 23, 2024
1dc0e18
Add: ordering
dnzbk Jan 23, 2024
efc1a88
Fix: order
dnzbk Jan 23, 2024
a3c0481
Add:: additional space between extension manager and other extensions
dnzbk Jan 24, 2024
976c98b
Clean up
dnzbk Jan 24, 2024
3459a07
br instead of hr
dnzbk Jan 24, 2024
bbdda96
Add: ie11 support
dnzbk Jan 24, 2024
0271410
fix: order
dnzbk Jan 24, 2024
77fd5fc
Fix: deletion of saved settings
dnzbk Jan 24, 2024
bff9d10
remove useless code
dnzbk Jan 24, 2024
49ef95f
Fix: ordering
dnzbk Jan 24, 2024
8be7439
Fix: realod extensions
dnzbk Jan 25, 2024
90d4737
Add: test extension button
dnzbk Jan 25, 2024
100200b
Fix: deletion during execution
dnzbk Jan 25, 2024
8612b79
Fix: tests
dnzbk Jan 25, 2024
c6583a4
try to fix macOS build
dnzbk Jan 25, 2024
ee2e234
Fix: build on macOS/linux, resolve warnings
dnzbk Jan 25, 2024
f04cdc6
Fix: icon name
dnzbk Jan 25, 2024
fa9a248
Fix: shelloveride
dnzbk Jan 25, 2024
20f8a47
Activate ext anyway
dnzbk Jan 26, 2024
3681d14
cleanup
dnzbk Jan 26, 2024
e6c6934
Fix: macos/linux build
dnzbk Jan 26, 2024
374b24d
Disable all btns during checking
dnzbk Jan 26, 2024
208858d
Fix: mouseover
dnzbk Jan 26, 2024
7f50bbf
Merge branch 'develop' into feature/extensions
dnzbk Jan 26, 2024
2b85a25
Refactor: mutex name, includes
dnzbk Jan 29, 2024
0ec88ec
Delete: unused About
dnzbk Jan 31, 2024
de5edcf
Fix: show extension manager even if there are no extensions
dnzbk Jan 31, 2024
108e8d2
Fix: –haveExtensions
dnzbk Jan 31, 2024
8fdb91d
Fix: check tmp file data race
dnzbk Jan 31, 2024
206df6a
info name
dnzbk Jan 31, 2024
62a6cd1
Fix: includes
dnzbk Jan 31, 2024
e009784
Fix: includes
dnzbk Jan 31, 2024
114b832
fix includes
dnzbk Feb 1, 2024
c81257a
Fix: noexcepts for std=c++11
dnzbk Feb 1, 2024
7fa787e
Merge branch 'develop' into feature/extensions
dnzbk Feb 2, 2024
4292be1
Merge branch 'develop' into feature/extensions
dnzbk Feb 2, 2024
f779ded
Delete useless IOptions
dnzbk Feb 5, 2024
c1cc92d
Use const Extension::Script
dnzbk Feb 5, 2024
07ba15e
remove unused comment
dnzbk Feb 5, 2024
ecfc88d
fix: gitkeep typo
dnzbk Feb 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ set(CMAKE_BUILD_TYPE "Release" CACHE STRING "")
find_package(OpenSSL REQUIRED)
find_package(ZLIB REQUIRED)
find_package(LibXml2 REQUIRED)
find_package(Boost REQUIRED COMPONENTS json)

if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -Weverything")
Expand Down
22 changes: 16 additions & 6 deletions INSTALLATION.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# NZBGet installation
# NZBGet installation

This is a short documentation. For more information please
visit NZBGet home page at
Expand Down Expand Up @@ -62,29 +62,34 @@ NZBGet absolutely needs the following libraries:

- libstdc++ (usually part of compiler)
- [libxml2](https://gitlab.gnome.org/GNOME/libxml2/-/wikis/home)
- [Boost.JSON](https://www.boost.org/doc/libs/1_84_0/libs/json/doc/html/index.html)
- [Boost.Optional](https://www.boost.org/doc/libs/1_84_0/libs/optional/doc/html/index.html)

And the following libraries are optional:

- for curses-output-mode (enabled by default):
For curses-output-mode (enabled by default):
- libcurses (usually part of commercial systems)
or (better)
- [libncurses](https://invisible-island.net/ncurses)

- for encrypted connections (TLS/SSL):
For encrypted connections (TLS/SSL):
- [OpenSSL](https://www.openssl.org)

or
- [GnuTLS](https://gnutls.org)

- for gzip support in web-server and web-client (enabled by default):
For gzip support in web-server and web-client (enabled by default):
- [zlib](https://www.zlib.net/)

- for configuration:
For configuration:
- [autotools](https://www.gnu.org/software/automake/manual/html_node/Autotools-Introduction.html)
- [autoconf](https://www.gnu.org/software/autoconf/)

- for managing package dependencies:
For managing package dependencies:
- [pkg-config](https://www.freedesktop.org/wiki/Software/pkg-config/)

For tests:
- [Boost.Test](https://www.boost.org/doc/libs/1_84_0/libs/test/doc/html/index.html)

All these libraries are included in modern POSIX distributions and
should be available as installable packages. Please note that you also
Expand Down Expand Up @@ -219,6 +224,11 @@ Also required are:
- [Regex](https://regexlib.com/)
- [Zlib](https://gnuwin32.sourceforge.net/packages/zlib.htm)
- [libxml2](https://gitlab.gnome.org/GNOME/libxml2/-/wikis/home)
- [Boost.JSON](https://www.boost.org/doc/libs/1_84_0/libs/json/doc/html/index.html)
- [Boost.Optional](https://www.boost.org/doc/libs/1_84_0/libs/optional/doc/html/index.html)

For tests:
- [Boost.Test](https://www.boost.org/doc/libs/1_84_0/libs/test/doc/html/index.html)

We recommend using [vcpkg](https://vcpkg.io/) to install dependencies.

Expand Down
68 changes: 16 additions & 52 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ nzbget_SOURCES = \
daemon/extension/SchedulerScript.h \
daemon/extension/ScriptConfig.cpp \
daemon/extension/ScriptConfig.h \
daemon/extension/Extension.cpp \
daemon/extension/Extension.h \
daemon/extension/ExtensionManager.cpp \
daemon/extension/ExtensionManager.h \
daemon/extension/ExtensionLoader.cpp \
daemon/extension/ExtensionLoader.h \
daemon/extension/ManifestFile.cpp \
daemon/extension/ManifestFile.h \
daemon/feed/FeedCoordinator.cpp \
daemon/feed/FeedCoordinator.h \
daemon/feed/FeedFile.cpp \
Expand Down Expand Up @@ -158,6 +166,10 @@ nzbget_SOURCES = \
daemon/util/Service.h \
daemon/util/FileSystem.cpp \
daemon/util/FileSystem.h \
daemon/util/Json.cpp \
daemon/util/Json.h \
daemon/util/Xml.cpp \
daemon/util/Xml.h \
daemon/util/Util.cpp \
daemon/util/Util.h \
daemon/nserv/NServMain.h \
Expand Down Expand Up @@ -353,6 +365,8 @@ webui_FILES = \
webui/lib/raphael.min.js \
webui/lib/elycharts.js \
webui/lib/elycharts.min.js \
webui/img/house-16.ico \
webui/img/download-16.ico \
webui/img/icons.png \
webui/img/icons-2x.png \
webui/img/transmit.gif \
Expand All @@ -364,64 +378,13 @@ webui_FILES = \
webui/img/favicon-256x256-opaque.png \
webui/img/favicon-256x256.png

scripts_FILES = \
scripts/EMail.py \
scripts/Logger.py

testdata_FILES = \
tests/testdata/dupematcher1/testfile.part01.rar \
tests/testdata/dupematcher1/testfile.part24.rar \
tests/testdata/dupematcher2/testfile.part04.rar \
tests/testdata/dupematcher2/testfile.part43.rar \
tests/testdata/nzbfile/dotless.nzb \
tests/testdata/nzbfile/dotless.txt \
tests/testdata/nzbfile/plain.nzb \
tests/testdata/nzbfile/plain.txt \
tests/testdata/parchecker/crc.txt \
tests/testdata/parchecker/testfile.dat \
tests/testdata/parchecker/testfile.nfo \
tests/testdata/parchecker/testfile.par2 \
tests/testdata/parchecker/testfile.vol00+1.PAR2 \
tests/testdata/parchecker/testfile.vol01+2.PAR2 \
tests/testdata/parchecker/testfile.vol03+3.PAR2 \
tests/testdata/parchecker2/crc.txt \
tests/testdata/parchecker2/testfile.7z.001 \
tests/testdata/parchecker2/testfile.7z.002 \
tests/testdata/parchecker2/testfile.7z.003 \
tests/testdata/parchecker2/testfile.7z.par2 \
tests/testdata/parchecker2/testfile.7z.vol0+1.PAR2 \
tests/testdata/parchecker2/testfile.7z.vol1+2.PAR2 \
tests/testdata/parchecker2/testfile.7z.vol3+3.PAR2 \
tests/testdata/rarrenamer/testfile3.part01.rar \
tests/testdata/rarrenamer/testfile3.part02.rar \
tests/testdata/rarrenamer/testfile3.part03.rar \
tests/testdata/rarrenamer/testfile5.part01.rar \
tests/testdata/rarrenamer/testfile5.part02.rar \
tests/testdata/rarrenamer/testfile5.part03.rar \
tests/testdata/rarrenamer/testfile3oldnam.rar \
tests/testdata/rarrenamer/testfile3oldnam.r00 \
tests/testdata/rarrenamer/testfile3oldnam.r01 \
tests/testdata/rarrenamer/testfile3encdata.part01.rar \
tests/testdata/rarrenamer/testfile3encdata.part02.rar \
tests/testdata/rarrenamer/testfile3encdata.part03.rar \
tests/testdata/rarrenamer/testfile3encnam.part01.rar \
tests/testdata/rarrenamer/testfile3encnam.part02.rar \
tests/testdata/rarrenamer/testfile3encnam.part03.rar \
tests/testdata/rarrenamer/testfile5encdata.part01.rar \
tests/testdata/rarrenamer/testfile5encdata.part02.rar \
tests/testdata/rarrenamer/testfile5encdata.part03.rar \
tests/testdata/rarrenamer/testfile5encnam.part01.rar \
tests/testdata/rarrenamer/testfile5encnam.part02.rar \
tests/testdata/rarrenamer/testfile5encnam.part03.rar

# Install
dist_doc_DATA = $(doc_FILES)
exampleconfdir = $(datadir)/nzbget
dist_exampleconf_DATA = $(exampleconf_FILES)
webuidir = $(datadir)/nzbget
nobase_dist_webui_DATA = $(webui_FILES)
scriptsdir = $(datadir)/nzbget
nobase_dist_scripts_SCRIPTS = $(scripts_FILES)
scriptsdir = $(datadir)/nzbget/scripts

# Note about "sed":
# We need to make some changes in installed files.
Expand All @@ -434,6 +397,7 @@ nobase_dist_scripts_SCRIPTS = $(scripts_FILES)

# Prepare example configuration file
install-data-hook:
mkdir -p "$(DESTDIR)$(scriptsdir)"
rm -f "$(DESTDIR)$(exampleconfdir)/nzbget.conf.temp"
cp "$(DESTDIR)$(exampleconfdir)/nzbget.conf" "$(DESTDIR)$(exampleconfdir)/nzbget.conf.temp"
sed 's:^ConfigTemplate=:ConfigTemplate=$(exampleconfdir)/nzbget.conf:' < "$(DESTDIR)$(exampleconfdir)/nzbget.conf.temp" > "$(DESTDIR)$(exampleconfdir)/nzbget.conf"
Expand Down
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ AC_DEFINE(HAVE_CONFIG_H, 1, [Define to 1 use config.h])
AM_MAINTAINER_MODE

m4_include([posix/ax_cxx_compile_stdcxx.m4])
m4_include([posix/ax_boost_json.m4])

AX_BOOST_JSON

dnl
dnl Check for programs.
Expand Down Expand Up @@ -77,6 +79,7 @@ AC_SEARCH_LIBS([socket], [socket])
AC_SEARCH_LIBS([inet_addr], [nsl])
AC_SEARCH_LIBS([hstrerror], [resolv])

AC_CHECK_LIB([boost_json], [main], [], [AC_MSG_ERROR([Could not find Boost.JSON library])])

dnl
dnl Android NDK restrictions
Expand Down
8 changes: 4 additions & 4 deletions daemon/extension/CommandScript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ bool CommandScriptController::StartScript(const char* scriptName, const char* co

scriptController->Start();

for (ScriptConfig::Script& script : g_ScriptConfig->GetScripts())
for (const auto script : g_ExtensionManager->GetExtensions())
{
if (FileSystem::SameFilename(scriptName, script.GetName()))
if (strcmp(scriptName, script->GetName()) == 0)
{
return true;
}
Expand All @@ -56,11 +56,11 @@ void CommandScriptController::Run()
ExecuteScriptList(m_script);
}

void CommandScriptController::ExecuteScript(ScriptConfig::Script* script)
void CommandScriptController::ExecuteScript(std::shared_ptr<const Extension::Script> script)
{
PrintMessage(Message::mkInfo, "Executing script %s with command %s", script->GetName(), *m_command);

SetArgs({script->GetLocation()});
SetArgs({script->GetEntry()});

BString<1024> infoName("script %s with command %s", script->GetName(), *m_command);
SetInfoName(infoName);
Expand Down
2 changes: 1 addition & 1 deletion daemon/extension/CommandScript.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class CommandScriptController : public Thread, public NzbScriptController
static bool StartScript(const char* scriptName, const char* command, std::unique_ptr<Options::OptEntries> modifiedOptions);

protected:
virtual void ExecuteScript(ScriptConfig::Script* script);
virtual void ExecuteScript(std::shared_ptr<const Extension::Script> script);
virtual void AddMessage(Message::EKind kind, const char* text);
virtual const char* GetOptValue(const char* name, const char* value);

Expand Down
Loading
Loading