Closed Yavos closed 8 months ago
I'll have to look into this in more detail.
Language switching unfortunately is a very complicated, if not impossible, thing with Kodi + Crunchyroll. As you mention it, other languages are usually completely different seasons within Crunchyroll, so it's not an easy task to make the languages switchable:
Usually for multi-language you just switch an audio track of a single video file, but that's not how Crunchyroll works, so that's not compatible with Kodi, unfortunately.
I've just looked into the episode metadata sent.
episode_metadata
contains a versions
tag with the different versions available.
{
"total": 1,
"data": [
{
"linked_resource_key": "cms:/episodes/G31UXDJMX",
"rating": {
"up": {
"displayed": "2.3",
"unit": "K"
},
"down": {
"displayed": "22",
"unit": ""
},
"total": 2300
},
"channel_id": "crunchyroll",
"id": "G31UXDJMX",
"promo_title": "",
"description": "Nach der Ankunft an der 59er-Schule packt Wang Ling die erste Gelegenheit am Schopf, sich aus dem Staub zu machen. Aber es ist doch nicht so einfach wie gedacht. Währenddessen lernt der Rest des Teams die Schüler der 60er kennen.",
"title": "Anführerin der Yingliu",
"type": "episode",
"external_id": "EPI.854923",
"episode_metadata": {
"audio_locale": "zh-CN",
"availability_ends": "9998-11-30T08:00:00Z",
"availability_notes": "",
"availability_starts": "2022-07-26T17:00:00Z",
"available_date": null,
"available_offline": true,
"closed_captions_available": false,
"duration_ms": 1053811,
"eligible_region": "DE",
"episode": "9",
"episode_air_date": "2022-07-26T10:00:00Z",
"episode_number": 9,
"extended_maturity_rating": {},
"free_available_date": "2023-08-01T07:00:00Z",
"identifier": "GZJH3DJ8E|S1|E9",
"is_clip": false,
"is_dubbed": true,
"is_mature": false,
"is_premium_only": false,
"is_subbed": true,
"mature_blocked": false,
"maturity_ratings": [
"TV-14"
],
"premium_available_date": "2022-07-26T17:00:00Z",
"premium_date": null,
"season_id": "G6E5CQG41",
"season_number": 1,
"season_sequence_number": 1,
"season_slug_title": "the-daily-life-of-the-immortal-king",
"season_title": "The Daily Life of the Immortal King",
"sequence_number": 9,
"series_id": "GZJH3DJ8E",
"series_slug_title": "the-daily-life-of-the-immortal-king",
"series_title": "The Daily Life of the Immortal King",
"subtitle_locales": [
"en-US",
"es-419",
"fr-FR",
"pt-BR",
"ar-SA",
"de-DE"
],
"upload_date": "2022-07-26T10:00:00Z",
"versions": [
{
"audio_locale": "zh-CN",
"guid": "G31UXDJMX",
"is_premium_only": false,
"media_guid": "G8MFN8Q9N",
"original": true,
"season_guid": "G6E5CQG41",
"variant": ""
},
{
"audio_locale": "en-US",
"guid": "G8WUNX23J",
"is_premium_only": true,
"media_guid": "GQ9FGJEN5",
"original": false,
"season_guid": "GY75CDVXK",
"variant": ""
},
{
"audio_locale": "hi-IN",
"guid": "G2XU0DWQ9",
"is_premium_only": true,
"media_guid": "GDVFV8JX7",
"original": false,
"season_guid": "G609CX1GQ",
"variant": ""
}
]
},
"slug": "",
"images": {
"thumbnail": [
[
{
"height": 180,
"source": "https://www.crunchyroll.com/imgsrv/display/thumbnail/320x180/catalog/crunchyroll/4e27e438fb7f77eafb13643ee52bc6bc.jpe",
"type": "thumbnail",
"width": 320
},
{
"height": 338,
"source": "https://www.crunchyroll.com/imgsrv/display/thumbnail/600x338/catalog/crunchyroll/4e27e438fb7f77eafb13643ee52bc6bc.jpe",
"type": "thumbnail",
"width": 600
},
{
"height": 360,
"source": "https://www.crunchyroll.com/imgsrv/display/thumbnail/640x360/catalog/crunchyroll/4e27e438fb7f77eafb13643ee52bc6bc.jpe",
"type": "thumbnail",
"width": 640
},
{
"height": 450,
"source": "https://www.crunchyroll.com/imgsrv/display/thumbnail/800x450/catalog/crunchyroll/4e27e438fb7f77eafb13643ee52bc6bc.jpe",
"type": "thumbnail",
"width": 800
},
{
"height": 675,
"source": "https://www.crunchyroll.com/imgsrv/display/thumbnail/1200x675/catalog/crunchyroll/4e27e438fb7f77eafb13643ee52bc6bc.jpe",
"type": "thumbnail",
"width": 1200
},
{
"height": 810,
"source": "https://www.crunchyroll.com/imgsrv/display/thumbnail/1440x810/catalog/crunchyroll/4e27e438fb7f77eafb13643ee52bc6bc.jpe",
"type": "thumbnail",
"width": 1440
},
{
"height": 900,
"source": "https://www.crunchyroll.com/imgsrv/display/thumbnail/1600x900/catalog/crunchyroll/4e27e438fb7f77eafb13643ee52bc6bc.jpe",
"type": "thumbnail",
"width": 1600
},
{
"height": 1080,
"source": "https://www.crunchyroll.com/imgsrv/display/thumbnail/1920x1080/catalog/crunchyroll/4e27e438fb7f77eafb13643ee52bc6bc.jpe",
"type": "thumbnail",
"width": 1920
}
]
]
},
"promo_description": "",
"slug_title": "boss-of-shadow-faction",
"streams_link": "/content/v2/cms/videos/G8MFN8Q9N/streams"
}
],
"meta": {}
}
In the season metadata a similar versions
tag is availabe for each of the seasons.
{
"total": 4,
"data": [
{
"versions": [
{
"audio_locale": "zh-CN",
"guid": "G6E5CQG41",
"original": true,
"variant": ""
},
{
"audio_locale": "en-US",
"guid": "GY75CDVXK",
"original": false,
"variant": ""
},
{
"audio_locale": "hi-IN",
"guid": "G609CX1GQ",
"original": false,
"variant": ""
}
],
"is_mature": false,
"mature_blocked": false,
"season_number": 1,
"season_tags": [],
"identifier": "GZJH3DJ8E|S1",
"seo_description": "",
"slug_title": "the-daily-life-of-the-immortal-king",
"seo_title": "",
"title": "The Daily Life of the Immortal King",
"channel_id": "crunchyroll",
"is_complete": false,
"is_subbed": true,
"series_id": "GZJH3DJ8E",
"description": "",
"images": {},
"keywords": [],
"season_display_number": "1",
"audio_locales": [
"zh-CN"
],
"availability_notes": "",
"number_of_episodes": 15,
"id": "G6E5CQG41",
"is_dubbed": false,
"is_simulcast": false,
"subtitle_locales": [
"fr-FR",
"pt-BR",
"ar-SA",
"de-DE",
"en-US",
"es-419"
],
"audio_locale": "zh-CN",
"extended_maturity_rating": {},
"maturity_ratings": [
"TV-14"
],
"season_sequence_number": 1
},
{
"id": "GR09CX07D",
"is_dubbed": false,
"is_mature": false,
"is_simulcast": false,
"mature_blocked": false,
"audio_locale": "zh-CN",
"season_sequence_number": 2,
"subtitle_locales": [
"de-DE",
"fr-FR",
"es-419",
"en-US"
],
"channel_id": "crunchyroll",
"is_subbed": true,
"season_display_number": "2",
"season_tags": [],
"availability_notes": "",
"extended_maturity_rating": {},
"images": {},
"seo_description": "",
"series_id": "GZJH3DJ8E",
"versions": [
{
"audio_locale": "zh-CN",
"guid": "GR09CX07D",
"original": true,
"variant": ""
},
{
"audio_locale": "en-US",
"guid": "GR09CX5G3",
"original": false,
"variant": ""
},
{
"audio_locale": "hi-IN",
"guid": "GY75CDZ1J",
"original": false,
"variant": ""
}
],
"identifier": "GZJH3DJ8E|S2",
"keywords": [],
"number_of_episodes": 12,
"audio_locales": [
"zh-CN"
],
"description": "",
"is_complete": false,
"maturity_ratings": [
"TV-14"
],
"season_number": 2,
"seo_title": "",
"slug_title": "the-daily-life-of-the-immortal-king-season-2",
"title": "The Daily Life of the Immortal King Staffel 2"
},
{
"mature_blocked": false,
"description": "",
"is_mature": false,
"is_simulcast": false,
"maturity_ratings": [
"TV-14"
],
"title": "The Daily Life of the Immortal King Staffel 3",
"audio_locales": [
"zh-CN"
],
"keywords": [],
"season_tags": [
"Sommer-2022",
"Herbst-2022"
],
"is_complete": false,
"is_dubbed": false,
"subtitle_locales": [
"fr-FR",
"en-US",
"it-IT",
"es-ES",
"ar-SA",
"de-DE",
"ru-RU",
"es-419",
"pt-BR"
],
"availability_notes": "",
"id": "G6MGC3WJ3",
"identifier": "GZJH3DJ8E|S3",
"is_subbed": true,
"seo_description": "",
"versions": [
{
"audio_locale": "zh-CN",
"guid": "G6MGC3WJ3",
"original": true,
"variant": ""
},
{
"audio_locale": "hi-IN",
"guid": "GRJQC13XE",
"original": false,
"variant": ""
},
{
"audio_locale": "en-US",
"guid": "G6NQCJE72",
"original": false,
"variant": ""
}
],
"images": {},
"seo_title": "",
"series_id": "GZJH3DJ8E",
"number_of_episodes": 12,
"audio_locale": "zh-CN",
"season_display_number": "3",
"slug_title": "the-daily-life-of-the-immortal-king-season-3",
"channel_id": "crunchyroll",
"extended_maturity_rating": {},
"season_number": 3,
"season_sequence_number": 3
},
{
"images": {},
"keywords": [],
"season_tags": [
"Herbst-2023",
"Winter-2024"
],
"seo_description": "",
"number_of_episodes": 12,
"audio_locale": "zh-CN",
"mature_blocked": false,
"is_subbed": true,
"versions": [
{
"audio_locale": "zh-CN",
"guid": "G6ZXCMK09",
"original": true,
"variant": ""
},
{
"audio_locale": "en-US",
"guid": "GR09CXPKP",
"original": false,
"variant": ""
},
{
"audio_locale": "hi-IN",
"guid": "GYGGCV9NQ",
"original": false,
"variant": ""
}
],
"availability_notes": "",
"is_mature": false,
"seo_title": "",
"id": "G6ZXCMK09",
"description": "",
"maturity_ratings": [
"TV-14"
],
"season_display_number": "4",
"season_number": 4,
"channel_id": "crunchyroll",
"title": "The Daily Life of the Immortal King Staffel 4",
"extended_maturity_rating": {},
"season_sequence_number": 4,
"is_simulcast": true,
"series_id": "GZJH3DJ8E",
"audio_locales": [
"zh-CN"
],
"identifier": "GZJH3DJ8E|S4",
"slug_title": "the-daily-life-of-the-immortal-king-season-4",
"subtitle_locales": [
"es-419",
"it-IT",
"ru-RU",
"de-DE",
"fr-FR",
"pt-BR",
"en-US",
"es-ES"
],
"is_complete": false,
"is_dubbed": false
}
],
"meta": {
"versions_considered": true
}
}
It'd probably be the easiest way to create a (virtual) season list with all available versions instead of switching inside an episode.
It might be an issue due to the fact that there is no japanese dub of this anime, but I'm not sure.
In the Season view there is some filtering going on, as it found it to be very annoying to have all possible dubs listed there, while I'm only interested in a few of them. It will only show you either Japanese dub or any dub that is either in your CR account language or dubs in the languages you have set as your subtitle language in the addon.
Chinese won't show up here, as it (probably) is neither the language you have set as your main language in your CR account nor is Chinese amongst the subtitle languages you have set in the addon. Therefore the Chinese dub will not show up in the seasons view, as it is filtered out, so you can't change to that and are left with the english dub, which probably is the language you have set as your main language in CR.
That's pretty much an edge case, as usually anime on CR always has an Japanese dub. Have to think about that...
I've pushed an update to staging for the seasons filter that should resolve this somehow, but I can't test it right now. If you're feeling lucky, you can give it a try.
Edit: To clarify, in your watchlist, open the context menu on the anime and go to the "Season view". It should show the Chinese dub there which you can then start watching. Once you've started watching it, the watchlist should point to the Chinese version.
I tried and saw 2 (of 3) different season versions whose language I partly could identify (standard naming of CR seasons is not always including the language). Right now Kodi is crashing for some unknown reason (not shown in log file - even with debug enabled) upon loading these lists. I'll try again this evening.
Yes the naming is annoying. I already thought of prefixing the season names with the language tag. I'll test this evening too, along with the skip fix and see what's going on.
Works for me, I can use "Goto series" and either pick the English dub or the Chinese dub with German subs (my language configured for subtitles). It doesn't crash for me.
After figuring out the crashes it works for me as well without problems as well.
As a suggestion: Maybe a new option in the settings to show all available dubs in seasons could be useful. Sure, indian? (hi-IN) dubs (in the example case) usually don't interest me but maybe there's a third or fourth language people might be interested in and by how your filter's working now you'd have to change your preferred or alternate subtitle setting to view specific other dubs. (The indian version isn't even available for selection yet.)
Sounds like an idea. Not that you would usually need that, but it won't hurt either. As said, these Chinese anime are an edge case that was not handled, as Chinese anime didn't used to be a thing in the past (afaik). That should be handled by now. And yes, Hindi is missing, might add that - though nobody complained yet. :)
I've added that option to the settings
I recently noticed at the show https://www.crunchyroll.com/de/series/GZJH3DJ8E/the-daily-life-of-the-immortal-king that there are several dubs and subs available. When I started watching it I only had English dub without any subtitles available. After a while I tried it in the CR app and was able to switch to Chinese dub with subs. CR remembered that and all following episodes are with that setting even in Kodi.
For other series that was handled by having different "seasons" for it, In this series it's combined and apparently only selectable inside an episode. (The watch progress tells me it's internally still handled as different seasons, though.)
The plugin doesn't show any alternatives. I haven't started looking into it further yet.
There probably should be a way to switch languages like in the CR app/website inside an episode. Not sure if switching before starting an episode (aka season selection) would be more useful or useful at all.