mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 01:53:31 +00:00
Removed featuring artists from the artist's name of downloaded item
This commit is contained in:
parent
ed4dc9fb63
commit
6e715d58a3
3 changed files with 25 additions and 5 deletions
|
|
@ -74,6 +74,16 @@ public class MusicUtil {
|
|||
return "";
|
||||
}
|
||||
|
||||
public static String normalizedArtistName(String string) {
|
||||
if (string != null) {
|
||||
if(string.toLowerCase().contains(" feat.")) return Pattern.compile(" feat.", Pattern.CASE_INSENSITIVE).split(string)[0].trim();
|
||||
else if(string.toLowerCase().contains(" featuring")) return Pattern.compile(" featuring", Pattern.CASE_INSENSITIVE).split(string)[0].trim();
|
||||
else return string;
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
public static List<String> getReadableStrings(List<String> strings) {
|
||||
List<String> readableStrings = new ArrayList<>();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue