Skip to content

Commit fb66122

Browse files
committed
feat(entity): add too_many_files variant to FailedMatchReasonEnum
1 parent c38f97e commit fb66122

3 files changed

Lines changed: 8 additions & 0 deletions

File tree

entity/src/sea_orm_active_enums.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ pub enum FailedMatchReasonEnum {
5252
TooManyMatches,
5353
#[sea_orm(string_value = "ambiguous")]
5454
Ambiguous,
55+
#[sea_orm(string_value = "too_many_files")]
56+
TooManyFiles,
5557
}
5658
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Copy, Serialize, Deserialize)]
5759
#[sea_orm(

service/src/model/metadata.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,10 @@ pub enum FailedMatchReason {
139139

140140
/// Multiple candidates tied at the top of the score; matcher refused to pick.
141141
Ambiguous,
142+
143+
/// Skipped because the game has more files than the provider's catalogue
144+
/// indexes (multi-track arcade dumps, per-disc-segment images).
145+
TooManyFiles,
142146
}
143147

144148
/// Reason why a game was automatically matched.
@@ -272,6 +276,7 @@ impl From<FailedMatchReasonEnum> for FailedMatchReason {
272276
FailedMatchReasonEnum::NoDirectMatch => FailedMatchReason::NoDirectMatch,
273277
FailedMatchReasonEnum::TooManyMatches => FailedMatchReason::TooManyMatches,
274278
FailedMatchReasonEnum::Ambiguous => FailedMatchReason::Ambiguous,
279+
FailedMatchReasonEnum::TooManyFiles => FailedMatchReason::TooManyFiles,
275280
}
276281
}
277282
}

service/src/providers/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ fn failed_reason_label(r: FailedMatchReasonEnum) -> &'static str {
200200
FailedMatchReasonEnum::NoDirectMatch => "no_direct_match",
201201
FailedMatchReasonEnum::TooManyMatches => "too_many_matches",
202202
FailedMatchReasonEnum::Ambiguous => "ambiguous",
203+
FailedMatchReasonEnum::TooManyFiles => "too_many_files",
203204
}
204205
}
205206

0 commit comments

Comments
 (0)