xbmc / metadata.themoviedb.org.python

Other
46 stars 41 forks source link

Language codes #54

Closed KarellenX closed 4 years ago

KarellenX commented 4 years ago

TheMovieDB seems to now have issue with two character language codes and Travis Bell has requested we update to using four character language codes.

Initially reported on the forum here... https://forum.kodi.tv/showthread.php?tid=339672&pid=2972074#pid2972074 and subsequently confirmed by me and others members.

This is a problem... fr Resolved by using this... fr-FR

Conversation at TheMovieDB can be found here... https://www.themoviedb.org/talk/5f423cce6a34480036b64034?page=1#5f5e96643123450038603e07

Thanks for the reminder @rmrector

@pkscout Affects TV Shows as well.

pkscout commented 4 years ago

Ha ha! I'm so far behind the TV show parser doesn't even support language choices yet. 🤣 But thanks for the heads up.

KarellenX commented 4 years ago

I have converted the string in settings.xml to use 4 character codes. Hopefully this helps.

<setting label="30002" type="select" values="ar-AE|ar-SA|be-BY|bg-BG|bn-BD|ca-ES|ch-GU|cs-CZ|da-DK|de-DE|el-GR|en-US|eo-EO|es-ES|es-MX|et-EE|eu-ES|fa-IR|fi-FI|fr-CA|fr-FR|gl-ES|he-IL|hi-IN|hu-HU|id-ID|it-IT|ja-JP|ka-GE|ko-KR|lt-LT|lv-LV|ml-IN|nb-NO|nl-NL|no-NO|pl-PL|pt-BR|pt-PT|ro-RO|ru-RU|sk-SK|sl-SI|sr-RS|sv-SE|ta-IN|th-TH|tr-TR|uk-UA|vi-VN|zh-CN|zh-HK|zh-TW" id="language" default="en-US"/>

English (en) has numerous variations available. I added en-US. Should others be added?

  "en-AU",
  "en-CA",
  "en-GB",
  "en-IE",
  "en-NZ",
  "en-US",

hr has been removed as I could not find the Croation code

KarellenX commented 4 years ago

Ha ha! I'm so far behind the TV show parser doesn't even support language choices yet. 🤣 But thanks for the heads up.

Caught out by a "gotcha". There are no settings in the TV Maze scraper, but plenty for TheMovieDB :)

rmrector commented 4 years ago

Well, we probably better just change it in the scraper.

For English, maybe just "en-EN" for now - that should match the same results as their API provides now.

rmrector commented 4 years ago

Fixed by 1.3.0 / #55.