Skip to content

Commit

Permalink
fix: faulty folder path while downloading multiple videos
Browse files Browse the repository at this point in the history
  • Loading branch information
MSOB7YY committed Jun 20, 2024
1 parent 692d21d commit e58be1c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/youtube/pages/yt_playlist_download_subpage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,11 @@ class _YTPlaylistDownloadPageState extends State<YTPlaylistDownloadPage> {
trailingPadding: 12.0,
playlistName: widget.playlistName,
initialFolder: _groupName.valueR,
subtitle: (value) => "${AppDirs.YOUTUBE_DOWNLOADS}$value",
subtitle: (value) {
String dir = AppDirs.YOUTUBE_DOWNLOADS;
if (!dir.endsWith('/')) dir += '/';
return "$dir$value";
},
onDownloadGroupNameChanged: (newGroupName) {
_groupName.value = newGroupName;
},
Expand All @@ -352,7 +356,9 @@ class _YTPlaylistDownloadPageState extends State<YTPlaylistDownloadPage> {
() {
final isSelected = _selectedList.contains(id);
final filename = _configMap[id]?.filename;
final fileExists = File("${AppDirs.YOUTUBE_DOWNLOADS}${_groupName.valueR}/$filename").existsSync();
String dir = AppDirs.YOUTUBE_DOWNLOADS;
if (!dir.endsWith('/')) dir += '/';
final fileExists = File("$dir${_groupName.valueR}/$filename").existsSync();
return NamidaInkWell(
animationDurationMS: 200,
height: Dimensions.youtubeCardItemHeight * _hmultiplier,
Expand Down

0 comments on commit e58be1c

Please sign in to comment.