diff --git a/Facepunch.Steamworks.Test/Client/Workshop.cs b/Facepunch.Steamworks.Test/Client/Workshop.cs index f6ab7c9..5425b90 100644 --- a/Facepunch.Steamworks.Test/Client/Workshop.cs +++ b/Facepunch.Steamworks.Test/Client/Workshop.cs @@ -56,8 +56,9 @@ namespace Facepunch.Steamworks.Test foreach ( var item in Query.Items ) { Console.WriteLine( "{0}", item.Title ); - Console.WriteLine( "\t WebsiteViews: {0}", item.WebsiteViews ); - Console.WriteLine( "\t VotesUp: {0}", item.VotesUp ); + Console.WriteLine( "\t WebsiteViews: {0}", item.WebsiteViews ); + Console.WriteLine( "\t VotesUp: {0}", item.VotesUp ); + Console.WriteLine( "\t PreviewUrl: {0}", item.PreviewImageUrl ); } } } diff --git a/Facepunch.Steamworks/Interfaces/Workshop.Item.cs b/Facepunch.Steamworks/Interfaces/Workshop.Item.cs index 5ec51c1..7cf436f 100644 --- a/Facepunch.Steamworks/Interfaces/Workshop.Item.cs +++ b/Facepunch.Steamworks/Interfaces/Workshop.Item.cs @@ -183,6 +183,7 @@ namespace Facepunch.Steamworks public int FollowerCount { get; internal set; } public int WebsiteViews { get; internal set; } public int ReportScore { get; internal set; } + public string PreviewImageUrl { get; internal set; } } } } diff --git a/Facepunch.Steamworks/Interfaces/Workshop.Query.cs b/Facepunch.Steamworks/Interfaces/Workshop.Query.cs index 6c5dcad..ae0c212 100644 --- a/Facepunch.Steamworks/Interfaces/Workshop.Query.cs +++ b/Facepunch.Steamworks/Interfaces/Workshop.Query.cs @@ -108,6 +108,10 @@ namespace Facepunch.Steamworks Items[i].FollowerCount = GetStat( data.Handle, i, ItemStatistic.NumFollowers ); Items[i].WebsiteViews = GetStat( data.Handle, i, ItemStatistic.NumUniqueWebsiteViews ); Items[i].ReportScore = GetStat( data.Handle, i, ItemStatistic.ReportScore ); + + string url = null; + if ( workshop.ugc.GetQueryUGCPreviewURL( data.Handle, (uint)i, out url ) ) + Items[i].PreviewImageUrl = url; } TotalResults = (int)data.TotalMatchingResults;