[PR #111] Parse language code - extract base language from locale #111

Open
opened 2026-03-23 20:34:20 +00:00 by mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/tubearchivist/tubearchivist-plex/pull/111
Author: @bmcdonough
Created: 10/22/2025
Status: 🔄 Open

Base: testHead: bmcd-20251022


📝 Commits (1)

  • 1188bdb Parse language code - extract base language from locale

📊 Changes

1 file changed (+9 additions, -1 deletions)

View changed files

📝 Contents/Code/__init__.py (+9 -1)

📄 Description

In my specific use case, I had subtitles from Youtube that had a language code of en-US.
The tubearchivist-plex code utilizes the PMS Extension Framework which requires the language code to be 2 characters.
I added logic that if the language code from the subtitles contains a hyphen to only pass the first half on to the Framework.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/tubearchivist/tubearchivist-plex/pull/111 **Author:** [@bmcdonough](https://github.com/bmcdonough) **Created:** 10/22/2025 **Status:** 🔄 Open **Base:** `test` ← **Head:** `bmcd-20251022` --- ### 📝 Commits (1) - [`1188bdb`](https://github.com/tubearchivist/tubearchivist-plex/commit/1188bdb3551246b0261db5fbffe8c6458eec4dd5) Parse language code - extract base language from locale ### 📊 Changes **1 file changed** (+9 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `Contents/Code/__init__.py` (+9 -1) </details> ### 📄 Description In my specific use case, I had subtitles from Youtube that had a language code of `en-US`. The tubearchivist-plex code utilizes the PMS Extension Framework which requires the language code to be 2 characters. I added logic that if the language code from the subtitles contains a hyphen to only pass the first half on to the Framework. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
tubearchivist/archived-tubearchivist-plex#111
No description provided.