You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
final possibleExtracted =_extractArtistTitleFromDescriptionIfNecessary(splitted, (infos) => infos.$1, streams, pageResult, videoItem);
124
-
if (possibleExtracted !=null) return possibleExtracted;
127
+
if (fallbackExtractInfoFromDescription) {
128
+
final possibleExtracted =_extractArtistTitleFromDescriptionIfNecessary(splitted, (infos) => infos.$1, streams, pageResult, videoItem);
129
+
if (possibleExtracted !=null) return possibleExtracted;
130
+
}
125
131
finalString? artist = splitted.$1;
126
132
if (artist !=null) return artist;
127
133
} else {
@@ -203,10 +209,11 @@ class _YtFilenameRebuilder {
203
209
final description =_getDescription(streams, pageResult, videoItem);
204
210
if (description !=null) {
205
211
final title = info?.$2?.splitFirst('(').splitFirst('[');
206
-
final regex = title ==null?RegExp('(song|info|details)\\W+(.+)', caseSensitive:false) :RegExp('(song|info|details)?\\W+(.+$title.+)', caseSensitive:false);
212
+
final regex = title ==null?RegExp('^\\W*(song|info|details)(.*)', caseSensitive:false) :RegExp('^\\W*(song|info|details)?(.*$title.*)', caseSensitive:false);
207
213
final regexArtist =RegExp('artist:(.*)', caseSensitive:false);
208
214
final regexTitle =RegExp('title:(.*)', caseSensitive:false);
209
-
for (final line in description.split('\n')) {
215
+
for (String line in description.split('\n')) {
216
+
line = line.replaceFirst(RegExp('Nightcore\\W*', caseSensitive:false), '');
210
217
final m = regex.firstMatch(line);
211
218
try {
212
219
var infosLine = m?.group(2)?.splitArtistAndTitle();
0 commit comments