mirror of
https://github.com/WebTools-NG/WebTools-NG
synced 2024-11-22 19:13:19 +00:00
Fix #586
This commit is contained in:
parent
667b75409c
commit
0c0298a402
2 changed files with 6 additions and 1 deletions
|
@ -128,6 +128,7 @@ ipcMain.on('downloadFile', function (event, data) {
|
|||
axios({
|
||||
method: 'GET',
|
||||
url: item,
|
||||
headers: data.header,
|
||||
responseType: 'stream',
|
||||
httpsAgent: agent
|
||||
}).then((response) => {
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue