why is it not working
This commit is contained in:
parent
92aaa277d9
commit
7d78df584e
1 changed files with 2 additions and 2 deletions
|
@ -123,7 +123,7 @@ public class MusicCommand extends Command {
|
||||||
final String lowerCaseFile = pathSplitted[pathSplitted.length - 1].toLowerCase();
|
final String lowerCaseFile = pathSplitted[pathSplitted.length - 1].toLowerCase();
|
||||||
|
|
||||||
final String file = Arrays.stream(songs)
|
final String file = Arrays.stream(songs)
|
||||||
.filter(song -> song.toLowerCase().contains(lowerCaseFile))
|
.filter(song -> song.equalsIgnoreCase(lowerCaseFile) || song.toLowerCase().contains(lowerCaseFile))
|
||||||
.toArray(String[]::new)[0];
|
.toArray(String[]::new)[0];
|
||||||
|
|
||||||
player.loadSong(Path.of(realPath.toString(), file));
|
player.loadSong(Path.of(realPath.toString(), file));
|
||||||
|
@ -133,7 +133,7 @@ public class MusicCommand extends Command {
|
||||||
if (songs == null) return null;
|
if (songs == null) return null;
|
||||||
|
|
||||||
final String file = Arrays.stream(songs)
|
final String file = Arrays.stream(songs)
|
||||||
.filter(song -> song.toLowerCase().contains(_path.toLowerCase()))
|
.filter(song -> song.equalsIgnoreCase(_path) || song.toLowerCase().contains(_path.toLowerCase()))
|
||||||
.toArray(String[]::new)[0];
|
.toArray(String[]::new)[0];
|
||||||
|
|
||||||
player.loadSong(Path.of(root.toString(), file));
|
player.loadSong(Path.of(root.toString(), file));
|
||||||
|
|
Loading…
Reference in a new issue