mirror of
https://github.com/stonega/tsacdop
synced 2025-02-17 20:10:37 +01:00
Fix bug, '/' in episode title download fail.
This commit is contained in:
parent
b7047f29fc
commit
35d749564c
@ -111,7 +111,7 @@ class AutoDownloader {
|
||||
now.day.toString() +
|
||||
now.second.toString();
|
||||
var fileName =
|
||||
'${episode.title}$datePlus.${episode.enclosureUrl.split('/').last.split('.').last}';
|
||||
'${episode.title.replaceAll('/', '')}$datePlus.${episode.enclosureUrl.split('/').last.split('.').last}';
|
||||
if (fileName.length > 100) {
|
||||
fileName = fileName.substring(fileName.length - 100);
|
||||
}
|
||||
@ -161,6 +161,7 @@ class DownloadState extends ChangeNotifier {
|
||||
taskId: task.taskId, shouldDeleteContent: true);
|
||||
} else {
|
||||
if (task.status == DownloadTaskStatus.complete) {
|
||||
final filname = task.filename.replaceAll('/', '');
|
||||
var exist =
|
||||
await File(path.join(task.savedDir, task.filename)).exists();
|
||||
if (!exist) {
|
||||
@ -283,7 +284,7 @@ class DownloadState extends ChangeNotifier {
|
||||
now.day.toString() +
|
||||
now.second.toString();
|
||||
var fileName =
|
||||
'${episode.title}$datePlus.${episode.enclosureUrl.split('/').last.split('.').last}';
|
||||
'${episode.title.replaceAll('/', '')}$datePlus.${episode.enclosureUrl.split('/').last.split('.').last}';
|
||||
if (fileName.length > 100) {
|
||||
fileName = fileName.substring(fileName.length - 100);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user