Skip to content

Commit

Permalink
ops
Browse files Browse the repository at this point in the history
  • Loading branch information
MSOB7YY committed Nov 27, 2023
1 parent 8658713 commit 5c0f52b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,17 @@ Future<void> _initializeIntenties() async {
final id = e.getYoutubeID;
return id == '' ? null : id;
}).whereType<String>();
final ytPlaylists = paths.map((e) {
final match = e.isEmpty ? null : kYoutubeRegexPlaylists.firstMatch(e)?[0];
return match;
}).whereType<String>();
if (youtubeIds.isNotEmpty) {
await _waitForFirstBuildContext.future;
settings.onYoutubeLinkOpen.value.execute(youtubeIds);
} else if (ytPlaylists.isNotEmpty) {
for (final pl in ytPlaylists) {
await settings.onYoutubeLinkOpen.value.executePlaylist(pl, context: rootContext);
}
} else {
final existing = paths.where((element) => File(element).existsSync()); // this for sussy links
final err = await playExternalFiles(existing);
Expand Down

0 comments on commit 5c0f52b

Please sign in to comment.