ShokoAnime / ShokoServer

Repository for Shoko Server.
https://shokoanime.com/
MIT License
412 stars 74 forks source link

Support Multiple List Accounts #807

Open da3dsoul opened 5 years ago

da3dsoul commented 5 years ago

426 and #32 kind of go in this direction a bit, but with other plans, I figure that it'd be better to make a new issue with better planning (and English).

Basically, all accounts to external sites (that need login) are per user. For situations like a porn account, you can add the same account to multiple users.

As of right now, the sites that would be included here are:

This means that we would need to move the AniDB login details, tokens, etc out of the settings (a good idea anyway, since they are plain text). The API for login would need to be flawless, since we could no longer just punch it into the settings and restart. I'm not sure there's any point in supporting more than a slave account from AniDB, but it would be easier to code to support any kind. The downside to this system is just part of it working, but it would greatly increase the number of AddToMyList commands.

This obviously requires a better system for managing lists in general, such as scrobbling events, file added events, etc.

da3dsoul commented 5 years ago

When I was working on the new MyList system, I started thinking about this. I'm not starting this now, but I'll try to write the new MyList system in such a way that would not get in the way of this too much.

ElementalCrisis commented 5 years ago

In my opinion the best way to do this would to make a Shoko user account and make it the "master" and then the user just inputs the community site login details, we check if valid and save. Since the community site user is now linked to the Shoko user, any updates done are pushed to the community site based on settings the user selected in Shoko.

da3dsoul commented 5 years ago

What do you mean? The Shoko user is our internal one. It always exists, obviously. From each user's settings page, accounts for community sites are added. They are per user, so Tom can have one AniDB account and Richard can have another. One advantage to supporting more than just slave accounts is that the secondary accounts won't have things that aren't visible to them (like porn) added to their list with no watched state.

If an admin makes an account, they can copy the community sites from another user, for convenience.

ElementalCrisis commented 5 years ago

Ah, I was thinking of completely separate user accounts, the other accounts have access to the collection but can't add to it.