Skip to content
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/Fix Request : Support for Plex Home #185

Closed
JigSawFr opened this issue Apr 27, 2016 · 22 comments
Closed

Feature/Fix Request : Support for Plex Home #185

JigSawFr opened this issue Apr 27, 2016 · 22 comments

Comments

@JigSawFr
Copy link

Hello,
It could be great to add Plex Home support.
When you refresh Users, Plex Home members are shown as an "empty" item in list.
So, why not include Plex Home members to requests too, just by entering their name,
Or by creating a password on PlexRequests side for them :)

Thanks you !

@tidusjar
Copy link
Member

Sorry, I'm not sure what Plex Home members are, can you explain a bit more?

@JigSawFr
Copy link
Author

@tidusjar Plex Home is a Plex Pass functionnality described here: https://support.plex.tv/hc/en-us/articles/203815766-What-is-Plex-Home-
So, you can have local user in a Plex Account

@tidusjar
Copy link
Member

Hmmm... I've taken a look an I can't seem to find out how to get that information from the Plex Api.

@JigSawFr
Copy link
Author

But it seems that they are present in list of Plex Requests but with empty pseudo no ?

@tidusjar
Copy link
Member

They are present in Plex Requests? What do you mean? In the admin screen?

@JigSawFr
Copy link
Author

JigSawFr commented Apr 27, 2016

@tidusjar Yes there are some blank items in users list, maybe my Plex Home users i think ?

@tidusjar
Copy link
Member

Can you please show me a screenshot?

@JigSawFr
Copy link
Author

Yes of course @tidusjar
Plex Home

@tidusjar
Copy link
Member

Oh ok, that's interesting! I'll take a look. I do not have Plex Pass myself so I may ask for some assistance from you at some point if that is ok?

@JigSawFr
Copy link
Author

No problem i can help you to introduce this feature if you want ;)

@tidusjar
Copy link
Member

@JigSawFr You are welcome to take a look!

https://github.com/tidusjar/PlexRequests.Net/blob/master/PlexRequests.UI/Modules/AdminModule.cs#L260

The above is where we filter get the users from the Plex api.

@Drewster727
Copy link
Contributor

interestingly, I also use Plex Home, but I don't have any blanks like what @JigSawFr sees. My plex home users show up just fine in the list. What would the benefit be to adding support for plex home? are you trying to automatically make these users admins in plexrequests?

@tidusjar
Copy link
Member

That's interesting then. The only reason why they would be blank is if Plex told us they are empty strings or whitespace.

@JigSawFr Can you open up the browser development tools (F12) and use the DOM/Element inspector on one of the empty items in the box and post the results?

@JigSawFr
Copy link
Author

@tidusjar yes they are empty:

<select id="users" multiple="" class="form-control-custom "><option>XXX</option><option></option><option>XXX</option><option></option><option>XXX</option><option>XXX</option><option>XXX</option><option>XXX</option></select>

I will fork it and work on it to view results of requests.

@Drewster727 you see your Home's users in the list directly ?
My family's members have each a local account (by Plex Home), not a regular Plex Account, so i connect each devices with my account and they select their user (with PIN code). So, they have all Plex Pass abilities. (And it's easier for me, not needed to create N Plex accounts for everyone). All is correctly monitored by PlexPy (I can see stats about local users with no problems).
Goal is not to make them admin, but to let them submit requests (by entering their local name w/o a pin)

@tidusjar
Copy link
Member

tidusjar commented Apr 27, 2016

@JigSawFr Can you put this in your browser where YOURAPIKEY is your Plex api key?

https://plex.tv/pms/friends/all?X-Plex-Client-Identifier=das&X-Plex-Product=dsa&X-Plex-Version=123&Content-Type=application/xml&X-Plex-Token=YOURAPIKEY

We use the username property in the User node, what is appearing for you?

e.g.

<User id="7123031" title="test" username="test" email="test.test@test.com" recommendationsPlaylistId="a55849c49f70cb23" thumb="https://plex.tv/users/456456/avatar">
    <Server id="465" serverId="456" machineIdentifier="465456655465" name="test" lastSeenAt="1461745825" numLibraries="5" owned="1"/>
</User>

@JigSawFr
Copy link
Author

JigSawFr commented Apr 27, 2016

Okay i've understand why, username and email are blank for Plex Home users as this example:
<User id="123456789" title="Julie" username="" email="" recommendationsPlaylistId="abc123abc123" thumb="https://plex.tv/users/abc123abc123/avatar"> <Server id="123456789" serverId="123456789" machineIdentifier="abc123abc123" name="MyHomeServer" lastSeenAt="123456789" numLibraries="3" owned="1"/>
We need to use title instead of username no ? :)

@tidusjar
Copy link
Member

tidusjar commented Apr 27, 2016

The reason why I chose to use username is because it made sense at the time. But I don't know if the Title could be different to the username...

From what I have seen the Title is always the same as the username but I don't know that 100%

@JigSawFr
Copy link
Author

PlexPy is using title as Local users are working on it. I've not seen any option to change title on Plex.tv

@tidusjar
Copy link
Member

Yeah looks like everyone is using title! Guess we will change it :D

@tidusjar tidusjar added this to the Release v1.7.0 milestone Apr 27, 2016
tidusjar pushed a commit that referenced this issue Apr 28, 2016
@JigSawFr
Copy link
Author

JigSawFr commented Apr 28, 2016

@tidusjar so it's now possible for local users to request something with their pseudo ? And they will be denied if we require a password ? Login control check if pseudo provided is present in users list no ?

@tidusjar tidusjar reopened this Apr 28, 2016
tidusjar pushed a commit that referenced this issue Apr 28, 2016
@tidusjar
Copy link
Member

@JigSawFr Sorry, I forgot about that!

So I just change it. So if we require authentication without a password we will check the title of your users returned from the Plex Api.

If it requires a password then it's not going to work as we preform a different Plex Api call to log the actual user into Plex.

@tidusjar
Copy link
Member

If you want to test this, you can use this build: https://ci.appveyor.com/project/tidusjar/requestplex/build/1.6.304/artifacts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants