Comments (5)
The URL for the page is built based on the slug attribute
Ah, I wasn't aware of that. Should be possible to store the slug inside SteamApp (awacy_slug
) when setting the awacy status (steamutil.py#update_steamapp_awacystatus
)
I think [(b)] is the ideal solution ....
Hmm, yeah. I guess you're right about that users manually entering the details have the same issue.
modify SteamApp.awacy_status to be awacy_info and contain slug and status
In theory we could add another (data)class for storing awacy info. That could also be adopted by LutrisGame and HeroicGame.
although one could argue having a dictionary with arbitrary values that we just expect to be present is not clean
Yeah, I agree that dicts are not clean (at all). I would go for a dataclass then.
One should use the (typing) freedom Python gives carefully 😄
Maybe like that:
# datastructues.py
@dataclass
class AWACYInfo:
""" Data class to store game-specific information from areweanticheatyet.com's games.json """
status: AWACYStatus
slug: str
class SteamApp:
...
awacy_info: AWACYInfo
# steamutil.py
def update_steamapp_awacystatus(steamapp_list: List[SteamApp]) -> List[SteamApp]:
...
gm = {g.get('name') : g for g in json.load(f)}
status = ...
slug = g[game_name].get('slug', '')
app.awacy_info = AwacyInfo(status, slug)
from protonup-qt.
A dataclass that represents the AWACY object sounds like a good solution to me :-) Better to map it onto a dataclass than a dict. I guess then each SteamApp would have some AWACY info as a dataclass, and it would contain our status
and slug
- and in future, any other information we want to include. For example, we could list the anti-cheat in use by the game in the tooltip.
I won't be available to tackle this but this sounds like a good enhancement and I hope I was able to help 😄
from protonup-qt.
either by direct URL (https://areweanticheatyet.com/game/team-fortress-2), though I'm not sure on the exact way they're escaping titles to make them
This one isn't that easy as we would need to determine how AWACY creates the urls from the game title. We could look it up in the source code, but it is subject to change.
or just by using the search query string (https://areweanticheatyet.com/?search=Team+Fortress+2)
ProtonUp-Qt is actually doing this, but only if the AWACY status is known. If it is unknown, it will just open the page without searching:
ProtonUp-Qt/pupgui2/pupgui2gamelistdialog.py
Lines 166 to 167 in c834be5
Is there any game which has an entry on AWACY, but ProtonUp-Qt shows a question mark and won't open the page with a search term? Please let me know.
In that case, there might be a problem that ProtonUp-Qt doesn't correctly map the games on AWACY to the installed games.
Otherwise, we can close this issue.
I guess there are also the options of (a) not opening the URL at all if the status is unknown and (b) opening the URL with search parameters anyway, even if the status is unknown. But I think option a would make it inconsistent and option b gives an empty page which looks like an issue occured. This way the users can manually search for the game if they are unsure.
from protonup-qt.
The URL for the page is built based on the slug
attribute on the JSON object for each game n awacy_games.json
. The format is https://areweanticheatyet.com/game/slug-here
Here is an example with Halo MCC, with some data stripped out :-)
{
"url": "",
"name": "Halo: The Master Chief Collection",
"logo": "",
"native": false,
"status": "Supported",
"reference": "",
"anticheats": [
"Easy Anti-Cheat"
],
"notes": [
[],
[]
],
"storeIds": {
},
"slug": "halo-the-master-chief-collection",
"dateChanged": "2024-01-19T04:40:56.000Z"
For MCC, its page is https://areweanticheatyet.com/game/halo-the-master-chief-collection
.
This JSON is downloaded by ProtonUp-Qt already, and for anyone unaware, is publicly available at (and retrieved by ProtonUp-Qt from) AreWeAntiCheatYet's GitHub repository, in the file games.json
.
(b) opening the URL with search parameters anyway, even if the status is unknown
I think this is the ideal solution. I agree that an empty page may look strange, but that's not really ProtonUp-Qt's issue. Imo upstream can always change the page layout. If a user were to manually visit this page they would have the same experience, so the ball isn't really in our court here so-to-speak, and it may also not be as big of a problem as we're anticipating if the AWACY folks haven't had any issues yet :-)
from protonup-qt.
The question now becomes, if we are going forward with this, how best to store this. One solution I thought of is, we could modify SteamApp.awacy_status
to be awacy_info
and contain slug
and status
. This would require a refactor but may be a clean way to go about it - although one could argue having a dictionary with arbitrary values that we just expect to be present is not clean. I just didn't think having a new SteamApp.awacy_slug
was very elegant 😅
Although, if we're going with this dictionary approach, we're essentially mapping elements from the AreWeAntiCheatYet games.json
to our own per-game dictionary. Perhaps that's reliable enough, if we use the same key names. We're basically storing a version of the JSON object per-game, only popping off the information we need and storing it in our SteamApp
. We could refactor update_steamapp_awacystatus
to do essentially this.
from protonup-qt.
Related Issues (20)
- Batch Update in Proton Up QT not working in Ubuntu system version of Steam HOT 1
- xwinfo missing on Arch (AppImage and AUR) HOT 3
- After I download and open my steam, it says offline. No matter how I operate, it is offline. HOT 3
- Consider using a config file to load the github token from HOT 7
- Crashing on ChromeOS due to Wayland HOT 11
- option to include a version with wine 8.1 HOT 8
- Allow selection of Steam Linux Runtime in Game List HOT 5
- Button to set Luxtorpeda on all supported games HOT 4
- Out of memory HOT 3
- SteamTinkerLaunch latest version HOT 2
- Introduce Tests into ProtonUp-Qt HOT 5
- Protonup-qt broke on qt6 HOT 7
- Issues related to individual compatibility tools and not ProtonUp-Qt - Links to issues pages HOT 3
- Crash if non-flatpak steam is missing HOT 8
- ProtonUp crashing when the Show Game List button is pressed HOT 4
- Buttons don't fit on window HOT 3
- DuplicateOptionsError (crash on startup) HOT 6
- Steamtinkerlaunch Installing When Trying To Use CLI HOT 2
- games using dxvk or vkd3d in Lutris aren't listed HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from protonup-qt.