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

onlinemediasources empty until already edited #1110

Open
mtthidoteu opened this issue Feb 18, 2023 · 0 comments
Open

onlinemediasources empty until already edited #1110

mtthidoteu opened this issue Feb 18, 2023 · 0 comments

Comments

@mtthidoteu
Copy link

Describe the Bug

I am attempting to enable a way for new users to optout of the plex default online media sources by default. However, I am encountering a problem:

the MyPlexAccount(token).onlineMediaSources() function is empty until the user has already edited the sources from the web interface.

I am thinking this is probably a limitation with the Plex API itself and not this library. However, I might be wrong.

If so, is there a workaround you could recommend? Thanks

Code Snippets

def optOutOnlineSources(token):
    user = MyPlexAccount(token)
    for source in user.onlineMediaSources():
        source.optOut()
    return

Expected Behavior

No response

Additional Context

No response

Operating System and Version

macOS

Plex Media Server Version

Version 4.87.2

Python Version

3.11

PlexAPI Version

4.13.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant