[GH-ISSUE #110] [Installation Help]: Subtitles support #43

Closed
opened 2026-03-23 20:33:56 +00:00 by mirror · 2 comments
Owner

Originally created by @bmcdonough on GitHub (Oct 18, 2025).
Original GitHub issue: https://github.com/tubearchivist/tubearchivist-plex/issues/110

Installation instructions

  • I'm running the latest version of the TubeArchivist Plex Integration Scanner and Agent. I have read the latest release notes and installation instructions.

Operating System

Linux

Your installation or setup question

Does the support of subtitles require setting "Local Media Assets" to enable?
It works when I enable that feature.
I am starting to suspect it has to do with "language" value. I only obfuscated the video ID, the code is returning 'xx'.
Should I continue to debug why it's not working without that setting?

Image Image

Relevant log output

2025-10-18 17:26:54,127 (7cfd4bb5ab38) :  INFO (__init__:613) - Locally downloaded subtitle identified for video ID *********** with language code 'xx'. Additional classifications: Forced
Originally created by @bmcdonough on GitHub (Oct 18, 2025). Original GitHub issue: https://github.com/tubearchivist/tubearchivist-plex/issues/110 ### Installation instructions - [x] I'm running the latest version of the TubeArchivist Plex Integration Scanner and Agent. I have read the latest release notes and installation instructions. ### Operating System Linux ### Your installation or setup question Does the support of subtitles require setting "Local Media Assets" to enable? It works when I enable that feature. I am starting to suspect it has to do with "language" value. I only obfuscated the video ID, the code is returning `'xx'`. Should I continue to debug why it's not working without that setting? <img width="1011" height="444" alt="Image" src="https://github.com/user-attachments/assets/cd0a472a-df80-4338-a3b6-e70e2e3e9dda" /> <img width="359" height="257" alt="Image" src="https://github.com/user-attachments/assets/95405827-49be-40d9-b445-517ce8382395" /> ### Relevant log output ```Shell 2025-10-18 17:26:54,127 (7cfd4bb5ab38) : INFO (__init__:613) - Locally downloaded subtitle identified for video ID *********** with language code 'xx'. Additional classifications: Forced ```
Author
Owner

@bmcdonough commented on GitHub (Oct 21, 2025):

after a LOT of painful debugging within the PMS Framework library:
/usr/lib/plexmediaserver/Resources/Plug-ins-f737b826c/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/localization.py

The issue is within the TubeArchivist-Agent use of the Framework Locale.Language.Match which expects a 2 character language. The subtitles I have from youtube are using 5 characters: en-US

I added some logic to parse on the hyphen and pass the first 2 characters, which then works:

Oct 21 21:01:54 plex-dev Plex Media Server[5526]: DEBUG:com.plexapp.agents.tubearchivist_agent:bmcd lang_match results is en
Oct 21 21:01:54 plex-dev Plex Media Server[5526]: INFO:com.plexapp.agents.tubearchivist_agent:Locally downloaded subtitle identified for video ID ***** with language code 'en'. Additional classifications: Forced
Oct 21 21:01:54 plex-dev Plex Media Server[5526]: INFO:com.plexapp.agents.tubearchivist_agent:Removing language code 'xx' that is no longer available as a locally downloaded subtitle for video ID *****.
Image Image

I will submit a pull request tomorrow with greater details.

<!-- gh-comment-id:3429559037 --> @bmcdonough commented on GitHub (Oct 21, 2025): after a LOT of painful debugging within the PMS Framework library: `/usr/lib/plexmediaserver/Resources/Plug-ins-f737b826c/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/localization.py` The issue is within the TubeArchivist-Agent use of the Framework `Locale.Language.Match` which expects a 2 character language. The subtitles I have from youtube are using 5 characters: `en-US` I added some logic to parse on the hyphen and pass the first 2 characters, which then works: ``` Oct 21 21:01:54 plex-dev Plex Media Server[5526]: DEBUG:com.plexapp.agents.tubearchivist_agent:bmcd lang_match results is en Oct 21 21:01:54 plex-dev Plex Media Server[5526]: INFO:com.plexapp.agents.tubearchivist_agent:Locally downloaded subtitle identified for video ID ***** with language code 'en'. Additional classifications: Forced Oct 21 21:01:54 plex-dev Plex Media Server[5526]: INFO:com.plexapp.agents.tubearchivist_agent:Removing language code 'xx' that is no longer available as a locally downloaded subtitle for video ID *****. ``` <img width="1012" height="451" alt="Image" src="https://github.com/user-attachments/assets/208efe3b-169c-48ce-a792-a5a86a9734dc" /> <img width="354" height="263" alt="Image" src="https://github.com/user-attachments/assets/cd6c9930-f8f9-4734-955a-b3ebd16ed99a" /> I will submit a pull request tomorrow with greater details.
Author
Owner

@bmcdonough commented on GitHub (Oct 22, 2025):

I created a pull request to identify and handle subtitle languages with hyphens. Closing this issue as resolved.
Pull Request: https://github.com/tubearchivist/tubearchivist-plex/pull/111

<!-- gh-comment-id:3433740033 --> @bmcdonough commented on GitHub (Oct 22, 2025): I created a pull request to identify and handle subtitle languages with hyphens. Closing this issue as resolved. Pull Request: [https://github.com/tubearchivist/tubearchivist-plex/pull/111](https://github.com/tubearchivist/tubearchivist-plex/pull/111)
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#43
No description provided.