DavidoTek / ProtonUp-Qt

Install and manage GE-Proton, Luxtorpeda & more for Steam and Wine-GE & more for Lutris with this graphical user interface.
https://davidotek.github.io/protonup-qt
GNU General Public License v3.0
1.25k stars 40 forks source link

Move requests session to ctmods #307

Closed DavidoTek closed 10 months ago

DavidoTek commented 10 months ago

Currently, all ctmods share a single requests session which may contain the authorization header for GitHub. With #302, fetching compatibility tools from GitLab is now possible too. This requires ctmods to be able to choose between the GitHub and GitLab authorization key.

This PR does following changes:

See https://github.com/DavidoTek/ProtonUp-Qt/pull/302#issuecomment-1808909601 for details

sonic2kk commented 10 months ago

Glad you also caught removing the header update in the DXVK ctmod's __download, I meant to bring that up :smile:

This should also make it more convenient for other ctmods to adopt the download methods we use here. My main concern with this approach in #302 was to do with maybe a higher memory cost or something, but after discussion in that PR, it seems that is a non-issue and there is no concern with each ctmod having its own requests.Session.

Looks great :-)