Skip to content

Commit

Permalink
#44, Fix creating the tasks on DSM 7.1.1 and 7.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriiNazarenkoTine committed Nov 17, 2024
1 parent 1c7872d commit 330c4dc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SPK_NAME = rr-manager
SPK_VERS = 2.0
SPK_REV = 77
SPK_REV = 78
SPK_ICON = src/rr-manager.png

DSM_UI_DIR = app
Expand Down
3 changes: 3 additions & 0 deletions src/src/tabs/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,9 @@ export default
self.apiProvider.checkRRVersion()
]);
self.systemInfo = systemInfo;
var isModernDSM = systemInfo.version_string.includes("7.2.2");
self.apiProvider.setIsModernDSM(isModernDSM);

self.__checkDownloadFolder(self.__checkRequiredTasks.bind(self));
if (systemInfo && packages) {
self.rrCheckVersion = rrCheckVersion;
Expand Down
10 changes: 7 additions & 3 deletions src/src/utils/synoApiProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@ export default
SYNOCOMMUNITY.RRManager.SynoApiProvider = {
sendWebAPI: null,
_prefix: '/webman/3rdparty/rr-manager/scripts/',
init: function (sendWebAPI, findAppWindow) {
init: function (sendWebAPI, isModernDSM = true) {
this.sendWebAPI = sendWebAPI;
this.isModernDSM = isModernDSM;
},
setIsModernDSM: function (isModernDSM) {
this.isModernDSM = isModernDSM;
},
getSytemInfo: function () {
that = this;
Expand Down Expand Up @@ -127,7 +131,7 @@ export default
let args = {
api: "SYNO.Core.User.PasswordConfirm",
method: "auth",
version: 2,
version: self.isModernDSM ? 2 : 1,
params: {
password: data
}, callback: function (success, message) {
Expand Down Expand Up @@ -159,7 +163,7 @@ export default
}

let args = {
api: token != "" ? "SYNO.Core.EventScheduler.Root" : "SYNO.Core.EventScheduler",
api: token ? "SYNO.Core.EventScheduler.Root" : "SYNO.Core.EventScheduler",
method: "create",
version: 1,
params: params,
Expand Down

0 comments on commit 330c4dc

Please sign in to comment.