Skip to content

Commit

Permalink
Format files
Browse files Browse the repository at this point in the history
  • Loading branch information
abitofevrything committed Dec 9, 2023
1 parent d1fdecb commit 3d7be9e
Show file tree
Hide file tree
Showing 25 changed files with 66 additions and 155 deletions.
9 changes: 3 additions & 6 deletions packages/lavalink/lib/src/client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ class HttpLavalinkClient {

/// Decode multiple tracks from their encoded form.
Future<List<Track>> decodeTracks(List<String> encodedTracks) async {
final response =
jsonDecode(await _executeSafe('POST', '/v4/decodetracks', body: encodedTracks));
final response = jsonDecode(await _executeSafe('POST', '/v4/decodetracks', body: encodedTracks));
return (response as List).cast<Map<String, Object?>>().map(Track.fromJson).toList();
}

Expand Down Expand Up @@ -132,8 +131,7 @@ class HttpLavalinkClient {
}

/// Unmark all failed addresses in the RoutePlanner extension.
Future<void> unmarkAllFailedAddresses() async =>
await _executeSafe('POST', '/v4/routeplanner/free/all');
Future<void> unmarkAllFailedAddresses() async => await _executeSafe('POST', '/v4/routeplanner/free/all');

/// Close this client and all associated resources.
Future<void> close() async {
Expand Down Expand Up @@ -188,8 +186,7 @@ class LavalinkClient extends HttpLavalinkClient {

/// List all players in the current session.
Future<List<Player>> listPlayers() async {
final response =
jsonDecode(await _executeSafe('GET', '/v4/sessions/${connection.sessionId}/players'));
final response = jsonDecode(await _executeSafe('GET', '/v4/sessions/${connection.sessionId}/players'));
return (response as List).cast<Map<String, Object?>>().map(Player.fromJson).toList();
}

Expand Down
5 changes: 1 addition & 4 deletions packages/lavalink/lib/src/connection.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,7 @@ class LavalinkConnection extends Stream<LavalinkMessage> {
while (!_closing) {
try {
_webSocket = await WebSocket.connect(
client.base
.resolve('v4/websocket')
.replace(scheme: client.base.isScheme('https') ? 'wss' : 'ws')
.toString(),
client.base.resolve('v4/websocket').replace(scheme: client.base.isScheme('https') ? 'wss' : 'ws').toString(),
headers: {
'Authorization': client.password,
'User-Id': client.userId,
Expand Down
3 changes: 1 addition & 2 deletions packages/lavalink/lib/src/messages/events/track_end.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ class TrackExceptionEvent extends LavalinkEvent {
required this.exception,
});

factory TrackExceptionEvent.fromJson(Map<String, Object?> json) =>
_$TrackExceptionEventFromJson(json);
factory TrackExceptionEvent.fromJson(Map<String, Object?> json) => _$TrackExceptionEventFromJson(json);
}

@JsonSerializable()
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions packages/lavalink/lib/src/messages/events/track_start.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions packages/lavalink/lib/src/messages/events/track_stuck.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,5 @@ class WebSocketClosedEvent extends LavalinkEvent {
required this.wasByRemote,
});

factory WebSocketClosedEvent.fromJson(Map<String, Object?> json) =>
_$WebSocketClosedEventFromJson(json);
factory WebSocketClosedEvent.fromJson(Map<String, Object?> json) => _$WebSocketClosedEventFromJson(json);
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions packages/lavalink/lib/src/messages/player_update.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@ class PlayerUpdateMessage extends LavalinkMessage {
required this.state,
});

factory PlayerUpdateMessage.fromJson(Map<String, Object?> json) =>
_$PlayerUpdateMessageFromJson(json);
factory PlayerUpdateMessage.fromJson(Map<String, Object?> json) => _$PlayerUpdateMessageFromJson(json);
}
3 changes: 1 addition & 2 deletions packages/lavalink/lib/src/messages/player_update.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions packages/lavalink/lib/src/messages/ready.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@ class LavalinkReadyMessage extends LavalinkMessage {
required this.sessionId,
});

factory LavalinkReadyMessage.fromJson(Map<String, Object?> json) =>
_$LavalinkReadyMessageFromJson(json);
factory LavalinkReadyMessage.fromJson(Map<String, Object?> json) => _$LavalinkReadyMessageFromJson(json);
}
4 changes: 1 addition & 3 deletions packages/lavalink/lib/src/messages/ready.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions packages/lavalink/lib/src/messages/stats.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 9 additions & 27 deletions packages/lavalink/lib/src/models/filters.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 3 additions & 8 deletions packages/lavalink/lib/src/models/info.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions packages/lavalink/lib/src/models/loaded_track_result.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ class PlaylistLoadResult extends LoadResult {
/// Create a new [PlaylistLoadResult].
PlaylistLoadResult({required super.loadType, required this.data});

factory PlaylistLoadResult.fromJson(Map<String, Object?> json) =>
_$PlaylistLoadResultFromJson(json);
factory PlaylistLoadResult.fromJson(Map<String, Object?> json) => _$PlaylistLoadResultFromJson(json);
}

/// A playlist of tracks.
Expand Down
23 changes: 7 additions & 16 deletions packages/lavalink/lib/src/models/loaded_track_result.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions packages/lavalink/lib/src/models/player.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions packages/lavalink/lib/src/models/route_planner.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ class RoutePlannerStatus {
/// Create a new [RoutePlannerStatus].
RoutePlannerStatus({required this.type, required this.details});

factory RoutePlannerStatus.fromJson(Map<String, Object?> json) =>
_$RoutePlannerStatusFromJson(json);
factory RoutePlannerStatus.fromJson(Map<String, Object?> json) => _$RoutePlannerStatusFromJson(json);
}

/// Information about the configuration of the RoutePlanner extension on a Lavalink server.
Expand Down Expand Up @@ -57,8 +56,7 @@ class RoutePlannerDetails {
required this.blockIndex,
});

factory RoutePlannerDetails.fromJson(Map<String, Object?> json) =>
_$RoutePlannerDetailsFromJson(json);
factory RoutePlannerDetails.fromJson(Map<String, Object?> json) => _$RoutePlannerDetailsFromJson(json);
}

/// A block of IP addresses.
Expand Down
21 changes: 6 additions & 15 deletions packages/lavalink/lib/src/models/route_planner.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions packages/lavalink/lib/src/models/stats.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3d7be9e

Please sign in to comment.