Skip to content

Commit 5463fcf

Browse files
committed
Filter to only LBP games in LbpPS3PatchPipeline
1 parent 471fce8 commit 5463fcf

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

Refresher.Core/Pipelines/Lbp/LbpPS3PatchPipeline.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ public class LbpPS3PatchPipeline : Pipeline
1212

1313
public override string GuideLink => "https://docs.littlebigrefresh.com/ps3";
1414

15+
public override IEnumerable<string> GameNameFilters => ["littlebigplanet", "lbp"];
16+
1517
protected override List<Type> StepTypes =>
1618
[
1719
// Info gathering stage

Refresher.Core/Pipelines/Pipeline.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ public abstract class Pipeline
2525
public AutoDiscoverResponse? AutoDiscover { get; internal set; }
2626

2727
public virtual string? GuideLink => null;
28+
29+
public virtual IEnumerable<string> GameNameFilters => [];
2830

2931
public PipelineState State { get; private set; } = PipelineState.NotStarted;
3032

Refresher.Core/Pipelines/Steps/DownloadGameListStep.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,12 @@ public override async Task ExecuteAsync(CancellationToken cancellationToken = de
6060

6161
if (isConsole)
6262
await Task.Delay(100, cancellationToken);
63-
64-
this.Pipeline.GameList.Add(game);
63+
6564
this.Progress = i++ / (float)games.Count;
65+
66+
List<string> filters = this.Pipeline.GameNameFilters.ToList();
67+
if(filters.Count <= 0 || filters.Any(f => game.Name?.Contains(f, StringComparison.InvariantCultureIgnoreCase) ?? false))
68+
this.Pipeline.GameList.Add(game);
6669
}
6770

6871
this.Pipeline.GameInformation = null;

Refresher.sln.DotSettings

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
<s:Boolean x:Key="/Default/UserDictionary/Words/=fdsa/@EntryIndexedValue">True</s:Boolean>
2626
<s:Boolean x:Key="/Default/UserDictionary/Words/=hellscape/@EntryIndexedValue">True</s:Boolean>
2727
<s:Boolean x:Key="/Default/UserDictionary/Words/=jvyden/@EntryIndexedValue">True</s:Boolean>
28+
<s:Boolean x:Key="/Default/UserDictionary/Words/=littlebigplanet/@EntryIndexedValue">True</s:Boolean>
2829
<s:Boolean x:Key="/Default/UserDictionary/Words/=LITTLEBIGPLANETPS/@EntryIndexedValue">True</s:Boolean>
2930
<s:Boolean x:Key="/Default/UserDictionary/Words/=patchables/@EntryIndexedValue">True</s:Boolean>
3031
<s:Boolean x:Key="/Default/UserDictionary/Words/=Reverify/@EntryIndexedValue">True</s:Boolean>

0 commit comments

Comments
 (0)