Giter Club home page Giter Club logo

Comments (5)

pkkid avatar pkkid commented on May 5, 2024

It unfortunately hasn't been added yet.

from python-plexapi.

havardgulldahl avatar havardgulldahl commented on May 5, 2024

I've added playlist support in a branch over at https://github.com/havardgulldahl/python-plexapi/tree/playlist-support

The code depends on Plex Audio support, which is PR #41 , so I'll submit a PR with Playlist support once that one is in.

from python-plexapi.

pkkid avatar pkkid commented on May 5, 2024

In this pull request there was some weirdness around the isPartialObject() function needed to be overwritten. I think I figured out what is going on last night, but wanted to document, because I'm not 100% convinced this is the case yet. This is long, but I want to explain how this works.

How Parital Objects Work For Movies & Shows

When you search for a movie or list the details for a movie, we use the attribute key=/library/metadata/<ID> and compare that with the actual request used to get the information. For example, if I requested data from the URL http://<plexserver>/library/metadata/1234 and in the returned data the key=/library/metadata/1234, then I know I grabbed the full object. If I requested a search url http://<plexserver>/search?query=some_search then the key returned for the movie object will not equal the search url and I know we have a partial object.

The Problem With Music

The key being returned for artist results in the XML appears to be wrong. We are getting results like key=/library/metadata/1234/children. Note the extra children bit at the end. That's like searching for a TV show and saying the top level page is the List of Seasons page (and not the TV Show Synopsis page).

I believe the fix is to simply chop off the /children portion of the key when dealing with the Artist object (possibly a Plex bug or inconsistency?). In my basic testing, it seems to work fine. But I think I need to test bit a bunch more before I'm sure.

from python-plexapi.

havardgulldahl avatar havardgulldahl commented on May 5, 2024

@mjs7231 Yes, now I feel bad for not bringing this to your attention sooner. I was really confused about this, but since I haven't been using the video parts of the tree, I thought the oddities were misunderstandings on my part :)

So now that you made this writeup, I can only agree with your observations. In writing my plex extension for Mopidy, I couldn't trust key, and chose to reconstruct the path with ratingKey instead. But I'm not satisfied, it feels like a hack. I would expect key to return the canonical uri.

It's most definitely a bug in Plex.

To answer your question, I guess you could chose equally between chopping of /children or reconstructing from ratingKey, until the upstream bug is fixed.

from python-plexapi.

havardgulldahl avatar havardgulldahl commented on May 5, 2024

... and let me know if you want something else before you merge, @mjs7231! I'd be happy to amend to better suit your needs.

from python-plexapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.