rockrider69 / service.LanguagePreferenceManager

A manager for audio and subtitle preferences
GNU General Public License v2.0
17 stars 1 forks source link

Missing language code `enm` #11

Open jack-mil opened 3 hours ago

jack-mil commented 3 hours ago

Some (anime) includes subtitle tracks with the language code enm. I (erroneously) thought this plugin would match any arbitrary language code that subtitles might be tagged with. Looks like a language has to be explicitly supported in the collection of language codes langcodes.py. I'm attempting to look at what info would be needed here. There is only an ISO-639-2 (three-letter) code. And I am not sure what podnapsi column is (used for).

info : [Language Preference Manager]: Custom audio prefs: lang code enm not found in db! Please report this

TL;DR: I want to match tracks tagged with enm language code.

Example media info output:

{
"@type": "Text",
"@typeorder": "1",
"StreamOrder": "2",
"ID": "3",
"UniqueID": "8646590641823328841",
"Format": "ASS",
"CodecID": "S_TEXT/ASS",
"Duration": "1429.310000000",
"BitRate": "161",
"FrameRate": "0.232",
"FrameCount": "332",
"ElementCount": "332",
"Compression_Mode": "Lossless",
"StreamSize": "28940",
"Language": "en",
"Default": "Yes",
"Forced": "No"
},
{
"@type": "Text",
"@typeorder": "2",
"StreamOrder": "3",
"ID": "4",
"UniqueID": "4877982355693749142",
"Format": "ASS",
"CodecID": "S_TEXT/ASS",
"Duration": "1429.310000000",
"BitRate": "161",
"FrameRate": "0.232",
"FrameCount": "332",
"ElementCount": "332",
"Compression_Mode": "Lossless",
"StreamSize": "28940",
"Title": "Honorifics",
"Language": "enm",
"Default": "No",
"Forced": "No"
}
jack-mil commented 3 hours ago

I adding entry, and it worked to select the desired subtitle track, but I am not sure if there are values or edge cases that need to be handled in the context of the addon.

I am using custom subtitle preference enm > eng. Not sure how (or if it is even desired) to have this "language" appear in the list of regular Language names e.g. "French, English, German"