Happy2Play 8282 Posted September 5, 2021 Share Posted September 5, 2021 I think a specific example is needed but with a "Device count threshold to flag as an issue" of 1, you will always have this issues as I have a Roku listed that was last used over a year ago. 1 Link to comment Share on other sites More sharing options...
chef 3745 Posted September 5, 2021 Author Share Posted September 5, 2021 (edited) 19 minutes ago, Happy2Play said: I think a specific example is needed but with a "Device count threshold to flag as an issue" of 1, you will always have this issues as I have a Roku listed that was last used over a year ago. I'd have to look and see what in the world I wrote... In your example, that Roku device should be removed because it hasn't been accessed, right? Even if the threshold is 1? Edited September 5, 2021 by chef Link to comment Share on other sites More sharing options...
Happy2Play 8282 Posted September 5, 2021 Share Posted September 5, 2021 Just now, chef said: I'd have to look and see what in the world I wrote... In your example, that Roku device should be removed because it hasn't been accessed, right? Correct removing devices that have not been accessed in x amount of time would cover it, but would have to re-read topic why that route was not taken. 1 Link to comment Share on other sites More sharing options...
igeoorge 26 Posted September 5, 2021 Share Posted September 5, 2021 I'm just dropping by to thank you guys for trying to fix this. I really need this plugin, it just helps me a lot! Link to comment Share on other sites More sharing options...
RaptorCentauri 49 Posted February 11, 2022 Share Posted February 11, 2022 Is there a working link for this plugin? The download link on the first post is non-functional. Link to comment Share on other sites More sharing options...
Happy2Play 8282 Posted February 12, 2022 Share Posted February 12, 2022 20 hours ago, RaptorCentauri said: Is there a working link for this plugin? The download link on the first post is non-functional. Updated link in first topic. Link to comment Share on other sites More sharing options...
bakes82 90 Posted April 11, 2022 Share Posted April 11, 2022 Is this on github anywhere? Link to comment Share on other sites More sharing options...
chef 3745 Posted April 11, 2022 Author Share Posted April 11, 2022 1 hour ago, bakes82 said: Is this on github anywhere? I think so. I'll check. If it isnt, I'll put it there. Link to comment Share on other sites More sharing options...
chef 3745 Posted April 11, 2022 Author Share Posted April 11, 2022 @bakes82 yeah, it isn't there. I'll create the repo. Link to comment Share on other sites More sharing options...
bakes82 90 Posted April 12, 2022 Share Posted April 12, 2022 2 hours ago, chef said: @bakes82 yeah, it isn't there. I'll create the repo. See keeping stuff top secret huh. Link to comment Share on other sites More sharing options...
chef 3745 Posted April 12, 2022 Author Share Posted April 12, 2022 1 hour ago, bakes82 said: See keeping stuff top secret huh. I actually forgot to put that repo in there It's an older plugin, it works but dont laugh at my early code. It might be just the worst. Link to comment Share on other sites More sharing options...
Happy2Play 8282 Posted April 12, 2022 Share Posted April 12, 2022 1 minute ago, chef said: I actually forgot to put that repo in there It's an older plugin, it works but dont laugh at my early code. It might be just the worst. All that matters is it works. 1 Link to comment Share on other sites More sharing options...
chef 3745 Posted April 12, 2022 Author Share Posted April 12, 2022 looks like it uploaded okay. https://github.com/chefbennyj1/Emby.DeviceCleaner Link to comment Share on other sites More sharing options...
vaise 304 Posted June 7, 2022 Share Posted June 7, 2022 Hi @chef If you feel like taking a break from the work on the auto organize, can I propose a mod to this devices list to show devices not connected in the last XX weeks (configurable), and allow those to be deleted. I have run your plugin (coffee on the way), but I still have 194 devices...... Link to comment Share on other sites More sharing options...
chef 3745 Posted June 8, 2022 Author Share Posted June 8, 2022 2 hours ago, vaise said: Hi @chef If you feel like taking a break from the work on the auto organize, can I propose a mod to this devices list to show devices not connected in the last XX weeks (configurable), and allow those to be deleted. I have run your plugin (coffee on the way), but I still have 194 devices...... I would have to figure device activity. I know that we can find out when the last time a user was on, but I don't know if there is data on the device activity specifically. Let me take a look at the API and see what is there. If that data is available then we can absolutely do that. I think it is a great idea! Link to comment Share on other sites More sharing options...
Happy2Play 8282 Posted June 8, 2022 Share Posted June 8, 2022 7 minutes ago, chef said: I would have to figure device activity. I know that we can find out when the last time a user was on, but I don't know if there is data on the device activity specifically. Let me take a look at the API and see what is there. If that data is available then we can absolutely do that. I think it is a great idea! Looks like maybe "DateLastActivity" { "Name": "My Desktop", "Id": "863aca3b-5db9-4b7f-a4c3-2d282603fa91", "LastUserName": "Media", "AppName": "Emby Web", "AppVersion": "4.7.0.25", "LastUserId": "5a53fdc26e094dfeb5b768xxxxxxxxxx", "DateLastActivity": "2022-02-25T01:28:12.0000000Z", "IconUrl": "https://github.com/MediaBrowser/Emby.Resources/raw/master/images/devices/chrome.png" } 1 Link to comment Share on other sites More sharing options...
chef 3745 Posted June 8, 2022 Author Share Posted June 8, 2022 Awesome! Yes, I'll write it right away. Link to comment Share on other sites More sharing options...
vaise 304 Posted June 8, 2022 Share Posted June 8, 2022 You da man @chef!!!!! Link to comment Share on other sites More sharing options...
chef 3745 Posted June 9, 2022 Author Share Posted June 9, 2022 Yeah, I remember now. ...The C# libraries don't have a 'Remove Device' method. But, that's okay. It just means we have to wrap our own client with that method in it. Might take a little longer then planned. Link to comment Share on other sites More sharing options...
chef 3745 Posted June 9, 2022 Author Share Posted June 9, 2022 Interesting, I had originally wanted to create a scheduled task that would handle removing devices after a set amount of time of inactivity. But, that has proven to be a more difficult to handle on the backend then I thought. Note: At some point I really should figure out the code for extension methods that call missing emby API calls. It would probably be useful. What I can do is list devices that are considered "expired", in the UI. Then the UI ApiClient can send the command to remove them. I will post the dll with that ability here this evening. Link to comment Share on other sites More sharing options...
chef 3745 Posted June 16, 2022 Author Share Posted June 16, 2022 @vaise I have finished this. Sorry it took so long. I added the ability to show last activity dates, and the client devices should be targeted for removal. I'll post the dll below. 1 Link to comment Share on other sites More sharing options...
chef 3745 Posted June 16, 2022 Author Share Posted June 16, 2022 This a bit more difficult. Because we are grouping devices in order to calculate the unwanted abundance of them I had to handle expired devices like this: Where the devices are still grouped, however each group will allow the user to remove expired devices that have reregistered themselves under new ID's, and have exceeded the limit/threshold of days existing on the server. In the image above "Amber's IPhone" apparently reregistered itself under a new ID at some point back in 2021, and it still exists in the device list. I can now remove that entry, and get it cleaned up. One more moment to test the device removal, and I'll post the DLL. Link to comment Share on other sites More sharing options...
chef 3745 Posted June 16, 2022 Author Share Posted June 16, 2022 Cool! Here you are Version 1.0.0.1 Added Expired Device ability. DeviceEditor_v1.0.0.1.zip 1 1 Link to comment Share on other sites More sharing options...
vaise 304 Posted June 16, 2022 Share Posted June 16, 2022 Nice 1 @chef, look forward to trying this when I get home. Link to comment Share on other sites More sharing options...
vaise 304 Posted June 19, 2022 Share Posted June 19, 2022 (edited) Hi @chef This was a great help, but as I had so many to do initially, it was a pain to have to scroll to the end and delete, then it jumps back to the top, and repeat over and over and over. Wont be as big as issue once I complete this process and manage it monthly however. A view enhancement could not group them like that maybe. Or a button to delete all expired devices Edited June 19, 2022 by vaise 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now