PMS API `Move Hub` Endpoint doesn't appear to work

https://developer.plex.tv/pms/#tag/Hubs/operation/hubsSectionsSectionManagePutMove

This API endpoint, which looks like should allow re-ordering of collections on the home page etc, doesn’t appear to work at all and it’s logs don’t align with the API documentation. It seems like it should return a JSON blob “MediaContainer” object and it just doesn’t, even though the response appears valid. I don’t see any change on the web GUI either, but if I manipulate the order via the web GUI and then re-run hubs/sections/1/manage I do see changes then. So the feature works, API does not.

I’ve attached logs with some elements scrubbed out but they should show relevant status data about the server, the response I’m seeing, and the link should go straight to the endpoint documentation I’m trying to use. More or less I’m looking to fork GitHub - jl94x4/ColleXions: ColleXions automates the process of pinning collections to your Plex home screen, making it easier to showcase your favorite content. With customizable features, it enhances your Plex experience by dynamically adjusting what is displayed, randomly. so I can control the order of collections on the home screen and otherwise rationalize the config a bit.

PlexLogs.log (12.5 KB)

You’re using the PMS owner’s Plex token, aren’t you?

Is the endpoint you’re trying to use

a) to reorder the library’s recommended hub (or other hubs within the library) … or ….

b) to reorder things on the user’s general home screen?

Did you try to get content from the id’s you’re using? In your XML manage GET request, I see these with “…” while your CURL Post Request is not using these “…” … do you get an error if using encoded quotes?

Maybe you want to create and implant a new hub instead of trying to move a standard one?

Maybe try to reorder the home screen with an unpin all / re-pin in specific order strategy?

I’ve not seen a working exampe of code for moving hubs yet (but I would also be interested in getting more info here).

But while the documentation of this only talks about URL query parameters which you offered, the example on the right shows to have a JSON structure as a response. I think, a developer should take a look at this if you don’t get such a response.

{
"MediaContainer": {
"size": 8,
"Hub": [
{
"identifier": "movie.recentlyreleased",
"title": "Recently Released Movies",
"recommendationsVisibility": "all",
"homeVisibility": "none",
"promotedToRecommended": true,
"promotedToOwnHome": false,
"promotedToSharedHome": false
},
{
"identifier": "movie.recentlyadded",
"title": "Recently Added Movies",
"recommendationsVisibility": "all",
"homeVisibility": "all",
"promotedToRecommended": true,
"promotedToOwnHome": true,
"promotedToSharedHome": true
},
{
"identifier": "recent.library.playlists",
"title": "Library Playlists",
"recommendationsVisibility": "all",
"homeVisibility": "none",
"promotedToRecommended": true,
"promotedToOwnHome": false,
"promotedToSharedHome": false
},
{
"identifier": "movie.genre",
"title": "Top Movies in (Genre)",
"recommendationsVisibility": "all",
"homeVisibility": "none",
"promotedToRecommended": true,
"promotedToOwnHome": false,
"promotedToSharedHome": false
},
{
"identifier": "movie.by.actor.or.director",
"title": "Top Movies by (Actor or Director)",
"recommendationsVisibility": "all",
"homeVisibility": "none",
"promotedToRecommended": true,
"promotedToOwnHome": false,
"promotedToSharedHome": false
},
{
"identifier": "movie.topunwatched",
"title": "Top Unplayed Movies",
"recommendationsVisibility": "all",
"homeVisibility": "none",
"promotedToRecommended": true,
"promotedToOwnHome": false,
"promotedToSharedHome": false
},
{
"identifier": "movie.curated",
"title": "Seasonal Movies",
"recommendationsVisibility": "all",
"homeVisibility": "all",
"promotedToRecommended": true,
"promotedToOwnHome": true,
"promotedToSharedHome": true
},
{
"identifier": "movie.recentlyviewed",
"title": "Recently Played Movies",
"recommendationsVisibility": "all",
"homeVisibility": "none",
"promotedToRecommended": true,
"promotedToOwnHome": false,
"promotedToSharedHome": false
}
]
}
}

I believe there is an error in the documentation. It should be

PUT /hubs/sections/{sectionId}/manage/{identifier}/move?after={after}

Example:

PUT /hubs/sections/1/manage/movie.recentlyreleased/move?after=movie.recentlyadded

See the implementation in the Python PlexAPI wrapper.

1 Like