RemiRigal / Plex-Auto-Languages

Automated language selection for Plex TV Shows !
MIT License
428 stars 16 forks source link

Managed Accounts #3

Closed dphildebrandt closed 2 years ago

dphildebrandt commented 2 years ago

Doesn't seem to work with managed accounts ie, Plex Home users.

BEisem commented 2 years ago

Yes, I noticed this as well. I think it works for shared users, interestingly, but not managed home users.

dphildebrandt commented 2 years ago

Yup, can confirm shared users work great.

BEisem commented 2 years ago

I have a hunch the reason it's not working for managed users is because managed users have their own Plex token, separate from the main user. The token is a bit more difficult to find, but you can figure it out by viewing an item from the managed user's web interface, and searching the page source for "Plex-token."

I'm currently trying to figure out a way to run a separate Plex-Auto-Languages docker container and feeding it the managed user's token in the yaml file. This is clearly not an ideal situation, but might work until/if a fix is provided by the developer.

RemiRigal commented 2 years ago

Currently only shared users are supported, I'm working on adding support for managed users as well but for some reason it cannot be done in the same way.

dphildebrandt commented 2 years ago

Yeah the managed users are set up a bit differently/more complicated than regular shared users.

RemiRigal commented 2 years ago

Support for managed users has been added by #20 and published in v1.0.9. Let me know if everything works as expected.

BEisem commented 2 years ago

Support for managed users has been added by #20 and published in v1.0.9. Let me know if everything works as expected.

I just installed v1.0.9, and now I'm getting repeated errors. I'm not sure, but I think it might be coming from shared users. So it seems like maybe this update broke shared user support. Here's the error:

2022-04-26 12:06:36,255 [ERROR] Unable to process play session
Traceback (most recent call last):
  File "main.py", line 82, in process_playing_message
    self.process_play_session(play_session)
  File "main.py", line 91, in process_play_session
    user_id, username = self.user_clients[client_identifier]
TypeError: cannot unpack non-iterable NoneType object
RemiRigal commented 2 years ago

Thank you for the fast response. It should be fixed in v1.0.10.

BEisem commented 2 years ago

Also, I just tested with a managed user, and I don't believe it's working there either. Not sure if the fix will also fix that? But I'll test as soon as it is deployed.

BEisem commented 2 years ago

That fixed it, thanks!

dphildebrandt commented 2 years ago

Works flawlessly, thanks!