Comments (12)
Hey there, this seems to be a recent change in crunchyroll? I've looked at quite a few different series and seemingly the ja-JP locale has disappeared or is wrongly reported as en-US which creates quite some confusion. One way to get the proper version would be to look for Series.is_subbed
or Series.is_dubbed
.
from crunchyroll-rs.
I tried rewriting the audio selection logic for my app, but I ended giving up on it for now. Yes, it is possible to guide myself using those two flags mentioned above, but it started to complicate things quite a bit...
Hoping for a better fix for the issue and good holidays π
from crunchyroll-rs.
Just a heads-up: seems like aniDL's multi-downloader-nx is still correctly parsing the languages even in ancient versions of their utility. They might do something different from what happens here...
from crunchyroll-rs.
Just a heads-up: seems like aniDL's multi-downloader-nx is still correctly parsing the languages even in ancient versions of their utility. They might do something different from what happens here...
I believe that that is impossible ? Crunchyroll itself is, right now, reporting that all series and episodes no matter their actual locale are in en-US.
Example: chainsaw-man first ep in ja-JP audio :
Later edit:
If you notice when using the search function in aniDL
it doesn't report on the audio
locale of a series. It only looks for the is_subbed
and is_dubbed
and depending on these pulls the available subs.
Such as:
[Z:GVDHX8QNW|SRZ.283159] Chainsaw Man (Seasons: 7, EPs: 60) [SIMULCAST, SUB, DUB]
- Subtitles: en, es-419, es-ES, pt, fr, de, ar, it, ru
[S:GY3VC2Q7V] Chainsaw Man (Season: 1) [SIMULCAST, SUB]
- Subtitles: en, es-419, es-ES, pt, fr, de, ar, it, ru
[S:GRZXCMJKG] Chainsaw Man (English Dub) (Season: 1) [SIMULCAST, DUB]
- Subtitles: en
[S:GRVNC2JEK] Chainsaw Man (Spanish Dub) (Season: 1) [SIMULCAST, DUB]
- Subtitles: es-419
[S:G63VC2Q19] Chainsaw Man (Portuguese Dub) (Season: 1) [SIMULCAST, DUB]
- Subtitles: pt
[S:GR2PCVJK4] Chainsaw Man (German Dub) (Season: 1) [SIMULCAST, DUB]
- Subtitles: de
[S:G6P8CXE7D] Chainsaw Man (French Dub) (Season: 1) [SIMULCAST, DUB]
- Subtitles: fr
[S:GY8VCPEX1] Chainsaw Man (Russian Dub) (Season: 1) [SIMULCAST, DUB]
from crunchyroll-rs.
I took a good look at their parsing code and it looks like they never actually read the audio_locale
field. Instead, they assume the season language from the season title, which is one kinda an interesting idea
something like this:
for (const item of seasonsList.items) {
for (const lang of langsData.languages) {
if (!Object.prototype.hasOwnProperty.call(ret, item.season_number))
ret[item.season_number] = {};
if (item.title.includes(`(${lang.name} Dub)`) || item.title.includes(`(${lang.name})`)) {
ret[item.season_number][lang.code] = item;
} else if (item.is_subbed && !item.is_dubbed && lang.code == 'jpn') {
ret[item.season_number][lang.code] = item;
} else if (item.is_dubbed && lang.code === 'eng' && !langsData.languages.some(a => item.title.includes(`(${a.name})`) || item.title.includes(`(${a.name} Dub)`))) { // Dubbed with no more infos will be treated as eng dubs
ret[item.season_number][lang.code] = item;
}
}
}
return ret;
from crunchyroll-rs.
Now one thing that may be missing from the lib's code are the flags for is_subbed
and is_dubbed
present in the season object, which aren't present by now
from crunchyroll-rs.
I took a good look at their parsing code and it looks like they never actually read the
audio_locale
field. Instead, they assume the season language from the season title, which is one kinda an interesting ideasomething like this:
for (const item of seasonsList.items) { for (const lang of langsData.languages) { if (!Object.prototype.hasOwnProperty.call(ret, item.season_number)) ret[item.season_number] = {}; if (item.title.includes(`(${lang.name} Dub)`) || item.title.includes(`(${lang.name})`)) { ret[item.season_number][lang.code] = item; } else if (item.is_subbed && !item.is_dubbed && lang.code == 'jpn') { ret[item.season_number][lang.code] = item; } else if (item.is_dubbed && lang.code === 'eng' && !langsData.languages.some(a => item.title.includes(`(${a.name})`) || item.title.includes(`(${a.name} Dub)`))) { // Dubbed with no more infos will be treated as eng dubs ret[item.season_number][lang.code] = item; } } } return ret;
I have also already thought about how and if this can be done by name parsing. But I don't like the idea because Crunchyroll is Crunchyroll and sometimes does magicπͺ things which screws up everything. But if it works reliable (does it?) with the mentioned repo it might get implemented in the lib.
from crunchyroll-rs.
But if it works reliable (does it?) with the mentioned repo it might get implemented in the lib.
Well, pretty much, it seems...
I've looked through the commits of that repo and the parsing function is about the same logic since a good while.
Also I used to use multi-downloader-nx for some time and never updated once. It always seemed to work reliably
from crunchyroll-rs.
Great! As can be seen below, the episodes are correctly parsed according to the selected language (ja_JP
, ignore the portuguese name of the EPs), but the series objects still only have the incorrect en_US
locale... Nothing very significant though.
from crunchyroll-rs.
The series objects having the wrong locale is strictly something coming from crunchyroll itself sadly(as I mentioned above and the main reason for the changes). Sadly it's nothing we can handle.
from crunchyroll-rs.
This should be fixed now tho. With CrunchyrollBuilder::stabilization_locales(true)
set, the series fetches the audio locale from its seasons, sums them up, and set it as Series::audio_locales
.
crunchyroll-rs/src/media/media.rs
Lines 97 to 109 in 04feae0
from crunchyroll-rs.
I tracked down why it doesn't work. I set the client to request all seasons after trying to use it, which obviously doesn't work. Thought it should be, my bad.
Great! As can be seen below, the episodes are correctly parsed according to the selected language (
ja_JP
, ignore the portuguese name of the EPs), but the series objects still only have the incorrecten_US
locale... Nothing very significant though.
Now with v.0.2.2 it should work. I thought that it worked but after some testing I also saw it didn't.
from crunchyroll-rs.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crunchyroll-rs.