Skip to content

Add Support for visualImpaired Attribute #1494

Closed

Description

@JourneyOver

What is your feature request?

Currently, PlexAPI supports the hearingImpaired attribute with a boolean member in plexapi.media.SubtitleStream, allowing developers to easily identify and use this information. However, there is no equivalent boolean member for the visualImpaired attribute, which would be useful for identifying content designed for visually impaired users, such as those with audio descriptions.

I propose adding support for a visualImpaired boolean member to make it easier to work with this attribute in PlexAPI, similar to how hearingImpaired is implemented.

Are there any workarounds?

No response

Code Snippets

No response

Additional Context

Adding support for the visualImpaired attribute would align PlexAPI with Plex's accessibility features and improve its usability for developers building applications with accessibility in mind.

This enhancement would also create parity between hearingImpaired and visualImpaired attributes, making PlexAPI more consistent and robust.

Activity

  1. JonnyWong16 commented on Jan 15, 2025

    @JonnyWong16
    Collaborator

    Could you provide a sample subtitle file with the attribute?

  2. JourneyOver commented on Jan 15, 2025

    @JourneyOver
    Author

    @JonnyWong16, I'll see if I can get a sample provided (as I currently don't have one myself) by @gotson, who initially brought this to my attention in my repo for Plex Auto Languages.

    The XML example he shared with me is as follows:

    <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>

    However, I’m hoping @gotson can provide an actual file with the required attribute for further validation.

  3. JonnyWong16 commented on Jan 15, 2025

    @JonnyWong16
    Collaborator

    Wait, is it audio or subtitle? You mention SubtitleStream but the XML is for AudioStream.

  4. JourneyOver commented on Jan 15, 2025

    @JourneyOver
    Author

    Oh my, I just noticed that myself! I’ve been sick and barely getting any sleep this past week, so I’ve been in a bit of a fog and didn’t catch that until now and it even says Audio stream in the issue thread on my repo >.<

    Guess I should check https://python-plexapi.readthedocs.io/en/latest/modules/media.html#plexapi.media.MediaPartStream and https://python-plexapi.readthedocs.io/en/latest/modules/media.html#plexapi.media.AudioStream instead.

  5. JonnyWong16 commented on Jan 15, 2025

    @JonnyWong16
    Collaborator

    The XML you provided is enough info.

  6. JourneyOver commented on Jan 15, 2025

    @JourneyOver
    Author

    Yea at first, I thought it was for Subtitle rather than Audio, but I'm glad you caught that haha. Thanks for adding the attribute check to AudioStream! 😊

    In the meantime, I've added extendedDisplayTitle and displayTitle checks in my code as before it was just checking against title and idk if ad is always going to be the same for every visualImpaired audio stream out there or not to address the issue in my repo. Once #1495 is fully implemented, it’ll definitely make things easier for me. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions