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

Library selection is not cleared when switching Plex servers #324

Closed
chazlarson opened this issue Dec 15, 2020 · 11 comments
Closed

Library selection is not cleared when switching Plex servers #324

chazlarson opened this issue Dec 15, 2020 · 11 comments

Comments

@chazlarson
Copy link

Describe the bug
When you change the plex server details in the initial "Plex Settings", the library selections you made under "Sync Lex Libraries" are still there, even though the libraries have changed.

What version of Overseerr are you running?
1.5.0

To Reproduce
Steps to reproduce the behavior:

Have two plex servers.
In the initial "Plex Settings" enter the details for one of them. Save.
Click "Sync Plex lIbraries"
"select" the first library or two.
Change the Plex Server details to the second container or server. Save.
Note that the first one or two libraries are still selected, even though they are completely different.

Expected behavior
I expected the selection to be invalidated and cleared.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Mac OS X, Microsoft Edge Version 87.0.664.47

@chazlarson chazlarson added the bug label Dec 15, 2020
@sct
Copy link
Owner

sct commented Dec 16, 2020

Does clicking sync again not update them? We aren't constantly checking your server for what libraries are available. You must sync any changes.

@chazlarson
Copy link
Author

They get updated to reflect the libraries available on the new server. The issue is that the "checkboxes" that you had selected don't get cleared. They're still selected. So you add Plex A and check off the first two libraries, let's say "Movies" and "TV". You change the Plex server details and now the first two libraries are still selected, but they're "Audiobooks" and "Home Videos" or whatever.

@sct
Copy link
Owner

sct commented Dec 16, 2020

Ah! Understood. Okay yeah that's a bug! Will get it fixed 👍

@sct
Copy link
Owner

sct commented Dec 16, 2020

So I think the better behavior here would be to just clear the libraries if we detect that the Plex server information has changed?

@samwiseg0
Copy link
Collaborator

samwiseg0 commented Dec 16, 2020

You could verify the machine ID. If that changes verify the user wants to purge the database? Even force a full scan.

@sct
Copy link
Owner

sct commented Dec 16, 2020

We could set all media back to an unknown status. I wonder if we should also remove requests in that case? Clear everything? Make it an option?

@samwiseg0
Copy link
Collaborator

I would just clear the libraries and not he requests. That way request tracking would remain. If the user just wants to re initialize the database and blow everything away to factory defaults that could be an option in settings.

Are you tracking rating keys? That would be my biggest concern. Those change when you change servers or even re create your libraries.

That could be another corner case. Re creating a library. If the rating key is tracked then that would be a problem for the new media scanned in.

@sct
Copy link
Owner

sct commented Dec 16, 2020

Not currently tracking rating keys. So shouldn't be a concern.

The first step we can take here is matching library names. If they don't match we can reset them to be not enabled. This will affect people who just rename their libraries (if they hit sync again) but it won't really break anything. They can just check them again.

But if the entire Plex server changes without purging items there may be things marked as available even if they aren't, as syncing is currently only one way.

@samwiseg0
Copy link
Collaborator

What about tracking the lib ID and lib name? That way if they make a lib with the same name but then the ID has changed you know its new?

@sct
Copy link
Owner

sct commented Dec 16, 2020

We already track the ID, but the new Plex server probably shares the same ID since they just increment from 1.

@sct
Copy link
Owner

sct commented Dec 16, 2020

I pushed a fix that will set libraries back to disabled if the name changes. That should at least resolve this ticket.

For purging and other things, we should open a feature request ticket.

@sct sct closed this as completed Dec 16, 2020
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

3 participants