Closed oliver4888 closed 4 years ago
Thanks for the catch. I've fixed on commit f7cbdd40f633e4f51cdb040d5046bc90e6610339 and release 4.2.2. I've also added a unit test for this endpoint. Let me know if it works for you.
FileUrl
works, looks like a typo got added that causes PreviewUrl
to be null if FileUrl
is null.
source.FileUrl
should be source.PreviewUrl
on this line:
https://github.com/babelshift/SteamWebAPI2/blob/9de9651da9548214121157d28836dcc6e2711738/src/SteamWebAPI2/Mappings/SteamRemoteStorageProfile.cs#L21
Ugh. That's what I get for rushing a fix late at night. I think you should still be OK for now since the asset you were looking for didn't have a PreviewUrl
anyway. I'll get this fixed today.
Fixed on commit dd037ac8a9522dcec07f510c8ed6a09ca82c23b0 and release 4.2.3.
Working perfectly now. Thanks for the awesome library!
I'm using the
SteamRemoteStorage
interface to get information on a workshop item. It appears that thefile_url
property is""
which throws aUriFormatException
. I have checked a couple of workshop mods and thefile_url
property is always an empty string, I did check one collection which had a valid url.I took a quick look and I believe changing the mappings in Mappings/SteamRemoteStorageProfile to something like
opts.MapFrom(source => string.IsNullOrWhiteSpace(source.FileUrl) ? null : new Uri(source.FileUrl))
should fix this issue.Let me know if you'd be interested in a PR, it might be useful to add this check any
Uri
fields (I see there are two inSteamRemoteStorageProfile
and a bunch inSteamProfileProfile
.