Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Can't download (NC) Versions from ADN #737

Open
KasumiDev opened this issue Jul 11, 2024 · 0 comments · May be fixed by #738
Open

[BUG]: Can't download (NC) Versions from ADN #737

KasumiDev opened this issue Jul 11, 2024 · 0 comments · May be fixed by #738
Assignees
Labels
bug Something isn't working

Comments

@KasumiDev
Copy link

Program version

5.1.4

Operating System

Linux

Type

GUI

Service

AnimationDigitalNetwork

Command used

Download

Show ID

1121

Episode

1

Console Output

[DEBUG] Got download options: {"id":"1121","q":0,"e":"12 (NC)","dubLang":["deu","jpn"],"dlsubs":["all"],"fileName":"${showTitle}/S${season}/E${episode} - ${title}","dlVideoOnce":true,"all":true,"but":false,"noaudio":false,"novids":false,"simul":false,"ids":[24158],"title":"Gushing over Magical Girls - Episode 12 (NC)","parent":{"title":"Gushing over Magical Girls","season":"1"},"image":"https://image.animationdigitalnetwork.fr/license/mahoushoujoniakogaretenc/tv/web/eps12_320x180.jpg","episode":"12 (NC)"}
[S.1121] Gushing over Magical Girls
  (24093) [E1] Episode 1 - Die Geburtsstunde einer Offizierin des Bösen?!
  (24094) [E2] Episode 2 - Ihr Name lautet Magia Böse!
  (24095) [E3] Episode 3 - Explosionsmädel Leopard
  (24096) [E4] Episode 4 - Die megastarken Idols, Tres Magia
  (24097) [E5] Episode 5 - Nero Alice im Wunderland
  (24098) [E6] Episode 6 - Die geheime Entstehungsgeschichte von Tres Magia
  (24099) [E7] Episode 7 - Azul in Not
  (24100) [E8] Episode 8 - Auftritt der Lord-Truppe
  (24101) [E9] Episode 9 - Ich bewundere Idols
  (24102) [E10] Episode 10 - Loco X Leber
  (24103) [E11] Episode 11 - Meine Bewunderung gilt der Weltherrschaft
  (24104) [E12] Episode 12 - Der Entschluss von Oberbefehlshaberin Magia Böse
  (24105) [E13] Episode 13 - Ich bewundere zweifelsohne Magical Girls
  (24147) [E1 (NC)] Episode 1 (NC) - Die Geburtsstunde einer Offizierin des Bösen?!
  (24148) [E2 (NC)] Episode 2 (NC) - Ihr Name lautet Magia Böse!
  (24149) [E3 (NC)] Episode 3 (NC) - Explosionsmädel Leopard
  (24150) [E4 (NC)] Episode 4 (NC) - Die megastarken Idols, Tres Magia
  (24151) [E5 (NC)] Episode 5 (NC) - Nero Alice im Wunderland
  (24152) [E6 (NC)] Episode 6 (NC) - Die geheime Entstehungsgeschichte von Tres Magia
  (24153) [E7 (NC)] Episode 7 (NC) - Azul in Not
  (24154) [E8 (NC)] Episode 8 (NC) - Auftritt der Lord-Truppe
  (24155) [E9 (NC)] Episode 9 (NC) - Ich bewundere Idols
  (24156) [E10 (NC)] Episode 10 (NC) - Loco X Leber
  (24157) [E11 (NC)] Episode 11 (NC) - Meine Bewunderung gilt der Weltherrschaft
  (24158) [E12 (NC)] Episode 12 (NC) - Der Entschluss von Oberbefehlshaberin Magia Böse
  (24159) [E13 (NC)] Episode 13 (NC) - Ich bewundere zweifelsohne Magical Girls

------------------------------

[WARN] [WARN] Unable to parse input "12 (NC)"

Additional Information

The NonCensored Versions have a string in the Episode ID.
Which fail to parse, because the second part can't be converted to a number because of (NC)

Is It save to add an Regex like E\d+\s\(NC\) here? Or will that break something different?

if (part.match(/[0-9A-Z]{9}/)) {
select.push(part);
return;
} else if (part.match(/[A-Z]{3}\.[0-9]*/)) {
select.push(part);
return;
}
const match = part.match(/[A-Za-z]+/);
if (match && match.length > 0) {
if (match.index && match.index !== 0) {
console.warn(`[WARN] Unable to parse input "${part}"`);
return;
}
const letters = part.substring(0, match[0].length);
const number = parseFloat(part.substring(match[0].length));
if (isNaN(number)) {
console.warn(`[WARN] Unable to parse input "${part}"`);
return;
}
select.push(`${letters}${number}`);
} else {
select.push(`${parseFloat(part)}`);
}

@KasumiDev KasumiDev added the bug Something isn't working label Jul 11, 2024
@KasumiDev KasumiDev changed the title [BUG]: [BUG]: Can't download (NC) Versions from ADN Jul 11, 2024
@KasumiDev KasumiDev linked a pull request Jul 11, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants