If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

Using Plex API (Python) with Heroku won't initiate playback

ryaninbinaryryaninbinary Posts: 7Validating, Plex Pass Plex Pass

I'm trying to use this:
https://github.com/pkkid/python-plexapi

When I test locally, everything works 10/10. As soon as I push the code to Heroku, log prints that it's trying to play, but then eventually (at the 30s mark) throws a 500 because of the timeout. Anyone seen anything similar or know how to fix it?

cars = plex.library.section("Movies").get("Cars")
client = plex.client("Living Room")
client.playMedia(cars)

After being signed in. If I run this by hosting my python server locally, everything runs fine.

Answers

  • ryaninbinaryryaninbinary Posts: 7Validating, Plex Pass Plex Pass
    edited December 7

    I also just tried this...

    cars = plex.library.section("Movies").get("Cars")
    print("Found movie name")
    client = plex.client(client_name)
    print("Setup client")
    client.playMedia(cars)
    print("Client should be playing.")
    

    The Heroku server prints

    Found movie name
    Setup client
    

    Then nothing happens.

  • PKKidPKKid Posts: 34Members, Plex Pass Plex Pass

    What is the client you are trying to play to?

    Also, if you post this question on the github page, you'll get better help as it emails us when you ask. -- https://github.com/pkkid/python-plexapi

  • ryaninbinaryryaninbinary Posts: 7Validating, Plex Pass Plex Pass

    The client is an Apple TV

Sign In or Register to comment.