File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -129,6 +129,10 @@ private async Task CheckSteamMods(List<double> modIds)
129129 needUpdateModels . Add ( mod ) ;
130130 if ( sMod == null )
131131 {
132+ if ( Program . Settings . Debug )
133+ {
134+ ConsoleExtensions . WriteColor ( $ "[// Debug ]Mod Id \" { mod . publishedfileid } \" is not found in SavedMod.json file. Set them now to needed update", ConsoleColor . Yellow ) ;
135+ }
132136 savedMods . Add ( new LastEditModModel
133137 {
134138 ModId = mod . publishedfileid . ToString ( ) ,
@@ -137,14 +141,18 @@ private async Task CheckSteamMods(List<double> modIds)
137141 }
138142 else
139143 {
144+ if ( Program . Settings . Debug )
145+ {
146+ ConsoleExtensions . WriteColor ( $ "[// Debug ]Mod Id { sMod . ModId } \" { mod . publishedfileid } \" need a update cause the timestamps are not even ({ sMod . LastUpdate } != { mod . time_updated } )", ConsoleColor . Yellow ) ;
147+ }
140148 savedMods . Find ( x => x . ModId . Equals ( mod . publishedfileid . ToString ( ) ) ) . LastUpdate = mod . time_updated . ToString ( ) ;
141149 }
142150 }
143151 }
144152
145153 File . WriteAllText ( filename , JsonConvert . SerializeObject ( savedMods ) ) ;
146154
147- if ( OnUpdatedModsFound != null )
155+ if ( OnUpdatedModsFound != null && needUpdateModels . Count > 0 )
148156 {
149157 OnUpdatedModsFound ( this , new UpdatedModsEventArgs
150158 {
Original file line number Diff line number Diff line change 77 <Company >First-Coder</Company >
88 <Copyright >L. Gmann</Copyright >
99 <PackageProjectUrl >https://first-coder.de/</PackageProjectUrl >
10- <AssemblyVersion >1.0.0 .0</AssemblyVersion >
11- <FileVersion >1.0.0 .0</FileVersion >
12- <Version >1.0.0 </Version >
10+ <AssemblyVersion >1.0.1 .0</AssemblyVersion >
11+ <FileVersion >1.0.1 .0</FileVersion >
12+ <Version >1.0.1 </Version >
1313 </PropertyGroup >
1414
15+ <ItemGroup >
16+ <Resource Include =" Settings.json" >
17+ <CopyToOutputDirectory >PreserveNewest</CopyToOutputDirectory >
18+ </Resource >
19+ </ItemGroup >
20+
1521 <ItemGroup >
1622 <PackageReference Include =" discord-webhook-client" Version =" 3.1.0" />
1723 <PackageReference Include =" Newtonsoft.Json" Version =" 13.0.1" />
1824 </ItemGroup >
1925
26+ <ItemGroup >
27+ <Resource Include =" SavedMods.json" >
28+ <CopyToOutputDirectory >PreserveNewest</CopyToOutputDirectory >
29+ </Resource >
30+ </ItemGroup >
31+
2032 <ItemGroup >
2133 <None Update =" SavedMods.json" >
2234 <CopyToOutputDirectory >PreserveNewest</CopyToOutputDirectory >
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ namespace DiscordModNotifiyer.Models
44{
55 public class Settings
66 {
7+ public bool Debug { get ; set ; }
78 public string SteamApiKey { get ; set ; }
89 public bool AutomaticRefresh { get ; set ; }
910 public int AutomaticRefreshMin { get ; set ; }
Original file line number Diff line number Diff line change 11{
22 "__General" : " General settings" ,
33 "SteamApiKey" : " " ,
4+ "Debug" : true ,
45 "AutomaticRefresh" : true ,
56 "AutomaticRefreshMin" : 1 ,
67
You can’t perform that action at this time.
0 commit comments