[clean] manage errors
This commit is contained in:
parent
2dcaf0fa1f
commit
6dd76e0a82
|
|
@ -119,14 +119,22 @@ class DLServices {
|
||||||
await shell.run('''
|
await shell.run('''
|
||||||
$ytDlpPath $command
|
$ytDlpPath $command
|
||||||
''').then((result) {
|
''').then((result) {
|
||||||
debugPrint('Analyse error: $result');
|
result.map((e) {
|
||||||
|
debugPrint('Analyse result: $e');
|
||||||
FileLogger().d('Analyse result: ${result.toString()}');
|
FileLogger().d('Analyse result: ${e.toString()}');
|
||||||
|
FileLogger().d('stdout: ${e.stdout}');
|
||||||
|
FileLogger().d('stderr: ${e.stderr}');
|
||||||
|
});
|
||||||
}).catchError((
|
}).catchError((
|
||||||
error,
|
error,
|
||||||
stackTrace,
|
stackTrace,
|
||||||
) {
|
) {
|
||||||
FileLogger().e('Analyse error: $error');
|
error.map((e) {
|
||||||
|
debugPrint('Analyse result: $e');
|
||||||
|
FileLogger().d('Analyse result: ${e.toString()}');
|
||||||
|
FileLogger().d('stdout: ${e.stdout}');
|
||||||
|
FileLogger().d('stderr: ${e.stderr}');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
return shellLinesController.stream;
|
return shellLinesController.stream;
|
||||||
|
|
|
||||||
|
|
@ -112,6 +112,7 @@ class VideosCubit extends Cubit<VideosState> {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future moveVideos() async {
|
Future moveVideos() async {
|
||||||
|
debugPrint('Moving videos to download folder');
|
||||||
final prefs = await SharedPreferences.getInstance();
|
final prefs = await SharedPreferences.getInstance();
|
||||||
Directory defaultDownloadDirectory = await getDownloadDirectory();
|
Directory defaultDownloadDirectory = await getDownloadDirectory();
|
||||||
prefs.get('downloadFolder') ??
|
prefs.get('downloadFolder') ??
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue