Skip to content

Commit

Permalink
fix: metadata not getting added for YouTube tracks #916 and Wrong dur…
Browse files Browse the repository at this point in the history
…ation of downloaded tracks #912
  • Loading branch information
KRTirtho committed Dec 2, 2023
1 parent cdd9452 commit a7b9398
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/provider/download_manager_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class DownloadManagerProvider extends ChangeNotifier {
final (:request, :status) = event;

final track = $history.firstWhereOrNull(
(element) => element.url == request.url,
(element) => element.getUrlOfCodec(downloadCodec) == request.url,
);
if (track == null) return;

Expand Down
2 changes: 1 addition & 1 deletion lib/utils/type_conversion_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ abstract class TypeConversionUtils {
track.name = metadata?.title ?? basenameWithoutExtension(file.path);
track.type = "track";
track.uri = file.path;
track.durationMs = (metadata?.durationMs?.toInt() ?? 0) * 1000;
track.durationMs = (metadata?.durationMs?.toInt() ?? 0);

return track;
}
Expand Down

0 comments on commit a7b9398

Please sign in to comment.