-
-
Notifications
You must be signed in to change notification settings - Fork 399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Support for sharing labels #453
Comments
I'm just speaking out of my ass here but wouldn't this be easier if Sonarr and CP supported this first? The only thing Plex API is being used for is authentication and checking if you already have a title on the server. |
@Rsslone - my thoughts on it are, right now Sonarr and CP don't have any kind of awareness of sharing or users on your server. Also, like PR right now, don't write anything via the Plex API (that I can think of). So, while this would definitely be a big step for PlexRequests to take, I think it at least has a foot in the door, compared with Sonarr/CP. I also think it just makes more sense in general here, since the goal is to automatically provide new-content to users on demand. So, I think this is still in line with that goal, just more complicated. |
@tidusjar will have to comment on how feasible it is but I agree it could be a useful feature. |
I think it's a feature that could be implemented, I can see it's use. It shall be done, but when I have no idea, got a lot of things to do before this! |
Just a heads up, I started looking into this, basically a mile-high overview of what API calls might be required and such. One issue that didn't occur to me is that the User->Label mapping is one-to-many. So, I don't think automatic handling of label mapping could be done, as it would be impossible to know what the "primary" label for any given user is. Labels might also be shared between two users. However, it is easy enough to retrieve a full list of share labels. So, maybe the UI could present a manual interface, where the user is able to select mapping for User->Label within PR. |
Thanks for taking a look. It sounds like it's getting more complex! |
Yes, it does seem like a solution will be fairly complex! The good news is that the required Plex API calls are at least fairly straightforward. I have been able to add/remove a label to a given Show/Movie. Also, retrieving whether or not a Show/Movie already has a share label only requires a slight modification to the metadata API call that was already being made (for advanced searching option). |
Just wanted to post an update on what I'm thinking so far, after poking around in the TV search/request code today - Possible Scenarios (TV Shows)To begin with, this is working on the assumption that the search UI will display a show as if it does not yet exist in Plex, if the show doesn't have the proper share label for the current user. Users will be able to "request" it, even when it exists (when they don't have share label access to it yet). 1) Someone requests a full show, it already exists on Plex but is not shared Request is flagged to just required approval (will not send to Sonarr). Can include this status in the "content" json stored in DB, once approved sharing label will be added to the show 2) Someone requests a full show, it does not yet exist on Plex Request is submitted as normal, however once request is fulfilled, any users on that request will also get their sharing labels assigned 3) Someone requests specific episodes on Plex, some episodes exist, some do not, show is (or is not) shared yet Essentially same as 2, but the request will be for episodes, no need to check for sharing label, can just assign it again in Plex API, without having to worry about duplicates 4) Someone requests specific episodes on Plex, and all of them exist, but show is not shared yet Similar to 1, a request is created still, but once approved it simply sets the needed share label Extra Notes
Complications
|
With a Plex Pass, instead of sharing an entire library with every user, you are able to restrict based on "sharing labels". This is useful if you are setup on a server with limited bandwidth, and don't want to share every TV Show and Movie with every user. With this feature you can whitelist specific TV Shows or Movies, to make them accessible to a given user.
The first step is setting up "sharing labels" is under Users -> Friends -> {Username} -> Restrictions. For an example, you can allow "User1" to only access media that is has a sharing label of "Friend1" in your TV Show and Movie libraries.
The second step would be adding this sharing label to a piece of media. This can be done by going to any TV Show or Movie, then hitting Edit->Sharing. Here you can add the users' label that you'd like to have access e.g. "Friend1". You can add as many sharing labels as you want to one piece of media.
My proposal for a PlexRequests.Net feature would be an automatic way to handle this sharing label process. Here are some thoughts I had on it ->
First step would be to have an option for "restricted (label based) sharing". If this is enabled, it will present a mapping of "username" to "share label" that you can setup. Or maybe this info can even be retrieved automatically from Plex?
Now when a user requests a TV Show or Movie, the normal flow of events occurs. However, after the media is confirmed to have been added to Plex, it would also write the "share label" to it, to allow access. Will have to see if this is something that can be easily done w/ the Plex API?
One consideration would be, what happens if the media is already present on the Plex Server, but the user requesting it does not yet have access to it? I would think that in this case, it would wait for approval of the admin, then go ahead and add the "share label", to allow access to said media.
The text was updated successfully, but these errors were encountered: