mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 07:55:18 +00:00
fix: metadata not getting added for YouTube tracks #916 and Wrong duration of downloaded tracks #912
This commit is contained in:
parent
cdd9452996
commit
a7b9398708
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user