@@ -22,7 +22,7 @@ public partial class RatingsSaveService
2222 bool append = replayRatingId > 0 ;
2323
2424 List < ArcadeReplayRatingCsv > replayRatings = new ( ) ;
25- List < ArcadeReplayDsPlayerRatingCsv > replayPlayerRatings = new ( ) ;
25+ // List<ArcadeReplayDsPlayerRatingCsv> replayPlayerRatings = new();
2626 for ( int i = 0 ; i < ratings . Count ; i ++ )
2727 {
2828 var rating = ratings [ i ] ;
@@ -36,23 +36,23 @@ public partial class RatingsSaveService
3636 ArcadeReplayId = rating . ReplayId ,
3737 AvgRating = Convert . ToInt32 ( rating . RepPlayerRatings . Average ( a => a . Rating ) )
3838 } ) ;
39- foreach ( var rp in rating . RepPlayerRatings )
40- {
41- replayPlayerRatingId ++ ;
42-
43- replayPlayerRatings . Add ( new ( )
44- {
45- ArcadeReplayDsPlayerRatingId = replayPlayerRatingId ,
46- GamePos = rp . GamePos ,
47- Rating = MathF . Round ( rp . Rating , 2 ) ,
48- RatingChange = MathF . Round ( rp . RatingChange , 2 ) ,
49- Games = rp . Games ,
50- Consistency = MathF . Round ( rp . Consistency , 2 ) ,
51- Confidence = MathF . Round ( rp . Confidence , 2 ) ,
52- ArcadeReplayDsPlayerId = rp . ReplayPlayerId ,
53- ArcadeReplayRatingId = replayRatingId
54- } ) ;
55- }
39+ // foreach (var rp in rating.RepPlayerRatings)
40+ // {
41+ // replayPlayerRatingId++;
42+
43+ // replayPlayerRatings.Add(new()
44+ // {
45+ // ArcadeReplayDsPlayerRatingId = replayPlayerRatingId,
46+ // GamePos = rp.GamePos,
47+ // Rating = MathF.Round(rp.Rating, 2),
48+ // RatingChange = MathF.Round(rp.RatingChange, 2),
49+ // Games = rp.Games,
50+ // Consistency = MathF.Round(rp.Consistency, 2),
51+ // Confidence = MathF.Round(rp.Confidence, 2),
52+ // ArcadeReplayDsPlayerId = rp.ReplayPlayerId,
53+ // ArcadeReplayRatingId = replayRatingId
54+ // });
55+ // }
5656 }
5757
5858 var replayRatingCsv = GetFileName ( RatingCalcType . Arcade , nameof ( ReplayContext . ArcadeReplayRatings ) ) ;
@@ -67,13 +67,13 @@ public partial class RatingsSaveService
6767 } ) ;
6868 await csv1 . WriteRecordsAsync ( replayRatings ) ;
6969
70- using var stream2 = File . Open ( replayPlayerRatingCsv , fileMode ) ;
71- using var writer2 = new StreamWriter ( stream2 ) ;
72- using var csv2 = new CsvWriter ( writer2 , new CsvConfiguration ( CultureInfo . InvariantCulture )
73- {
74- HasHeaderRecord = false
75- } ) ;
76- await csv2 . WriteRecordsAsync ( replayPlayerRatings ) ;
70+ // using var stream2 = File.Open(replayPlayerRatingCsv, fileMode);
71+ // using var writer2 = new StreamWriter(stream2);
72+ // using var csv2 = new CsvWriter(writer2, new CsvConfiguration(CultureInfo.InvariantCulture)
73+ // {
74+ // HasHeaderRecord = false
75+ // });
76+ // await csv2.WriteRecordsAsync(replayPlayerRatings);
7777
7878 return ( replayRatingId , replayPlayerRatingId ) ;
7979 }
@@ -98,8 +98,8 @@ await Csv2Mysql(GetFileName(RatingCalcType.Arcade, nameof(ReplayContext.ArcadePl
9898 await FixArcadeForeignKey ( connectionString ) ;
9999 await Csv2Mysql ( GetFileName ( RatingCalcType . Arcade , nameof ( ReplayContext . ArcadeReplayRatings ) ) ,
100100 nameof ( ReplayContext . ArcadeReplayRatings ) , connectionString ) ;
101- await Csv2Mysql ( GetFileName ( RatingCalcType . Arcade , nameof ( ReplayContext . ArcadeReplayDsPlayerRatings ) ) ,
102- nameof ( ReplayContext . ArcadeReplayDsPlayerRatings ) , connectionString ) ;
101+ // await Csv2Mysql(GetFileName(RatingCalcType.Arcade, nameof(ReplayContext.ArcadeReplayDsPlayerRatings)),
102+ // nameof(ReplayContext.ArcadeReplayDsPlayerRatings), connectionString);
103103
104104 await SetArcadePlayerRatingsPos ( connectionString ) ;
105105 await SetArcadeRatingChange ( context , connectionString ) ;
0 commit comments