GithubHelp home page GithubHelp logo

Comments (12)

adracea avatar adracea commented on May 30, 2024

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.

FerrahWolfeh avatar FerrahWolfeh commented on May 30, 2024

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.

FerrahWolfeh avatar FerrahWolfeh commented on May 30, 2024

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.

adracea avatar adracea commented on May 30, 2024

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 :
image

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.

FerrahWolfeh avatar FerrahWolfeh commented on May 30, 2024

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.

FerrahWolfeh avatar FerrahWolfeh commented on May 30, 2024

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.

bytedream avatar bytedream commented on May 30, 2024

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;

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.

FerrahWolfeh avatar FerrahWolfeh commented on May 30, 2024

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.

FerrahWolfeh avatar FerrahWolfeh commented on May 30, 2024

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.

image

from crunchyroll-rs.

adracea avatar adracea commented on May 30, 2024

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.

bytedream avatar bytedream commented on May 30, 2024

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.

async fn __apply_fixes(executor: Arc<Executor>, media: &mut Media<Self>) {
if executor.fixes.locale_name_parsing {
if let Ok(seasons) = media.seasons().await {
let mut locales = seasons
.into_iter()
.flat_map(|s| s.metadata.audio_locales)
.collect::<Vec<Locale>>();
locales.dedup();
media.metadata.audio_locales = locales
}
}
}

from crunchyroll-rs.

bytedream avatar bytedream commented on May 30, 2024

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 incorrect en_US locale... Nothing very significant though.

image

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.