Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Subtitles are not found / selectable #30

Closed
1 task done
Tuckerism opened this issue Dec 3, 2023 · 13 comments
Closed
1 task done

[Bug]: Subtitles are not found / selectable #30

Tuckerism opened this issue Dec 3, 2023 · 13 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@Tuckerism
Copy link

I've read the documentation.

  • 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

Synology

Your Bug Report

Describe the bug

When using the tubearchivist-plex scanner & agent (v0.1.1), subtitles are not being found.

2023-12-03 00_53_41-Plex — Mozilla Firefox
2023-12-03 00_53_57-UCAL3JXZSzSm8AlZyD3nQdBA

Steps To Reproduce

  • In TubeArchivist, ensure subtitles are being downloaded in Application settings.
  • Download a video with captions (e.g. Primitive Technology).
  • In Plex, perform a library scan to retrieve the newly downloaded file.
  • Confirm no subtitles are available.
  • For further testing, create a second "Other Videos" library using the same TA directory and confirm that subtitles appear as expected.

Expected behavior

  • Subtitles should be selectable.

Relevant log output

2023-12-03 01:02:15,138 (7f2e29b24b38) :  DEBUG (runtime:717) - Handling request GET /:/plugins/com.plexapp.agents.tubearchivist_agent/messaging/function/X0FnZW50S2l0OlVwZGF0ZU1ldGFkYXRh/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMTAKczIKeG5zNApsYW5nYjFzNQpmb3JjZWIwczgKcGVyaW9kaWNzNQoyNDgxNXM0CmRiaWRpMApzNwp2ZXJzaW9uczExNwpjb20ucGxleGFwcC5hZ2VudHMudHViZWFyY2hpdmlzdF9hZ2VudDovL3R1YmVhcmNoaXZpc3R8VUNBTDNKWFpTelNtOEFsWnlEM25RZEJBfFVDQUwzSlhaU3pTbThBbFp5RDNuUWRCQS8yMDIzP2xhbmc9eG5zMTAKcGFyZW50R1VJRHM1CjI0ODE0czgKcGFyZW50SURzNwpUVl9TaG93czEwCm1lZGlhX3R5cGVzMTI2CmNvbS5wbGV4YXBwLmFnZW50cy50dWJlYXJjaGl2aXN0X2FnZW50Oi8vdHViZWFyY2hpdmlzdHxVQ0FMM0pYWlN6U204QWxaeUQzblFkQkF8VUNBTDNKWFpTelNtOEFsWnlEM25RZEJBLzIwMjMvMjMxMTMwMDE%40bGFuZz14bnM0Cmd1aWRzNjMKdHViZWFyY2hpdmlzdHxVQ0FMM0pYWlN6U204QWxaeUQzblFkQkF8VUNBTDNKWFpTelNtOEFsWnlEM25RZEJBczIKaWRyMAo_
2023-12-03 01:02:15,147 (7f2e29b24b38) :  DEBUG (runtime:49) - Received packed state data (80 bytes)
2023-12-03 01:02:15,149 (7f2e29b24b38) :  DEBUG (runtime:814) - Found route matching /:/plugins/com.plexapp.agents.tubearchivist_agent/messaging/function/X0FnZW50S2l0OlVwZGF0ZU1ldGFkYXRh/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMTAKczIKeG5zNApsYW5nYjFzNQpmb3JjZWIwczgKcGVyaW9kaWNzNQoyNDgxNXM0CmRiaWRpMApzNwp2ZXJzaW9uczExNwpjb20ucGxleGFwcC5hZ2VudHMudHViZWFyY2hpdmlzdF9hZ2VudDovL3R1YmVhcmNoaXZpc3R8VUNBTDNKWFpTelNtOEFsWnlEM25RZEJBfFVDQUwzSlhaU3pTbThBbFp5RDNuUWRCQS8yMDIzP2xhbmc9eG5zMTAKcGFyZW50R1VJRHM1CjI0ODE0czgKcGFyZW50SURzNwpUVl9TaG93czEwCm1lZGlhX3R5cGVzMTI2CmNvbS5wbGV4YXBwLmFnZW50cy50dWJlYXJjaGl2aXN0X2FnZW50Oi8vdHViZWFyY2hpdmlzdHxVQ0FMM0pYWlN6U204QWxaeUQzblFkQkF8VUNBTDNKWFpTelNtOEFsWnlEM25RZEJBLzIwMjMvMjMxMTMwMDE@bGFuZz14bnM0Cmd1aWRzNjMKdHViZWFyY2hpdmlzdHxVQ0FMM0pYWlN6U204QWxaeUQzblFkQkF8VUNBTDNKWFpTelNtOEFsWnlEM25RZEJBczIKaWRyMAo_
2023-12-03 01:02:15,150 (7f2e29b24b38) :  DEBUG (model:32) - Loading model with GUID com.plexapp.agents.tubearchivist_agent://tubearchivist|UCAL3JXZSzSm8AlZyD3nQdBA|UCAL3JXZSzSm8AlZyD3nQdBA/2023/23113001?lang=xn
2023-12-03 01:02:15,151 (7f2e29b24b38) :  ERROR (model:205) - Cannot read model from /var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/Plex Media Server/Metadata/TV Shows/9/5f730bb40759e20f5ce8410caeeb617779ebd39.bundle/Contents/com.plexapp.agents.tubearchivist_agent
2023-12-03 01:02:15,153 (7f2e29b24b38) :  DEBUG (networking:144) - Requesting 'http://127.0.0.1:32400/library/metadata/24815/tree'
2023-12-03 01:02:15,170 (7f2e29b24b38) :  INFO (__init__:143) - Attempting to connect to TubeArchivist at http://XYZ.local:8000 with provided token from `ta_config.json` file to test connection and poll version details.
2023-12-03 01:02:15,563 (7f2e29b24b38) :  INFO (__init__:150) - TubeArchivist is running version v0.4.4
2023-12-03 01:02:15,564 (7f2e29b24b38) :  INFO (__init__:169) - Attempting to connect to TubeArchivist to lookup YouTube channel: UCAL3JXZSzSm8AlZyD3nQdBA
2023-12-03 01:02:15,992 (7f2e29b24b38) :  INFO (__init__:225) - Response from TubeArchivist received for YouTube channel: UCAL3JXZSzSm8AlZyD3nQdBA
2023-12-03 01:02:16,089 (7f2e29b24b38) :  INFO (__init__:445) - [X] Posters: 20231203_/cache/channels/UCAL3JXZSzSm8AlZyD3nQdBA_thumb.jpg
2023-12-03 01:02:16,143 (7f2e29b24b38) :  INFO (__init__:445) - [X] Art: 20231203_/cache/channels/UCAL3JXZSzSm8AlZyD3nQdBA_tvart.jpg
2023-12-03 01:02:16,186 (7f2e29b24b38) :  INFO (__init__:445) - [X] Banners: 20231203_/cache/channels/UCAL3JXZSzSm8AlZyD3nQdBA_banner.jpg
2023-12-03 01:02:16,187 (7f2e29b24b38) :  INFO (__init__:445) - Channel metadata updates completed for Primitive Technology.
2023-12-03 01:02:16,189 (7f2e29b24b38) :  INFO (__init__:169) - Attempting to connect to TubeArchivist to lookup YouTube video: Fn9tmm-_yAI
2023-12-03 01:02:16,226 (7f2e29b24b38) :  INFO (__init__:187) - Response from TubeArchivist received for YouTube video: Fn9tmm-_yAI
2023-12-03 01:02:16,329 (7f2e29b24b38) :  INFO (__init__:445) - [X] Thumbs: 20231203_/cache/videos/f/Fn9tmm-_yAI.jpg
2023-12-03 01:02:16,329 (7f2e29b24b38) :  INFO (__init__:282) - Locally downloaded subtitle identified for video ID Fn9tmm-_yAI with language code 'en'. Additional classifications: Forced
2023-12-03 01:02:16,333 (7f2e29b24b38) :  INFO (__init__:453) - Episode 'Fn9tmm-_yAI - Primitive Technology: Natural Draft Iron Smelt' for channel Primitive Technology processed successfully.
2023-12-03 01:02:16,333 (7f2e29b24b38) :  INFO (__init__:454) - All episode files processed for Primitive Technology. Count: 1
2023-12-03 01:02:16,334 (7f2e29b24b38) :  INFO (__init__:455) - === End Of Agent's Update Call, errors after this are Plex related ===
2023-12-03 01:02:16,355 (7f2e29b24b38) :  DEBUG (model:229) - Serializing to /var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/Plex Media Server/Metadata/TV Shows/9/5f730bb40759e20f5ce8410caeeb617779ebd39.bundle/Contents/com.plexapp.agents.tubearchivist_agent/Info.xml
2023-12-03 01:02:16,358 (7f2e29b24b38) :  DEBUG (runtime:88) - Sending packed state data (119 bytes)
2023-12-03 01:02:16,359 (7f2e29b24b38) :  DEBUG (runtime:924) - Response: [200] str, 16 bytes




