twitcher icon indicating copy to clipboard operation
twitcher copied to clipboard

Add feature to allow multiple accounts

Open kanimaru opened this issue 1 year ago • 5 comments

Find an Idea how to support multiple accounts at all. Any Ideas are welcome!

kanimaru avatar Aug 08 '24 18:08 kanimaru

i think threading would be a good option here, every account its own thread? https://docs.godotengine.org/en/stable/tutorials/performance/using_multiple_threads.html

lublak avatar Aug 16 '24 17:08 lublak

It's not a performance issue its a storage and usage issue. Cause how do you call the method for a specific user etc. everything needs to be rewritten to support multiple users at once. Maybe some context variables could work something like TwitchService.use(user) but then you may have the problem with await methods and async stuff.

kanimaru avatar Aug 16 '24 23:08 kanimaru

It's hard because this project use a lot of static stuff. Better would be an object based design. So you could use new TwitchService(user) but also then everything needs to be rewritten.

lublak avatar Aug 17 '24 00:08 lublak

Should find a backwards compatible solution probably. I like your idea with new TwitchService(user) idea

kanimaru avatar Aug 17 '24 00:08 kanimaru

@kanimaru it could be backwards compatible, just wrap the objects into the static approach. So you have the best of both worlds. It's just an idea. In any case, you have to put in a lot of work. It doesn't matter what you do. It's actually a complete rework.

lublak avatar Aug 17 '24 11:08 lublak

V2 is out. It's now possible, but a bit tricky to manage. I also implemented it that you can use different browser profiles. Checked it with firefox and it works like that:

Go to about:profiles and create a new one. Then add 2 OAuth Nodes and configure one like this so it uses a different profile to login. Otherwise you have to relogin everytime the token is expiring.

Image

Will probably write a guide for it too

kanimaru avatar May 01 '25 12:05 kanimaru