younesaassila / ttv-lol-pro

TTV LOL PRO removes most livestream ads from Twitch. This is free, don't expect it to be perfect.
GNU General Public License v3.0
1.46k stars 30 forks source link

Would it be possible to allow other proxies to be added? #30

Closed thinkpad4 closed 1 year ago

thinkpad4 commented 1 year ago

I know you have the dropdown list for ttvlol and local custom, but what about if I wanted to add another address, not a local one?
Would you be able to add that option to the extension? Thank you very much

younesaassila commented 1 year ago

The "Local Server" option is more meant for debugging, but I'm not opposed to having a list of custom proxies in Options. The only issue is those proxies would need to use the same routes as TTV LOL's API (/playlist and /vod)

thinkpad4 commented 1 year ago

I wanted to try using Luminous TTV and the dev said that as of the latest release it supports TTVLOL API Protocols.

younesaassila commented 1 year ago

Nice! Will look into it later. This wouldn't be very hard to implement I believe

thinkpad4 commented 1 year ago

If you want to test it try the public luminous one https://eu.luminous.dev or https://as.luminous.dev

younesaassila commented 1 year ago

Okay so I refactored the Options's page code to easily manage multiple lists. Thankfully, the code was already made to support multiple servers and picking the first one to successfully respond to a GET /ping request.

Right now the "Server list" in the "Options" page looks like this: image

You can add servers that have priority over TTV LOL's API and fallback servers in case the API is down. TTV LOL's API cannot be removed from the list (since this is TTV LOL PRO after all, and to avoir users removing the server and encountering issues).

The changes are not yet live, I'm pushing all of this to a development branch until I implement #21 as well.

thinkpad4 commented 1 year ago

This is perfect, but I wouldn't add the Luminous.dev servers in the list by default, I don't know if the dev of those servers has the capacity of TTVLOL's servers or if they want their servers added without their permission. On a side note, did they work just as well as the TTVLOL proxy? Thank you very much for adding this

AlyoshaVasilieva commented 1 year ago

I don't mind if my servers are there by default, but I'll note that while I have downtime alerts on them I can't guarantee they won't break or something.

edit: Also that loading video from Twitch's Asian servers seems to perform pretty badly if you're outside of Asia, while the European servers seem to work fine. So if my servers are added as fallbacks, eu would be a better first option

younesaassila commented 1 year ago

The default server list will only contain https://api.ttv.lol. Would be difficult to have different defaults depending on users region.

On a side note, did they work just as well as the TTVLOL proxy?

In my tests the as server worked great, while I was getting pre-rolls with the eu server.

younesaassila commented 1 year ago

Now available in v1.5.0 🎉

thinkpad4 commented 1 year ago

This is PERFECT, Thank you very mush