asciidisco / plugin.video.netflix

Inputstream based Netflix plugin for Kodi
MIT License
1.24k stars 226 forks source link

Changeable media language in addon settings #580

Open SpentRocket opened 5 years ago

SpentRocket commented 5 years ago

I'm submitting a ...

General infomration

Latest Netflix addon, running on an Amlogic S905X mediabox, on CoreElec 8.95.6 (latest).

Prerequisites

Description

I live in Hungary, I have a Netflix account registered here. If I choose in kodi to use hungarian audio in first place, the Netflix addon alwayas starts playing the media in german language with German subtitle. I think, it would be useful to have a checkbox in the Settings menu, to use the original audio stream (english in most cases).

[Description of the bug or feature]

Steps to Reproduce

  1. [First Step]
  2. [Second Step]
  3. [and so on...]

Expected behavior: [What you expected to happen]

Actual behavior: [What actually happened]

Context (Environment)

Installation

Operating System

Additional informatin on the environment

[Descripe your environment a bit more detailed, are you using LibreElec f.e.]

Debug log

[Please include a link to your debug log (use something like http://sprunge.us/) or similar, please do not paste]

Other information

[e.g. detailed explanation, related issues, suggestions how to fix, links for us to have context, etc.]

Screenshots

[Please add a screenshot if that helps understanding your problem]

[You can erase any parts of this template not applicable to your Issue.]

jakermx commented 5 years ago

Go to Settings::Player::Language on Kodi and toggle Preferred Language option

SpentRocket commented 5 years ago

I did it, but if I choose hungarian language, the addon starts playing media with german sound (there's no hungarian sound), instead of english.

jakermx commented 5 years ago

Try setting it to English forced...and disable default preferred language option

SpentRocket commented 5 years ago

I tried that too. :) But in that case all of my videos with at least two sound streams starts with english sound, instead of hungarian. Mainly I watch movies in hungarian language, and series in original (english) language with subtitle.

jakermx commented 5 years ago

Ok, could you share your complete log file and manifest json and mpd as well?

SpentRocket commented 5 years ago

Logfile upload okay. Can you please explain (or send a link) about "manifest json and mpd"? I never did that. Thank you.

jakermx commented 5 years ago

Look at your addon userdata directory, there are some files, those manifests are located there

SpentRocket commented 5 years ago

Thanks for the explanation. I will upload them here, in the afternoon.

maxbla commented 5 years ago

Just dropping in to say that I had a similar problem, and

Go to Settings::Player::Language on Kodi and toggle Preferred Language option

this fixed my problem.

The problem I was having is Netflix defaults to German for me too. I kept trying to solve this issue by when I was in the netflix player app (playing content) clicking the settings gear > Audio settings > audio stream and set it to English. I would then click Set as default for all media at the bottom of the Audio settings > audio stream window. This changed the audio to English, but only for one video - when I started another video, it played in German.

Essam315 commented 5 years ago

@SpentRocket In "Preferred audio language", choose "Original language", so if you were watching Hungarian movies and TV shows the audio will be in Hungarian language, and if you were watching Italian TV shows the audio will be in Italian language not English, and if you were watching Spanish TV shows the audio will be in Spanish language , ...

original

SpentRocket commented 5 years ago

The movies I watch have two audio streams one english and one hungarian. The movie itself is not hungarian. I will try this method, but I have doubts...

Essam315 commented 5 years ago

@SpentRocket If the movies are not Hungarian, say American movies, you will have English audio, so you want the Audio to be in English language if the TV series is in English language, and the audio to be in Hungarian language all the time for the movies if available, I have no idea yet for how to do so, try to ask for help in Kodi forum here.

https://forum.kodi.tv/forumdisplay.php?fid=111

SpentRocket commented 5 years ago

Not exactly. I want to play all media in Hungarian language if it's available, and if it's not in English.

SpentRocket commented 5 years ago

Here's my logfile: https://paste.kodi.tv/uqonesokus.kodi Here's manifest.json: https://drive.google.com/open?id=11BZ72jdy2eAk-VT0EjPTw0-V9R72Ao3x Here's manifest.mpd: https://drive.google.com/open?id=1xBzQP5ZApFW3UhTIfK79MlMbXOeGQpeb

Settings: Player->Language->Preferred audio language: Hungarian

In this case Netflix streams starts with German language, those other streams that have Hungarian language (and other too) starts with Hungarian.

Essam315 commented 5 years ago

@SpentRocket Until you can find a better solution, you can use this workaround, i just modified the audio in MSLv2.py to ignore the German audio, so if in a movie you usually get English audio and German audio, Kodi will play the English audio, choose Hungarian from "Preferred audio language", and Hungarian from "Preferred subtitle language".

plugin.video.netflix-0.13.21.NODE.zip

or in MSLv2.py in

C:\Users\Essam\AppData\Roaming\Kodi\addons\plugin.video.netflix\resources\lib

replace

for audio_track in manifest['audio_tracks']:

with

for audio_track in manifest['audio_tracks']: if audio_track['language'] == 'de': continue

SpentRocket commented 5 years ago

It works! Thanks a lot! :)

Essam315 commented 5 years ago

And this release will play the audio only in Hungarian and English. Choose Hungarian from "Preferred audio language", and Hungarian from "Preferred subtitle language".

plugin.video.netflix-0.13.21.HU.EN.zip

or in MSLv2.py in

C:\Users\Essam\AppData\Roaming\Kodi\addons\plugin.video.netflix\resources\lib

replace

for audio_track in manifest['audio_tracks']:

with

for audio_track in manifest['audio_tracks']: if not audio_track['language'] == 'hu' and not audio_track['language'] == 'en': continue

SpentRocket commented 5 years ago

Thank you a lot! If in later versions I change the specified lines in MSLv2.py will it be working?

Essam315 commented 5 years ago

@SpentRocket Sorry, I'm not sure what you are asking about. Do you want to modify the lines by yourself instead of installing the plugin again? If so yes, extract the zip file and open MSLv2.py and copy the lines from it. Or just copy the new MSLv2.py over the old one.

SpentRocket commented 5 years ago

I'm asking if a new version will come from the Netflix addon, will it be working with this modified MSLv2.py?

Essam315 commented 5 years ago

You will need to open the modified MSLv2.py in "plugin.video.netflix-0.13.21.HU.EN.zip" and copy the modified lines from it, and replace the lines in the new versions.

SpentRocket commented 5 years ago

Okay, that helped me a lot.

liborcito commented 5 years ago

Hello I'm having the exact same problem, but actually I would like to play my videos in Spanish language. I have set the "Preferred audio language" option to Spanish in Kodi but they still be played in German. As suggested, I have tried to include the following entry in the the MSLv2.py file :

_for audio_track in manifest['audio_tracks']: if not audiotrack['language'] == 'es': continue

But it can not find any audio, just to make sure I have tried it with the 'en' language instead of 'es' and it works, it only shows the English audio, but it doesn't work with 'es' I guess that it uses a different language code for the Spanish audio. ¿Could anybody tell me the correct language code for Spanish? Thanks in advance

pchevallier commented 5 years ago

I actually have to agree with the original request. It would be greatly helpful to have the ability to switch language on the addon settings instead of having to go all the way back to the general setup. My 2cents

Essam315 commented 5 years ago

@liborcito We have more than one kind of Spanish try 'es-ES' for European Spanish (Spanish Spanish), and 'es' usually for the Latin American TV shows.

Try this release for European Spanish (Spanish Spanish) and English only.

plugin.video.netflix-0.13.21.es-ES.EN.zip

or try this release for European Spanish (Spanish Spanish), Latin American Spanish and English only.

plugin.video.netflix-0.13.21.es-ES.EN.es.zip

liborcito commented 5 years ago

@liborcito We have more than one kind of Spanish try 'es-ES' for European Spanish (Spanish Spanish), and 'es' usually for the Latin American TV shows.

Try this release for European Spanish (Spanish Spanish) and English only.

plugin.video.netflix-0.13.21.es-ES.EN.zip

or try this release for European Spanish (Spanish Spanish), Latin American Spanish and English only.

plugin.video.netflix-0.13.21.es-ES.EN.es.zip

Thanks a lot!! I had to edit the MSLv2.py file and skip the English audio too because in most of the cases videos were played in English, but now it's working like a charm. Regarding this problem, before using this workaround, I noticed that all the audio streams had the word "[Default]" in their description, but I guess this [Default] should only be present in the Kodi's preferred audio language. Am I right?

sanangel commented 5 years ago

@liborcito Tenemos más de un tipo de prueba en español 'es-ES' para el español europeo (español español), y 'es' generalmente para los programas de televisión latinoamericanos. Pruebe esta versión para español europeo (español español) e inglés solamente. plugin.video.netflix-0.13.21.es-ES.EN.zip o pruebe este lanzamiento para español europeo (español español), español latinoamericano e inglés solamente. plugin.video.netflix-0.13.21.es-ES.EN.es.zip

¡¡Muchas gracias!! Tuve que editar el archivo MSLv2.py y omitir el audio en inglés también porque en la mayoría de los casos los videos se reproducían en inglés, pero ahora funciona como un encanto. Respecto a este problema, antes de usar esta solución, noté que todas las secuencias de audio tenían la palabra "[Predeterminado]" en su descripción, pero supongo que este [Predeterminado] solo debería estar presente en el idioma de audio preferido de Kodi. Estoy en lo cierto

@liborcito We have more than one kind of Spanish try 'es-ES' for European Spanish (Spanish Spanish), and 'es' usually for the Latin American TV shows. Try this release for European Spanish (Spanish Spanish) and English only. plugin.video.netflix-0.13.21.es-ES.EN.zip or try this release for European Spanish (Spanish Spanish), Latin American Spanish and English only. plugin.video.netflix-0.13.21.es-ES.EN.es.zip

Thanks a lot!! I had to edit the MSLv2.py file and skip the English audio too because in most of the cases videos were played in English, but now it's working like a charm. Regarding this problem, before using this workaround, I noticed that all the audio streams had the word "[Default]" in their description, but I guess this [Default] should only be present in the Kodi's preferred audio language. Am I right?

Could I please ask you how exactly is your MSLv2.py file and how have you omitted the audio in English? I have the same problem that you have described, by default the chapters and series begin in English (as predefined) and I want it only in Spanish (from Spain)

Can I ask you if you can share your MSLv2.py file edited here?

Thank you.

Essam315 commented 5 years ago

@sanangel In MSLv2.py in

C:\Users\Essam\AppData\Roaming\Kodi\addons\plugin.video.netflix\resources\lib

replace

for audio_track in manifest['audio_tracks']:

with

for audio_track in manifest['audio_tracks']: if not audio_track['language'] == 'es-ES': continue

Try this release

plugin.video.netflix-0.13.21.es-ES.zip

sanangel commented 5 years ago

@sanangel En MSLv2.py en

C: \ Users \ Essam \ AppData \ Roaming \ Kodi \ addons \ plugin.video.netflix \ resources \ lib

reemplazar

for audio_track in manifest['audio_tracks']:

con

for audio_track in manifest['audio_tracks']: if not audio_track['language'] == 'es-ES': continue

Prueba este lanzamiento

plugin.video.netflix-0.13.21.es-ES.zip

@sanangel In MSLv2.py in

C:\Users\Essam\AppData\Roaming\Kodi\addons\plugin.video.netflix\resources\lib

replace

for audio_track in manifest['audio_tracks']:

with

for audio_track in manifest['audio_tracks']: if not audio_track['language'] == 'es-ES': continue

Try this release

plugin.video.netflix-0.13.21.es-ES.zip

It works perfect for me, now the default audio is Spanish / Castillian. Thank you very much for the work and also for your quick response to me Greetings.

Com3Carne commented 5 years ago

Hello. Could anyone do this with Portuguese from Brazil? It is very annoying every time I switch from one video to another having to modify the language using Yatse. I tried to edit the MSLv2.py file by Notepad ++ and it always gives an error. If you can too, with the caption forced on the Portuguese too.

Essam315 commented 5 years ago

Hello. Could anyone do this with Portuguese from Brazil? It is very annoying every time I switch from one video to another having to modify the language using Yatse. I tried to edit the MSLv2.py file by Notepad ++ and it always gives an error. If you can too, with the caption forced on the Portuguese too.

Here is 0.13.21 with Brazilian Portuguese only audio and subtitles, this means if the movies or the TV shows have no Brazilian Portuguese audio you will get no audio.

https://mega.nz/#!A880UagB!L0FrdC-jNrR0MtS6JWpFBstrln-a-Q3b8JPNZI8AWHs

Open Kodi, in the main window press on "Settings" icon, then press on "Player", stand on "language", in "Preferred Audio language" choose "Original language", and in "Preferred Subtitle language" choose "Original language".

This modified release will play the audio only in the original audio (you will get the audio in Brazilian Portuguese only if the original language of the video is Brazilian Portuguese), and the subtitles will always be in Brazilian Portuguese.

https://mega.nz/#!IgVk2KKS!7SJ08pnAJDyKCK4MphCmiHyMBbrCh8Rl3hXBAsKMS6g

Com3Carne commented 5 years ago

Hello. Could anyone do this with Portuguese from Brazil? It is very annoying every time I switch from one video to another having to modify the language using Yatse. I tried to edit the MSLv2.py file by Notepad ++ and it always gives an error. If you can too, with the caption forced on the Portuguese too.

Here is 0.13.21 with Brazilian Portuguese only audio and subtitles, this means if the movies or the TV shows have no Brazilian Portuguese audio you will get no audio.

https://mega.nz/#!A880UagB!L0FrdC-jNrR0MtS6JWpFBstrln-a-Q3b8JPNZI8AWHs

Open Kodi, in the main window press on "Settings" icon, then press on "Player", stand on "language", in "Preferred Audio language" choose "Original language", and in "Preferred Subtitle language" choose "Original language".

This modified release will play the audio only in the original audio (you will get the audio in Brazilian Portuguese only if the original language of the video is Brazilian Portuguese), and the subtitles will always be in Brazilian Portuguese.

https://mega.nz/#!IgVk2KKS!7SJ08pnAJDyKCK4MphCmiHyMBbrCh8Rl3hXBAsKMS6g

It is perfect. However, I noticed that the other languages have disappeared. And the caption I get was all capitol, not the one forced, the one used when speaking in another language or information.

Essam315 commented 5 years ago

@Com3Carne Try this release.

https://mega.nz/#!d1dwyaII!ZCnXZ7-kxs_2RrHiP7X9x5BzlKeZMmmOy8bbU-4m348

You want the TV shows and movies to be dubbed with your language? or you want to listen to the TV shows and movies in the original languages including your language when the TV show be in your language like 3%?

I can only force one language to be the default, and disable the other languages, i can not make your language to be the default and keep the other languages by modifying Mslv2.py, maybe I find a way to do this later, this is just a workaround until Kodi or Netflix plugin get fixed.

Com3Carne commented 5 years ago

@Com3Carne Try this release.

https://mega.nz/#!d1dwyaII!ZCnXZ7-kxs_2RrHiP7X9x5BzlKeZMmmOy8bbU-4m348

You want the TV shows and movies to be dubbed with your language? or you want to listen to the TV shows and movies in the original languages including your language when the TV show be in your language like 3%?

I can only force one language to be the default, and disable the other languages, i can not make your language to be the default and keep the other languages by modifying Mslv2.py, maybe I find a way to do this later, this is just a workaround until Kodi or Netflix plugin get fixed.

Voices, but only with forced subtitles. When I speak in another language or appear information in another language that does not have a location.

It would also be nice to be able to choose other languages. It's that sometimes the original sound is better than dub. I had a bad experience with Bleach movie. Dreadful, it was better to have seen the original.

Essam315 commented 5 years ago

Try this one and see if that is the kind of subtitle you want or not, choose "original language" for both the preferred audio and subtitles in Kodi, as i said i can not enable dubbed and original audio at the same time yet, I'm sure some of the other members can do that easily.

https://mega.nz/#!N9UgUKIQ!_VPDqkbwWiMMrmlOGYzau871EGVieFyDch_qPQKV1Rc

Com3Carne commented 5 years ago

Try this one and see if that is the kind of subtitle you want or not, choose "original language" for both the preferred audio and subtitles in Kodi, as i said i can not enable dubbed and original audio at the same time yet, I'm sure some of the other members can do that easily.

https://mega.nz/#!N9UgUKIQ!_VPDqkbwWiMMrmlOGYzau871EGVieFyDch_qPQKV1Rc

My configuration looks like this: https://ibb.co/b7MgVV1 https://ibb.co/fSzbFCV I had a funny problem with the modification earlier than the one you put now. On the show Lucifer, there was no audio. The image and caption appeared, but the audio was gone. lol

Essam315 commented 5 years ago

@Com3Carne "Here is 0.13.21 with Brazilian Portuguese only audio and subtitles, this means if the movies or the TV shows have no Brazilian Portuguese audio you will get no audio."

Choose "Idioma original" for both audio and subtitles.

Com3Carne commented 5 years ago

@Essam315 I did as recommended and noticed that some videos stop displaying. I use Raspberry Pi to reproduce. Is this why the videos are not being exported?

Essam315 commented 5 years ago

Uninstall the modified 0.13.21 and install the official 0.13.21 and wait for a proper fix.

Com3Carne commented 5 years ago

@Essam315 I did it. I noticed that when I choose another language besides Brazilian Portuguese, it automatically goes to the chosen language. Only this error rolls when I choose Portuguese.

sanangel commented 5 years ago

@sanangel In MSLv2.py in

C:\Users\Essam\AppData\Roaming\Kodi\addons\plugin.video.netflix\resources\lib

replace

for audio_track in manifest['audio_tracks']:

with

for audio_track in manifest['audio_tracks']: if not audio_track['language'] == 'es-ES': continue

Try this release

plugin.video.netflix-0.13.21.es-ES.zip

Hello again @ Essam315. I would like to know if it is possible to put the original of the series as a secondary language in case of not being in Spanish. Use the addon modified by you for me and works very well in Spanish in Spain, but in the Narcos series there is no such audio and I do not have the option to choose another. Thanks in advance for your reply.

Essam315 commented 5 years ago

@sanangel The Spanish language in Kodi works with the Spanish from Latin America only. I think the best way is to modify the Netflix plugin to choose the language from within the Netflix plugin, something like this add-on.

https://forum.kodi.tv/showthread.php?tid=153783

service.LanguagePreferenceManager-master.zip

1111

222222

44444

sanangel commented 5 years ago

@sanangel Not possible with Spanish from Spain, seems that the languages files of some languages are not compatible with the Netflix plugin, and Spanish from Spain is one of them, until one make the language files compatible with the Netflix plugin, I can do nothing, but other professional developers can modify the Netflix plugin easily to do what you want, i just do not have the knowledge to do that yet, tried to modify the language files but with no luck until now (Until now Brazilian Portuguese, Greek, Spanish from Spain are not compatible with the Netflix plugin, most of the other languages are compatible, like Turkish, Polish, Korean, Japanese, Danish and Finish).

I think the best way is a professional developer modify the Netflix plugin to choose the language from within the Netflix plugin, something like this add-on.

https://forum.kodi.tv/showthread.php?tid=153783

You made that change for me and Spain's Spanish worked as the default on Netflix. The problem I have in some series where this language is not available and my request is to know if you could put the option to choose the original language as a second option to choose in these cases.

Maybe I can not explain myself, my level of English is not very good. Sorry

Essam315 commented 5 years ago

@sanangel

This release will play the audio in Spanish from Spain as the default audio and will play the original audio as default if Spanish from Spain was not available, in Preferred audio language choose "Media default".

plugin.video.netflix-0.13.21.original.es-ES.zip

Essam315 commented 5 years ago

@Com3Carne This release will play the audio in Brazilian Portuguese as the default audio and will play the original audio as default if Brazilian Portuguese was not available, in Preferred audio language choose "Media default".

plugin.video.netflix-0.13.21.original.pt-BR.zip

sanangel commented 5 years ago

Thanks, work fine for me!!!!!

tsioukas commented 5 years ago

I don't know if this helps, but I change the interface language to my local language (Settings>Interface>Regional>Language) and after that it load automatically the regional language subtitles.

But yes I think that the best way is to add an extra independent field on Netflix plugin settings to set preferred Audio/Subtitle language.

asciidisco commented 5 years ago

In my opinion, the only viable source for the correct language for both is Netflix itself, because:

We can never be sure that Netflix offers the language preferences the user did set up in Kodi itself, which could lead to the fact that the users gets served just a subset of available options, excluding the one they actually want or their preferred fallback.

The best way (and in my opinion, the only valid one) would be to parse out the users language settings from Netflix (which are present in the source code at the same level where we parse out the ESN and profile info f.e.):

"memberContext":{"data":{"type":"memberContext","geo":{"locale":{"default":true,"dir":"ltr","displayName":"Deutsch\x20\x28Deutschland\x29","id":"de-DE","language":"de","isCursive":false,"doubleByte":false,"hasExtendedDiacritics":false,"duration...

That way, the user sets its preference in Netflix, they would never lead to invalid requests, the behaviour would be predictable & the same as with the native Netflix playback options.

Essam315 commented 5 years ago

@tsioukas This does not work with "Brazilian Portuguese" "pt-BR" and "European Spanish" "es-ES", because Kodi reads the language code wrong, it reads "pt-BR" as " Portuguese - Breton" and reads "es-ES" as "Spanish - Spanish", it reads the abbreviation "BR" as the language "Breton" when it should read it as the country "Brazil" and reads "ES" as "Spanish" instead of the country "Spain". It should read the codes the same way it does in "ar-EG", Kodi reads it as Arabic, "EG" is the abbreviation of the country Egypt.

tsioukas commented 5 years ago

@Essam315, interesting, maybe a mappings between Netflix language codes and Kodi language codes will solve the problem.