This commit is contained in:
Tommy Mikkelsen 2021-06-06 23:59:36 +02:00
parent 28df1eec66
commit c99ad306ba
4 changed files with 1378 additions and 422 deletions

View file

@ -3,6 +3,7 @@
## V0.3.11
* [#384 I need better error logging for Poster Export](https://github.com/WebTools-NG/WebTools-NG/issues/384)
* [#382 Exporting Posters and Art not working](https://github.com/WebTools-NG/WebTools-NG/issues/382)
## V0.3.10

1764
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -42,6 +42,7 @@
"levenary": "^1.1.1",
"minimist": "^1.2.5",
"node-fetch": "^2.6.1",
"node-sass": "^6.0.0",
"popper.js": "^1.16.1",
"rimraf": "^2.7.1",
"secure-ls": "^1.2.6",

View file

@ -1174,15 +1174,30 @@ const excel2 = new class Excel {
async forceDownload(url, target) {
const _this = this;
return new Promise((resolve, reject) => {
try
{
_this.isDownloading = true;
ipcRenderer.send('downloadFile', {
item: url,
filePath: target
})
}
catch (error)
{
log.error(`Exception in et.js forceDownload was: ${error}`);
}
ipcRenderer.on('downloadEnd', () => {
try
{
ipcRenderer.removeAllListeners('downloadEnd');
ipcRenderer.removeAllListeners('downloadError');
resolve(target);
}
catch (error)
{
log.error(`Exception in et.js forceDownload-downloadEnd was: ${error}`);
}
})
ipcRenderer.on('downloadError', (event, error) => {
@ -1223,7 +1238,8 @@ const excel2 = new class Excel {
let title = String(JSONPath({path: '$.title', json: data})[0]);
// Get resolutions to export as
for(let res of resolutions) {
const fileName = key + '_' + title + '_' + res.trim() + '.jpg'
const fileName = key + '_' + title + '_' + res.trim().replace("*", "x"); + '.jpg';
let outFile = path.join(
ExpDir,
fileName