Code Monkey home page Code Monkey logo

Comments (6)

glensc avatar glensc commented on June 11, 2024

I wonder how can you mix two servers in same request

For single server it's:

  • items?uri=server://<server_id>/com.plexapp.plugins.library/library/metadata/<key1>,<key2>

repeat uri?

  • items?uri=server://<server1_id>/com.plexapp.plugins.library/library/metadata/<key1>,<key2>&uri=server://<server2_id>/com.plexapp.plugins.library/library/metadata/<key3>,<key4>

from python-plexapi.

JonnyWong16 avatar JonnyWong16 commented on June 11, 2024

My guess is Plex won't allow adding items from different servers in the same API call. You probably need to add from one server at a time.

from python-plexapi.

glensc avatar glensc commented on June 11, 2024

With multiple calls, how can I ensure the order? Seems to become overly complex if need to split to multiple calls.

from python-plexapi.

glensc avatar glensc commented on June 11, 2024

Could do move, so every "other server" items need to be moved:

in above example I moved foreign server entry.

I foresee already problem with their implementation if they use key (and no server) as primary key in the playlist, i.e collision of same key value from different servers.

lucky guess, maybe bulk move also works:

from python-plexapi.

JonnyWong16 avatar JonnyWong16 commented on June 11, 2024

I don't see any way to add items from multiple servers at the same time in Plex Web. The only way I can find to select items from multiple servers is using different hubs pinned on the homepage, but the "Add to Playlist" button disappears as soon as you multi-select from different servers. I really don't think Plex allows this in one single API call.

You would need to make two separate API calls:

PUT http://localhost:32314/playlists/<playlist_id>/items?uri=server://<server1_id>/com.plexapp.plugins.library/library/metadata/<key1>,<key2>
PUT http://localhost:32314/playlists/<playlist_id>/items?uri=server://<server2_id>/com.plexapp.plugins.library/library/metadata/<key3>,<key4>

Which results in the order <key1>, <key2>, <key3>, <key4>.

If you want <key1>, <key3>, <key2>, <key4>, then you would need to make 4 API calls.

We could handle multiple server item ordering automatically internally in the PlexAPI library (i.e. make the separate API calls for the user).

from python-plexapi.

JonnyWong16 avatar JonnyWong16 commented on June 11, 2024

Try #1411

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.