Merge pull request #587 from WebTools-NG/#586-Export-Episodes-containing-Export-Season-Posters-fails-to-proceed

Fix #586
This commit is contained in:
Tommy Mikkelsen 2022-09-04 23:28:38 +02:00 committed by GitHub
commit c351958878
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -128,6 +128,7 @@ ipcMain.on('downloadFile', function (event, data) {
axios({
method: 'GET',
url: item,
headers: data.header,
responseType: 'stream',
httpsAgent: agent
}).then((response) => {

View file

@ -1163,6 +1163,9 @@ const etHelper = new class ETHELPER {
}
async forceDownload( { url: url, target: target, title: title } ) {
let header = wtutils.PMSHeader;
header['X-Plex-Token'] = store.getters.getSelectedServer.accessToken;
const _this = this;
return new Promise((resolve) => {
try
@ -1170,7 +1173,8 @@ const etHelper = new class ETHELPER {
_this.isDownloading = true;
ipcRenderer.send('downloadFile', {
item: url,
filePath: target
filePath: target,
header: header
})
}
catch (error)