Skip to content

Commit

Permalink
#44, Fix the issue when on DSM 7.1.1 RRM can't fetch task list. Impro…
Browse files Browse the repository at this point in the history
…ve erro handling
  • Loading branch information
yuriiNazarenkoTine committed Nov 17, 2024
1 parent acac2d0 commit 1c7872d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 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 = 76
SPK_REV = 77
SPK_ICON = src/rr-manager.png

DSM_UI_DIR = app
Expand Down
9 changes: 5 additions & 4 deletions src/src/tabs/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ export default
);
}
} catch (error) {
console.error('Error checking or creating tasks:', error);
self.showMsg(`Error checking or creating RRM tasks: ${error}`);
console.error(`Error checking or creating RRM tasks: ${error}`);
}
},
showPasswordConfirmDialog: function (taskName) {
Expand Down Expand Up @@ -243,7 +244,8 @@ export default
self.apiProvider.getPackagesList(),
self.apiProvider.checkRRVersion()
]);

self.systemInfo = systemInfo;
self.__checkDownloadFolder(self.__checkRequiredTasks.bind(self));
if (systemInfo && packages) {
self.rrCheckVersion = rrCheckVersion;
//TODO: implement localization
Expand Down Expand Up @@ -292,8 +294,7 @@ export default
self.showMsg(`Error during RRM initialization: ${error}`);
return;
}
})();
self.__checkDownloadFolder(self.__checkRequiredTasks.bind(self));
})();
},
isUpdateAvailable: function (rrCheckVersion) {
return rrCheckVersion?.status == "update available"
Expand Down
8 changes: 4 additions & 4 deletions src/src/utils/synoApiProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default
that = this;
return new Promise((resolve, reject) => {
let params = {
additional: ["maintainer","dsm_app_launch_name", "url", "available_operation", "install_type"],
additional: ["maintainer", "dsm_app_launch_name", "url", "available_operation", "install_type"],
ignore_hidden: false,
};
let args = {
Expand All @@ -50,10 +50,10 @@ export default
let args = {
api: 'SYNO.Core.TaskScheduler',
method: 'list',
version: 3,
version: 2,
params: params,
callback: function (success, message) {
success ? resolve(message) : reject('Unable to get packages!');
callback: function (success, response) {
success ? resolve(response) : reject(`Unable to get DSM task list!, success: ${success}, code: ${response.code}`);
}
};
that.sendWebAPI(args);
Expand Down

0 comments on commit 1c7872d

Please sign in to comment.