File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
src/main/java/de/presti/ree6
module/notifications/impl Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -346,10 +346,10 @@ public static void main(String[] args) {
346
346
getInstance ().setNotifier (new Notifier ());
347
347
348
348
if (BotConfig .isModuleActive ("notifier" )) {
349
- getInstance ().getNotifier ().getSpotifySonic ().load ();
350
349
ThreadUtil .createThread (x -> {
351
350
log .info ("Loading Notifier data." );
352
351
SQLSession .getSqlConnector ().getSqlWorker ().getEntityList (new ChannelStats (), "FROM ChannelStats" , null ).subscribe (channelStats -> {
352
+ getInstance ().getNotifier ().getSpotifySonic ().load (channelStats );
353
353
getInstance ().getNotifier ().getYouTubeSonic ().load (channelStats );
354
354
getInstance ().getNotifier ().getTwitchSonic ().load (channelStats );
355
355
getInstance ().getNotifier ().getInstagramSonic ().load (channelStats );
Original file line number Diff line number Diff line change 12
12
import de .presti .ree6 .sql .entities .stats .ChannelStats ;
13
13
import de .presti .ree6 .sql .entities .webhook .WebhookSpotify ;
14
14
import de .presti .ree6 .utils .apis .SpotifyAPIHandler ;
15
+ import io .sentry .Sentry ;
15
16
import lombok .extern .slf4j .Slf4j ;
16
17
import se .michaelthelin .spotify .model_objects .specification .AlbumSimplified ;
17
18
import se .michaelthelin .spotify .model_objects .specification .ArtistSimplified ;
@@ -34,12 +35,13 @@ public class SpotifySonic implements ISonic {
34
35
35
36
@ Override
36
37
public void load (List <ChannelStats > channelStats ) {
38
+ load ();
37
39
// No need for this.
38
40
}
39
41
40
42
@ Override
41
43
public void load () {
42
- // Register all YouTube channels .
44
+ // Register all Spotify artists and podcasts .
43
45
SQLSession .getSqlConnector ().getSqlWorker ().getEntityList (new WebhookSpotify (), "FROM WebhookSpotify" , Map .of ()).subscribe (spotifyNotify -> {
44
46
spotifyNotify .forEach (x -> {
45
47
if (x .getEntityTyp () == 0 ) {
@@ -101,6 +103,7 @@ public void run() {
101
103
}
102
104
}
103
105
} catch (Exception exception ) {
106
+ Sentry .captureException (exception );
104
107
// TODO:: handle this shit
105
108
}
106
109
}
You can’t perform that action at this time.
0 commit comments