kanimaru / twitcher

Full Twitch Library for Godot
MIT License
56 stars 7 forks source link

Add feature to allow multiple accounts #23

Open kanimaru opened 1 month ago

kanimaru commented 1 month ago

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

lublak commented 4 weeks ago

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

kanimaru commented 4 weeks ago

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.

lublak commented 4 weeks ago

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.

kanimaru commented 4 weeks ago

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

lublak commented 3 weeks ago

@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.