Jump to content

Recommended Posts

bakes82
Posted

There a way to block a device?

Looking at the DeviceManager service doesnt look like a way to remove a device, is that possible, I see you can do it from the UI lol.

If you delete a device does it kick all the stream/log out that user like I assume it should?

Happy2Play
Posted

Have you looked at DeviceServices. 

image.thumb.png.fac067cfeadd4b4671d4a2011904b006.png

I just looked at the call made in the server log.

2022-04-04 15:37:31.576 Info Server: http/1.1 DELETE http://‌‍‍localhost‌:8097/emby/Devices?Id=439dba90-7484-41e4-b497-92b9c73345aa&X-Emby-Client=Emby

I don't believe there is a global block, only a per user device access.

bakes82
Posted
41 minutes ago, Happy2Play said:

Have you looked at DeviceServices. 

image.thumb.png.fac067cfeadd4b4671d4a2011904b006.png

I just looked at the call made in the server log.

2022-04-04 15:37:31.576 Info Server: http/1.1 DELETE http://‌‍‍localhost‌:8097/emby/Devices?Id=439dba90-7484-41e4-b497-92b9c73345aa&X-Emby-Client=Emby

I don't believe there is a global block, only a per user device access.

Yea this never applies to the plug-in c# api so idk why you keep referring me to it.  I checked in C# the device manager service and didn’t see a remove. 

Posted

It's stored in UserPolicy for each user, so you'd have to update that.

bakes82
Posted

@Luke Can I get a list of user Devices from ApiClient.getDevices();

In C# I have to use the users "InternalId" as its a long.  But I dont see a "long" being returned in APIClient.GetUsers();  I tired passing in the user.Id from thats the GUID no dashes and it still gives me back all the users.

 

Posted

Is this a plugin or a separate app using our old c# libs?

bakes82
Posted (edited)
31 minutes ago, Luke said:

Is this a plugin or a separate app using our old c# libs?

Its a plugin so its the injected JS ApiClient.

 

In c# I do this:
 

var userDevices = _deviceManager.GetDevices(new DeviceQuery
                                                            {
                                                                UserId = user.InternalId
                                                            })
                                                .Items.Where(x => x.AppName != "Emby Web")
                                                .ToList();

In JS Im doing This: I looks like the getDevice() takes in a "query" but idk what to pass in, also when you do .getUsers from JS no "internalId" is returned.
 

 function loadUserDevices(userName) {
                        ApiClient.getDevices().then((devices) => {

 

Edited by bakes82
bakes82
Posted

@Luke Is there a way to figure out what devices are counted towards the device limit cap.  Like if I set an account to a specific device, they can no longer use the web, but isnt the web a free device?  And the only way to allow them to use the web would then be to allow all which means they could go add other devices.  This whole device limit thing seems horribly flawed and then when you try to restrict it to a couple devices per user then being able to view the webpage gets broken.

  • 2 months later...
Posted

OK the way the device id's come out of the api needs to be reworked, and that will resolve this. It's on my to do list.

Posted
On 4/13/2022 at 6:47 PM, bakes82 said:

Is there a way to figure out what devices are counted towards the device limit cap

Hi.  Are you talking Premiere devices or your internal server?

There is no way to see or manage the Premiere devices.  This is for a number of reasons but the device limits are set generously for a home media server for a single family such that it really shouldn't be necessary for our intended usage.

  • 2 weeks later...
Posted

This will be in the next beta build. The device id's coming out of the api will be the same as what you get internally via plugin. That will be the database id of the device.

The reported device id that came from the client will be in it's own property now, ReportedDeviceId.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...