From 8eadbce85b60d16e99e25af119cd7c2cf326c509 Mon Sep 17 00:00:00 2001 From: Hemant KArya <65885023+HemantKArya@users.noreply.github.com> Date: Fri, 27 Sep 2024 21:53:17 +0530 Subject: [PATCH] ytm getrelated bug fix --- lib/repository/Youtube/yt_music_api.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/repository/Youtube/yt_music_api.dart b/lib/repository/Youtube/yt_music_api.dart index 4b9677e..9cedcbc 100644 --- a/lib/repository/Youtube/yt_music_api.dart +++ b/lib/repository/Youtube/yt_music_api.dart @@ -1882,7 +1882,7 @@ class YtMusicService { } else { if (count == 0) { artists += element['text']; - } else if (count == 1) { + } else if (count == 1 && subtitle.length>2) { album += element['text']; } else { year = int.tryParse(element['text']); @@ -1906,6 +1906,9 @@ class YtMusicService { 'musicVideoType', ]).toString()] ?? ''; + if (album.contains('views')) { + album = ''; + } final Map details = { 'id': 'youtube$id', 'title': decodeUnicode(title),