2023-12-03 00:43:29,052 [TubeArchivist Scanner] INFO - TubeArchivist scanner started: 2023-12-03 00:43:29,051604
2023-12-03 00:43:29,059 [TubeArchivist Scanner] INFO - Attempting to connect to TubeArchivist at http://XYZ.local:8000 with provided token from `ta_config.json` file.
2023-12-03 00:43:29,159 [TubeArchivist Scanner] INFO - TubeArchivist is running version v0.4.4
2023-12-03 00:43:29,163 [TubeArchivist Scanner] INFO - Attempting to connect to TubeArchivist at http://XYZ.local:8000 with provided token from `ta_config.json` file.
2023-12-03 00:43:29,208 [TubeArchivist Scanner] INFO - TubeArchivist is running version v0.4.4
2023-12-03 00:43:29,211 [TubeArchivist Scanner] INFO - Processing file with scanner: Fn9tmm-_yAI.mp4
2023-12-03 00:43:29,213 [TubeArchivist Scanner] INFO - File matches expected filename layout.
2023-12-03 00:43:29,213 [TubeArchivist Scanner] INFO - Attempting to connect to TubeArchivist to lookup YouTube video: Fn9tmm-_yAI
2023-12-03 00:43:29,331 [TubeArchivist Scanner] INFO - Response from TubeArchivist received for YouTube video: Fn9tmm-_yAI
2023-12-03 00:43:29,410 [TubeArchivist Scanner] INFO - Identified episode '23113001 - Primitive Technology: Natural Draft Iron Smelt' with TV Show Primitive Technology [UCAL3JXZSzSm8AlZyD3nQdBA] under Season 2023.
2023-12-03 00:43:29,410 [TubeArchivist Scanner] INFO - Adding episode '23113001' to TV show 'Primitive Technology [UCAL3JXZSzSm8AlZyD3nQdBA]' list of episodes.

