Compare commits

...

7 commits

Author SHA1 Message Date
AnimeDL
64c927c761 Fix Docker Release + Documentation 2024-08-15 19:28:29 +00:00
AnimeDL
16e7fcb71e Fix Docker Release 2024-08-15 12:27:56 -07:00
AnimeDL
d61d7e471f
Update docker.yml
Change docker account
2024-08-15 11:40:39 -07:00
AnimeDL
64272b7689 [ADN] Fix DE only streams 2024-08-15 10:12:21 -07:00
AnimeDL
35777ecb58 [ADN] Forgot to fix login 2024-07-28 09:15:29 -07:00
AnimeDL
423ad7b2c9 [ADN] Fix refresh token request 2024-07-28 00:03:52 -07:00
AnimeDL
5cbead06bc Minor grammar fix 2024-07-18 09:44:12 -07:00
6 changed files with 11 additions and 15 deletions

View file

@ -27,6 +27,6 @@ jobs:
github-token: ${{ github.token }}
push: ${{ github.ref == 'refs/heads/master' }}
tags: |
"izuco/multi-downloader-nx:latest"
"multidl/multi-downloader-nx:latest"
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
run: echo ${{ steps.docker_build.outputs.digest }}

View file

@ -61,6 +61,6 @@ jobs:
github-token: ${{ github.token }}
push: true
tags: |
"izuco/multi-downloader-nx:${{ github.event.release.tag_name }}"
"multidl/multi-downloader-nx:${{ github.event.release.tag_name }}"
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

14
adn.ts
View file

@ -204,8 +204,6 @@ export default class AnimationDigitalNetwork implements ServiceClass {
return { isOk: false, reason: new Error('Authentication failed') };
}
this.token = await authReq.res.json();
const cookies = this.parseCookies(authReq.res.headers.get('Set-Cookie'));
this.token.refreshToken = cookies.adnrt;
yamlCfg.saveADNToken(this.token);
console.info('Authentication Success');
return { isOk: true, value: undefined };
@ -216,19 +214,16 @@ export default class AnimationDigitalNetwork implements ServiceClass {
method: 'POST',
headers: {
Authorization: `Bearer ${this.token.accessToken}`,
'Cookie': `adnrt=${this.token.refreshToken}`,
'X-Access-Token': this.token.accessToken
'X-Access-Token': this.token.accessToken,
'content-type': 'application/json'
},
body: '{}'
body: JSON.stringify({refreshToken: this.token.refreshToken})
});
if(!authReq.ok || !authReq.res){
console.error('Token refresh failed!');
return { isOk: false, reason: new Error('Token refresh failed') };
}
this.token = await authReq.res.json();
const cookies = this.parseCookies(authReq.res.headers.get('Set-Cookie'));
//this.token.refreshtoken = this.token.refreshToken;
this.token.refreshToken = cookies.adnrt;
yamlCfg.saveADNToken(this.token);
return { isOk: true, value: undefined };
}
@ -463,7 +458,8 @@ export default class AnimationDigitalNetwork implements ServiceClass {
const configReq = await this.req.getData(`https://gw.api.animationdigitalnetwork.fr/player/video/${data.id}/configuration`, {
headers: {
Authorization: `Bearer ${this.token.accessToken}`
Authorization: `Bearer ${this.token.accessToken}`,
'X-Target-Distribution': this.locale
}
});
if(!configReq.ok || !configReq.res){

View file

@ -1,4 +1,4 @@
# multi-downloader-nx (5.1.4v)
# multi-downloader-nx (5.1.5v)
If you find any bugs in this documentation or in the program itself please report it [over on GitHub](https://github.com/anidl/multi-downloader-nx/issues).

View file

@ -67,7 +67,7 @@ export class Req {
}
// debug
if(this.debug){
console.debug('[DEBUG] GOT OPTIONS:');
console.debug('[DEBUG] FETCH OPTIONS:');
console.debug(options);
}
// try do request

View file

@ -1,7 +1,7 @@
{
"name": "multi-downloader-nx",
"short_name": "aniDL",
"version": "5.1.4",
"version": "5.1.5",
"description": "Downloader for Crunchyroll, Hidive, AnimeOnegai, and AnimationDigitalNetwork with CLI and GUI",
"keywords": [
"download",