Skip to content

Commit

Permalink
[CR] Hotfix login
Browse files Browse the repository at this point in the history
Also increment version
  • Loading branch information
AnimeDL committed Jun 28, 2024
1 parent cd9586a commit 05d679e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
5 changes: 4 additions & 1 deletion crunchy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import { CrunchyChapters, CrunchyChapter, CrunchyOldChapter } from './@types/cru
import vtt2ass from './modules/module.vtt2ass';
import { CrunchyPlayStream } from './@types/crunchyPlayStreams';
import { CrunchyPlayStreams } from './@types/enums';
import { randomUUID } from 'node:crypto';

export type sxItem = {
language: langsData.LanguageItem,
Expand Down Expand Up @@ -229,7 +230,9 @@ export default class Crunchy implements ServiceClass {
'username': data.username,
'password': data.password,
'grant_type': 'password',
'scope': 'offline_access'
'scope': 'offline_access',
'device_id': randomUUID(),
'device_type': 'Chrome on Windows'
}).toString();
const authReqOpts: reqModule.Params = {
method: 'POST',
Expand Down
3 changes: 2 additions & 1 deletion modules/module.api-urls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const api: APIType = {
// beta api
beta_auth: `${domain.api_beta}/auth/v1/token`,
authBasic: 'Basic bm9haWhkZXZtXzZpeWcwYThsMHE6',
authBasicMob: 'Basic d2piMV90YThta3Y3X2t4aHF6djc6MnlSWlg0Y0psX28yMzRqa2FNaXRTbXNLUVlGaUpQXzU=',
authBasicMob: 'Basic dXU4aG0wb2g4dHFpOWV0eXl2aGo6SDA2VnVjRnZUaDJ1dEYxM0FBS3lLNE85UTRhX3BlX1o=',
authBasicSwitch: 'Basic dC1rZGdwMmg4YzNqdWI4Zm4wZnE6eWZMRGZNZnJZdktYaDRKWFMxTEVJMmNDcXUxdjVXYW4=',
beta_profile: `${domain.api_beta}/accounts/v1/me/profile`,
beta_cmsToken: `${domain.api_beta}/index/v2`,
Expand Down Expand Up @@ -107,6 +107,7 @@ api.crunchyAuthHeader = {

api.crunchyAuthHeaderMob = {
Authorization: api.authBasicMob,
'user-agent': 'Crunchyroll/3.60.0 Android/9 okhttp/4.12.0'
};

api.crunchyAuthHeaderSwitch = {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "multi-downloader-nx",
"short_name": "aniDL",
"version": "5.1.0",
"version": "5.1.1",
"description": "Downloader for Crunchyroll, Hidive, AnimeOnegai, and AnimationDigitalNetwork with CLI and GUI",
"keywords": [
"download",
Expand Down

0 comments on commit 05d679e

Please sign in to comment.