Jump to content
McKay Development

SteamID sharedfiles implementation question


3urobeat

Recommended Posts

Hey! 

As you maybe have already seen, I opened a pull request to add full sharedfiles (Screenshots, Artworks & Guides) support to your steamcommunity library. 
I'm currently working on adding sharedfiles support to my Steam Comment Service Bot and I'm trying to detect whether a provided ID is of type individual, clan or sharedfile.
For the first two I can use your SteamID lib, which is sadly not the case for the last one.
I'm therefore asking if you'd have an idea about how a detection could be implemented.

I know this is technically outside the scope of the SteamID library as not even Steam themselves recognize sharedfiles as a type of SteamID, so I wouldn't expect you to accept such an addition to the library itself, but I'd like to add such a support to a fork at least.

The reason why I'm writing this post in the first place is because (1.) I don't really understand how your detection of the 64bit SteamID types work and if it could be modified to work for sharedfile IDs as well:

this.type = Number((num >> 52n) & 0xFn);

...and (2.) because I'd like to ask if you know anything else that might be interesting about sharedfile IDs. There is sadly little to none to find about them on the internet.

These for example are valid sharedfile IDs: 2966606880, 1865848847, 1934792223
Afaik these don't have to have this length and can be shorter and maybe also even longer. Neither length nor the first digit can be an indication that this is a sharedfile ID and not something else.
They are provided as a query parameter to view the page: steamcommunity.com/sharedfiles/filedetails/?id=<id>

I could of course ping the whole URL if SteamID doesn't recognize the ID as one of the other types and see if a sharedfile with that ID exists, but I'd like to come up with a solution that doesn't require a request, if possible. I'm however pretty much out of ideas on how I could realize this with number-magic.

 

That's it, thanks for reading. I doubt that you can help me much but I thought I'd be stupid if I don't at least try to ask you for any idea.
Have a nice day :)

 

Edit: I think I'm just giving up, I see no possible way of validating the ID if it can be pretty much arbitrary. There is absolutely zero information about these IDs to find. Making a http request in the SteamID constructor when a 64bit int was provided but Type is INVALID is awful as well because it would lead to an async constructor. I think I need to implement an http request when Type is INVALID in my application rather than in the library. Sorry for wasting your time.

Edited by 3urobeat
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...