@@ -244,19 +244,19 @@ public void Scrape(AppToScrape app)
244
244
foreach ( OculusBinary b in versions . data . node . primary_binaries . nodes )
245
245
{
246
246
bool doPriorityForThisVersion = app . priority ;
247
- DBVersion ? oldEntry = connected . FirstOrDefault ( x => x . id == b . id ) ;
248
- TimeSpan timeDelta = DateTime . UtcNow - oldEntry . lastPriorityScrape ;
249
- TimeSpan betweenScrapes = timeBetweenScrapes ;
250
- // Make sure that the time between scrapes increases at a steady pace to not stress Oculus's servers too much
251
- if ( timeDelta . TotalDays > 20 )
252
- {
253
- betweenScrapes = timeDelta ;
254
- if ( betweenScrapes . TotalDays > 600 ) betweenScrapes = new TimeSpan ( 600 , 0 , 0 , 0 ) ;
255
- }
256
-
257
- if ( doPriorityForThisVersion )
258
- {
259
- if ( oldEntry != null )
247
+ DBVersion ? oldEntry = connected . FirstOrDefault ( x => x . id == b . id ) ;
248
+ if ( oldEntry != null )
249
+ {
250
+ TimeSpan timeDelta = DateTime . UtcNow - oldEntry . lastPriorityScrape ;
251
+ TimeSpan betweenScrapes = timeBetweenScrapes ;
252
+ // Make sure that the time between scrapes increases at a steady pace to not stress Oculus's servers too much
253
+ if ( timeDelta . TotalDays > 20 )
254
+ {
255
+ betweenScrapes = timeDelta ;
256
+ if ( betweenScrapes . TotalDays > 600 ) betweenScrapes = new TimeSpan ( 600 , 0 , 0 , 0 ) ;
257
+ }
258
+
259
+ if ( doPriorityForThisVersion )
260
260
{
261
261
// Only do priority scrape if last scrape is older than 2 days
262
262
if ( timeDelta < betweenScrapes )
@@ -297,8 +297,8 @@ public void Scrape(AppToScrape app)
297
297
298
298
if ( b != null && doPriorityForThisVersion )
299
299
{
300
- Logger . Log ( "Scraping v " + b . version , LoggingType . Important ) ;
301
-
300
+ Logger . Log ( "Scraping v " + b . version , LoggingType . Important ) ;
301
+
302
302
}
303
303
OculusBinary bin = b ;
304
304
bool wasNull = false ;
@@ -311,7 +311,7 @@ public void Scrape(AppToScrape app)
311
311
wasNull = true ;
312
312
bin = b ;
313
313
}
314
- if ( bin . obb_binary == null && b . obb_binary != null ) bin . obb_binary = b . obb_binary ;
314
+ if ( bin . obb_binary == null && b . obb_binary != null ) bin . obb_binary = b . obb_binary ;
315
315
}
316
316
catch
317
317
{
@@ -322,12 +322,12 @@ public void Scrape(AppToScrape app)
322
322
Logger . Log ( "Got obb binary for " + b . id + " v " + b . version , LoggingType . Debug ) ;
323
323
b . obb_binary = info . data . node . obb_binary ;
324
324
}
325
- }
326
-
327
-
328
- // Preserve changelogs and obbs across scrapes by:
329
- // - Don't delete versions after scrape
330
- // - If not priority scrape enter changelog and obb of most recent versions
325
+ }
326
+
327
+
328
+ // Preserve changelogs and obbs across scrapes by:
329
+ // - Don't delete versions after scrape
330
+ // - If not priority scrape enter changelog and obb of most recent versions
331
331
if ( ( ! doPriorityForThisVersion || wasNull ) && oldEntry != null )
332
332
{
333
333
bin . changeLog = oldEntry . changeLog ;
0 commit comments