Anything else?

No response

@lamusmaser
Copy link
Collaborator

I can see the subtitles being identified in the logs, so I'm not sure what's happening. I'll look into it now when I have available resources to do so.

@lamusmaser lamusmaser added bug Something isn't working help wanted Extra attention is needed labels Dec 13, 2023
@lamusmaser
Copy link
Collaborator

I have had a bit of time and hobbled together some resources to look into this.

I don't know what happened from when it was working to now, but it basically looks like it was unsetting the proxy reference settings internally, so it wasn't keeping the configuration. I have identified that this is related to the calls made to validate_keys, but I am doing more digging. I'll reference this issue when it is fixed.

@lamusmaser
Copy link
Collaborator

I was able to get it to detect when I enabled the Local Media agent with the Settings > Agents > Shows > TubeArchivist Agent settings for agent preferences. I will need to look into why it doesn't allow metadata refreshes to occur when it is only the TA Agent, but then works when there are two agents selected.

@lamusmaser
Copy link
Collaborator

I think I found the issue. In the Class initialization, we set several values to show what type of agent this is. The fallback_agent was set to None instead of False, so it was not processing it as its own agent.

For future personal reference, I determined this via the ~/Logs/PMS Plugin Logs/com.plexapp.system.log. When attempting to update the media, the Agent Order was a blank array [], which then lead me to remembering that I had, at one point, enabled the Local Media agent, but it was currently disabled. After enabling, then I had both in the Agent Order list: ['com.plexapp.agents.tubearchivist_agent', 'com.plexapp.agents.localmedia']. Making the change to the fallback_agent then allows for the TA agent to work on its own.

@lamusmaser
Copy link
Collaborator

This should now be fixed in v0.1.2. Please download and confirm on your side.

@jpm
Copy link

jpm commented Jan 1, 2024

FWIW, I'm running the latest main zip file from two days ago, and the subtitles are still not popping up on Plex.

I verified that the VTT files are located on the same folders as the MP4 files. and they do appear (and work) on the Tube Archivist web interface player.

Anything I can do here to help investigate?

@lamusmaser
Copy link
Collaborator

Can you provide the ~/Logs/PMS Plugin Logs/com.plexapp.system.log?

@jpm
Copy link

jpm commented Jan 1, 2024

@lamusmaser
Copy link
Collaborator

OK, it is only picking up the LocalMedia agent. Can you go to Settings > Agents > Shows > TubeArchivist Agent and check what is available and selected?

@jpm
Copy link

jpm commented Jan 1, 2024

This is what I see on that page on the Plex dashboard. Seems to be selected/active already.

Screenshot 2024-01-01 at 11 07 47 AM

@lamusmaser
Copy link
Collaborator

Can you select and then deselect the LocalMedia agent, restart Plex, then attempt to refresh the metadata?

@jpm
Copy link

jpm commented Jan 1, 2024

That made it work now! Thanks for your help -- I would have never guessed to try these steps...

@lamusmaser
Copy link
Collaborator

Glad to hear it is working now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants