Comments (5)
It unfortunately hasn't been added yet.
from python-plexapi.
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.
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.
@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.
... 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)
- Unable to connect to a Plex HTPC client HOT 3
- Add Type Hints to Improve Codebase Readability and Maintainability HOT 1
- Show and Season from the video module use wrong key to get subtitleLanguage attribute
- Add support for track genres in music libraries HOT 1
- feat: python class for available filters HOT 3
- Add support for Plex Profile Watch History and Ratings
- Library section lookup clobbered when multiple libraries have the same title
- editAlbum Missing ... HOT 1
- Unable to find Libraries after using PlexApi based python script. HOT 5
- locations is empty when casting to dict HOT 2
- Add 'merge' method for music albums
- Ability to Modify MovieHistory & EpisodeHistory details HOT 1
- Bad Request response when adding library with default language
- Issues creating `PlexClient` instances from `PlexServer` sessions in 4.15.8 HOT 1
- feat: Endpoint for computing sonic adventure
- Add View History Manually HOT 2
- Streams in MediaParts empty (reload() has no effect)
- `totalSize` of MediaContainer
- createPlaylist does not guard smart=True and non-empty items HOT 2
- "Invalid library sectionID: None" after PlexPartialObject.reload() HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-plexapi.