File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 11import 'dart:async' ;
2+ import 'dart:convert' ;
23import 'dart:io' ;
34
45import 'package:dio/dio.dart' ;
@@ -22,6 +23,7 @@ import 'package:miru_app/utils/layout.dart';
2223import 'package:miru_app/utils/miru_directory.dart' ;
2324import 'package:window_manager/window_manager.dart' ;
2425import 'package:path/path.dart' as path;
26+ import 'package:crypto/crypto.dart' ;
2527
2628class VideoPlayerController extends GetxController {
2729 final String title;
@@ -266,15 +268,16 @@ class VideoPlayerController extends GetxController {
266268 Directory (coverDir).createSync (recursive: true );
267269 final epName = playList[index.value].name;
268270 final filename = '${title }_$epName ' ;
269- final file = File (path.join (coverDir, filename));
271+ final file = File (
272+ path.join (coverDir, md5.convert (utf8.encode (filename)).toString ()));
270273 if (file.existsSync ()) {
271274 file.deleteSync (recursive: true );
272275 }
273276
274277 player.screenshot ().then ((value) {
275278 file.writeAsBytes (value! ).then (
276279 (value) async {
277- debugPrint ("save.." );
280+ debugPrint ("save.. ${ value . path } " );
278281 await DatabaseUtils .putHistory (
279282 History ()
280283 ..url = detailUrl
Original file line number Diff line number Diff line change @@ -234,7 +234,7 @@ packages:
234234 source: hosted
235235 version: "1.6.3"
236236 crypto:
237- dependency: transitive
237+ dependency: "direct main"
238238 description:
239239 name: crypto
240240 sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ dependencies:
5454 xpath_selector_html_parser : ^3.0.1
5555 device_info_plus : ^9.0.3
5656 android_intent_plus : ^4.0.2
57+ crypto : ^3.0.3
5758
5859
5960dev_dependencies :
You can’t perform that action at this time.
0 commit comments