crocodilestick / Calibre-Web-Automated

Calibre-Web but automated and with Calibre features! Fully automate and simplify your eBook set up!
https://github.com/crocodilestick/Calibre-Web-Automated
GNU General Public License v3.0
643 stars 12 forks source link

fix: error when github does not respond with expected data. #71

Closed Buco7854 closed 1 month ago

Buco7854 commented 1 month ago

In case of a ratelimit github does not answer with the expected tag_name resulting in an error and therefore making the UI unusable.

I propose to make it so that if the expected tag_name key is not present replace it by the current version so that it does not result in an error and does not trigger update notification.

Buco7854 commented 1 month ago

Should fix #70

Buco7854 commented 1 month ago

I think this should be seen more as an temporary mesure to implement a check that would not trigger rate limit that easily. Making a request to github API each time someone access a page in the web ui make it so that you get ratelimited pretty fast, and without even talking about the fact that it blocks the ui completly this may block other services using the api in the network. Maybe a button to check the version in the admin panel would be better. Or it could be completly removed. Since it's checking against github there is already a way to be alerted when a new released is out by github itself so I dont think this is really needed.

crocodilestick commented 1 month ago

I think this should be seen more as an temporary mesure to implement a check that would not trigger rate limit that easily. Making a request to github API each time someone access a page in the web ui make it so that you get ratelimited pretty fast, and without even talking about the fact that it blocks the ui completly this may block other services using the api in the network. Maybe a button to check the version in the admin panel would be better. Or it could be completly removed. Since it's checking against github there is already a way to be alerted when a new released is out by github itself so I dont think this is really needed.

The function has also been changed to only send requests once per day to check for available updates

Buco7854 commented 1 month ago

Perfect, thanks!