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

Audio stream 'visualImpaired' chosen instead of standard stream #15

Closed
gotson opened this issue Jan 15, 2025 · 14 comments
Closed

Audio stream 'visualImpaired' chosen instead of standard stream #15

gotson opened this issue Jan 15, 2025 · 14 comments
Labels
bug Something isn't working

Comments

@gotson
Copy link

gotson commented Jan 15, 2025

Describe the bug
I have a show with 2 audio streams as follow:

<Stream id="121952" streamType="2" default="1" codec="eac3" index="1" channels="2" bitrate="384" language="French" languageTag="fr" languageCode="fra" audioChannelLayout="stereo" requiredBandwidths="384,384,384,384,384,384,384,384" samplingRate="48000" displayTitle="French (EAC3 Stereo)" extendedDisplayTitle="French (EAC3 Stereo)">
                </Stream>
                <Stream id="121953" streamType="2" selected="1" codec="aac" index="2" channels="2" bitrate="128" language="French" languageTag="fr" languageCode="fra" audioChannelLayout="stereo" profile="lc" requiredBandwidths="129,129,129,129,129,129,129,129" samplingRate="48000" title="AD" visualImpaired="1" displayTitle="French Descriptive (AAC Stereo)" extendedDisplayTitle="AD (French AAC Stereo Descriptive)">
                </Stream>

To Reproduce

Select the "French (EAC3 Stereo)" stream.

Expected behavior
The "French (EAC3 Stereo)" is set for the whole series.

Actual Behavior
The "French Descriptive (AAC Stereo)" is set for the whole series.

Environment Details

  • Plex Auto Languages Version: 1.3.1
  • Plex Server Version: 1.41.3.9314
  • Operating System (if applicable): Ubuntu
  • Deployment Method (if applicable): Docker
  • Additional Context: [e.g., Provide Python version if running bare metal]

Logs and Screenshots

  • Logs: [Paste here or attach as a file]
  • Screenshots: [Attach images or provide links]
@JourneyOver
Copy link

JourneyOver commented Jan 15, 2025

Unfortunately, this one seems more challenging than #2, as PlexAPI doesn't appear to provide a boolean member or similar functionality for the visualImpaired attribute, unlike hearingImpaired. Addressing this might require an upstream change in PlexAPI itself before I can actually fix this issue.

@dekaidekai, do you have any suggestions on what could be done short of submitting a feature request to https://github.com/pkkid/python-plexapi for adding support for this attribute? (Tagging you since you devised the original solution for the hearingImpaired attribute.)

@JourneyOver JourneyOver added the bug Something isn't working label Jan 15, 2025
@JourneyOver
Copy link

JourneyOver commented Jan 15, 2025

Tracking issue: pkkid/python-plexapi#1494. Once this is implemented, I should be able to address this easily.

@JourneyOver
Copy link

I just realized this was for AudioStream and not SubtitleStream. Being sick and in a fog definitely doesn’t help when reviewing issues—I tend to miss things >..<

I’ve reached out to Jonny in the same issue I had made above to see if there’s a way to retrieve this information. If there is, I should have a fix out within the next day.

JourneyOver added a commit that referenced this issue Jan 15, 2025
#15

Hopefully helps with not choosing `visualImpaired` audio streams unless explicitly set (like commentary), right now it only checks for the term in `extendedDisplayTitle`, `displayTitle` and `title` as there doesn't seem to be a way to check for a `visualImpaired` attribute any.

I honestly don't even know if this is going to work or not as I've been in a fog this whole week due to being sick, and I do not have any video examples myself to test against this.
@JourneyOver
Copy link

JourneyOver commented Jan 15, 2025

@gotson Could you check if my latest :main commit resolves this issue for you? I made a few changes as a shot in the dark, but I don't have any examples to test against myself. Let me know if the commit fixes the issue or causes any problems with cases like your example.

@dekaidekai
Copy link

dekaidekai commented Jan 16, 2025

Yeah my thoughts would be wait to get visualImpaired metadata support from python-plexapi and then similar to our SDH work on subtitles filter out with that value 👍

@JourneyOver
Copy link

JourneyOver commented Jan 16, 2025

@dekaidekai Yeah, I’m currently waiting for a PR to get merged and for a release on the PlexAPI side as Jonny did end up making a PR for the attribute once we figured out the whole it was for audioStream and not SubtitleStream situation xD. The current change I implemented at the moment is more of a "hope it works for now" type of commit. I plan to improve it in the near future once things progress a bit more. 😅

I’m just hoping Gotson can get back to me soon enough so I can at least get some kind of confirmation of the current commit.

@dekaidekai
Copy link

@JourneyOver okay nice best of luck, and hope you feel better soon! Your hard work is always appreciated but remember feel free to do it at your own pace. Your health takes priority 🙏

@gotson
Copy link
Author

gotson commented Jan 16, 2025

@gotson Could you check if my latest :main commit resolves this issue for you? I made a few changes as a shot in the dark, but I don't have any examples to test against myself. Let me know if the commit fixes the issue or causes any problems with cases like your example.

would that be available as a Docker image ?

@JourneyOver
Copy link

@gotson Yes, that’s exactly what the :main tag is for. I use three different types of tags for PAL: :main, :latest, and versioned tags (e.g., :1.3.0 or :1.3.1 etc).

@gotson
Copy link
Author

gotson commented Jan 16, 2025

@gotson Yes, that’s exactly what the :main tag is for. I use three different types of tags for PAL: :main, :latest, and versioned tags (e.g., :1.3.0 or :1.3.1 etc).

nice, let me give it a try

@gotson
Copy link
Author

gotson commented Jan 16, 2025

@JourneyOver you madman, that worked ! Thanks a lot.

@JourneyOver
Copy link

JourneyOver commented Jan 16, 2025

Great glad to hear! I'll be improving the code slightly in the future for this as well once pkkid/python-plexapi#1495 gets merged in and a release happens on PlexAPI side of things so I may ping you when that happens in the future to test it out, but I'm glad to hear at least my current solution is working.

Since this is now fixed, I am going to be closing this issue for now.

(I'm thinking of make an actual :latest release here soon as well since it's been a tiny bit)

@gotson
Copy link
Author

gotson commented Jan 16, 2025

(I'm thinking of make an actual :latest release here soon as well since it's been a tiny bit)

if you do please let me know, so i can move back to latest.

so I may ping you when that happens in the future to test it out

no worries, would be happy to test

@JourneyOver
Copy link

JourneyOver commented Jan 16, 2025

@gotson I just pushed a new release so feel free to move back to :latest whenever you feel like ^^

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

No branches or pull requests

3 participants