add spotify feature
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 1m10s

This commit is contained in:
Lee
2024-06-28 03:01:21 +01:00
parent 5c7a067f7a
commit fa10cf2019
70 changed files with 966 additions and 170 deletions

View File

@ -19,7 +19,7 @@ public class ProfileHolder {
* Gets a profile for the holder
*
* @param clazz The class of the profile
* @param <T> The type of the profile
* @param <T> The type of the profile
* @return The profile
*/
public <T extends Profile> T getProfile(Class<T> clazz) {
@ -30,7 +30,7 @@ public class ProfileHolder {
Profile profile = profiles.values().stream().filter(p -> p.getClass().equals(clazz)).findFirst().orElse(null);
if (profile == null) {
try {
profile = (Profile) clazz.newInstance();
profile = clazz.newInstance();
profiles.put(profile.getProfileKey(), profile);
} catch (InstantiationException | IllegalAccessException e) {
e.printStackTrace();