Initial commit
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import '../contracts/danmaku.dart';
|
||||
import 'danmaku_episode_parser.dart';
|
||||
|
||||
|
||||
int pickBestMatchIndex(List<DanmakuMatch> matches, int? targetEpisode) {
|
||||
if (targetEpisode == null) return 0;
|
||||
for (var i = 0; i < matches.length; i++) {
|
||||
final n = extractEpisodeNumberFromTitle(matches[i].episodeTitle);
|
||||
if (n == targetEpisode) return i;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user