@@ -39,14 +39,9 @@ public class Manager : INotifyPropertyChanged
39
39
public event PropertyChangedEventHandler PropertyChanged ;
40
40
41
41
42
- public string hpTwitchAPIKey { get ; set ; }
43
- public string hpAPIEmail { get ; set ; }
44
- public string twitchNickname { get ; set ; }
45
- public int hpAPIUserID { get ; set ; }
46
-
47
42
public bool PreMatchPage { get ; set ; }
48
43
public bool PostMatchPage { get ; set ; }
49
- public bool TwitchExtension { get ; set ; }
44
+
50
45
51
46
private string _status = "" ;
52
47
@@ -109,24 +104,11 @@ public async void Start(IMonitor monitor, ILiveMonitor live_monitor, IAnalyzer a
109
104
110
105
_monitor . ReplayAdded += async ( _ , e ) => {
111
106
await EnsureFileAvailable ( e . Data ) ;
112
- if ( PreMatchPage || TwitchExtension ) {
113
-
114
-
115
- if ( TwitchExtension ) {
116
- await EnsureFileAvailable ( e . Data ) ;
117
- var tmpPath = Path . GetTempFileName ( ) ;
118
- await SafeCopy ( e . Data , tmpPath , true ) ;
119
- await _liveProcessor . saveMissingTalentData ( tmpPath ) ;
120
- }
107
+ if ( PreMatchPage ) {
121
108
122
109
_live_monitor . StopBattleLobbyWatcher ( ) ;
123
110
_live_monitor . StopStormSaveWatcher ( ) ;
124
-
125
111
_live_monitor = new LiveMonitor ( ) ;
126
-
127
- if ( PreMatchPage || TwitchExtension ) {
128
- StartBattleLobbyWatcherEvent ( ) ;
129
- }
130
112
}
131
113
132
114
var replay = new ReplayFile ( e . Data ) ;
@@ -146,42 +128,25 @@ public async void Start(IMonitor monitor, ILiveMonitor live_monitor, IAnalyzer a
146
128
}
147
129
private void StartBattleLobbyWatcherEvent ( )
148
130
{
149
- if ( PreMatchPage || TwitchExtension ) {
131
+ if ( PreMatchPage ) {
150
132
_live_monitor . TempBattleLobbyCreated += async ( _ , e ) => {
151
133
152
134
_live_monitor . StopBattleLobbyWatcher ( ) ;
153
- _liveProcessor = new LiveProcessor ( PreMatchPage , TwitchExtension , hpTwitchAPIKey , hpAPIEmail , twitchNickname , hpAPIUserID ) ;
135
+ _liveProcessor = new LiveProcessor ( PreMatchPage ) ;
154
136
155
137
await EnsureFileAvailable ( e . Data ) ;
156
138
var tmpPath = Path . GetTempFileName ( ) ;
157
139
await SafeCopy ( e . Data , tmpPath , true ) ;
158
140
await _liveProcessor . StartProcessing ( tmpPath ) ;
159
141
160
142
161
- if ( TwitchExtension ) {
162
- StartStormSaveWatcherEvent ( ) ;
163
- }
164
143
165
144
} ;
166
145
167
146
_live_monitor . StartBattleLobby ( ) ;
168
147
}
169
148
}
170
149
171
- private void StartStormSaveWatcherEvent ( )
172
- {
173
- if ( TwitchExtension ) {
174
- _live_monitor . StormSaveCreated += async ( _ , e ) => {
175
- Thread . Sleep ( 1000 ) ;
176
- await EnsureFileAvailable ( e . Data ) ;
177
- var tmpPath = Path . GetTempFileName ( ) ;
178
- await SafeCopy ( e . Data , tmpPath , true ) ;
179
- await _liveProcessor . UpdateData ( tmpPath ) ;
180
- } ;
181
- _live_monitor . StartStormSave ( ) ;
182
- }
183
- }
184
-
185
150
public void Stop ( )
186
151
{
187
152
_monitor . Stop ( ) ;
0 commit comments