diff --git a/lib/components/Settings/Settings.dart b/lib/components/Settings/Settings.dart index 2ac7cea5..0f2f789f 100644 --- a/lib/components/Settings/Settings.dart +++ b/lib/components/Settings/Settings.dart @@ -351,7 +351,7 @@ class Settings extends HookConsumerWidget { value: SpotubeTrackMatchAlgorithm.popular, ), DropdownMenuItem( - child: Text("YouTube's choice is my choice"), + child: Text("YouTube's Top choice"), value: SpotubeTrackMatchAlgorithm.youtube, ), ], diff --git a/lib/provider/Playback.dart b/lib/provider/Playback.dart index 8b472f50..f5429208 100644 --- a/lib/provider/Playback.dart +++ b/lib/provider/Playback.dart @@ -429,6 +429,10 @@ class Playback extends PersistedChangeNotifier { final bool hasNoLiveInTitle = !PrimitiveUtils.containsTextInBracket(ytTitle, "live"); + final bool hasCloseDuration = + (track.duration!.inSeconds - video.duration!.inSeconds) + .abs() <= + 10; //Duration matching threshold int rate = 0; for (final el in [ @@ -438,12 +442,14 @@ class Playback extends PersistedChangeNotifier { SpotubeTrackMatchAlgorithm.authenticPopular) authorIsArtist, hasNoLiveInTitle, + hasCloseDuration, !video.isLive, ]) { if (el) rate++; } // can't let pass any non title matching track if (!hasTitle) rate = rate - 2; + return { "video": video, "points": rate,