chore: remove print statements

This commit is contained in:
Kingkor Roy Tirtho 2024-04-09 21:44:01 +06:00
parent 220cf3c41b
commit 7385088144

View File

@ -4,6 +4,7 @@ import 'package:catcher_2/catcher_2.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:spotify/spotify.dart'; import 'package:spotify/spotify.dart';
import 'package:spotube/models/connect/connect.dart'; import 'package:spotube/models/connect/connect.dart';
import 'package:spotube/models/logger.dart';
import 'package:spotube/provider/connect/clients.dart'; import 'package:spotube/provider/connect/clients.dart';
import 'package:spotube/provider/proxy_playlist/proxy_playlist.dart'; import 'package:spotube/provider/proxy_playlist/proxy_playlist.dart';
import 'package:spotube/services/audio_player/loop_mode.dart'; import 'package:spotube/services/audio_player/loop_mode.dart';
@ -38,19 +39,21 @@ final volumeProvider = StateProvider<double>(
(ref) => 1.0, (ref) => 1.0,
); );
final logger = getLogger('ConnectNotifier');
class ConnectNotifier extends AsyncNotifier<WebSocketChannel?> { class ConnectNotifier extends AsyncNotifier<WebSocketChannel?> {
@override @override
build() async { build() async {
try { try {
final connectClients = ref.watch(connectClientsProvider); final connectClients = ref.watch(connectClientsProvider);
print('Building ConnectNotifier');
if (connectClients.asData?.value.resolvedService == null) return null; if (connectClients.asData?.value.resolvedService == null) return null;
final service = connectClients.asData!.value.resolvedService!; final service = connectClients.asData!.value.resolvedService!;
print( logger.t(
'Connecting to ${service.name}: ws://${service.host}:${service.port}/ws'); '♾️ Connecting to ${service.name}: ws://${service.host}:${service.port}/ws',
);
final channel = WebSocketChannel.connect( final channel = WebSocketChannel.connect(
Uri.parse('ws://${service.host}:${service.port}/ws'), Uri.parse('ws://${service.host}:${service.port}/ws'),
@ -58,8 +61,9 @@ class ConnectNotifier extends AsyncNotifier<WebSocketChannel?> {
await channel.ready; await channel.ready;
print( logger.t(
'Connected to ${service.name}: ws://${service.host}:${service.port}/ws'); '✅ Connected to ${service.name}: ws://${service.host}:${service.port}/ws',
);
final subscription = channel.stream.listen( final subscription = channel.stream.listen(
(message) { (message) {