executeCommand method
Implementation
@override
Future<bool> executeCommand(String command, [String? player]) async {
try {
final args = player != null ? ['--player=$player', command] : [command];
final result = await Process.run('playerctl', args, runInShell: true);
return result.exitCode == 0;
} catch (e) {
debugPrint('Error executing command $command: $e');
throw CommandExecutionException(command, null, e);
}
}