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

Remove Inactive Users API Issue #427

Open
yaitsbilly opened this issue Jul 20, 2024 · 0 comments
Open

Remove Inactive Users API Issue #427

yaitsbilly opened this issue Jul 20, 2024 · 0 comments

Comments

@yaitsbilly
Copy link

Describe the bug

Script stopped working and started giving this error message.

I noticed Tatulli uses the first API link, this link has a lot more users on there that I am NOT sharing with.
https://plex.tv/api/users?X-Plex-Token=XXX

And this link shows the exact users who I'm sharing with.
https://plex.tv/api/servers/XXX/shared_servers?X-Plex-Token=XXX

Provide logs

freepo6 was last seen 14 days, 6 hours, 40 minutes, 56 seconds ago, and has reached their shareless threshold. Removing.
Traceback (most recent call last):

File "C:\Users\Administrator\Documents\Plex Remove Inactive Users\remove.bat", line 104, in
ACCOUNT.removeFriend(PLEX_USERS[UID])
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\plexapi\myplex.py", line 465, in removeFriend
return self.query(url, self._session.delete)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\plexapi\myplex.py", line 246, in query
raise BadRequest(message)
plexapi.exceptions.BadRequest: (410) gone; https://plex.tv/api/friends/229720260

Link to script with bug/issue

To Reproduce

Steps to reproduce the behavior:
Run script as is.

Expected behavior
Remove users

Desktop (please complete the following information):

  • OS: windows server 2022
  • Python version 3.11.4
  • PlexAPI version 4.15.7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant