From 383990d002b2728f9e2c971829fd49a0ed2a54dc Mon Sep 17 00:00:00 2001 From: Alix von Schirp Date: Sat, 28 Jan 2023 07:21:17 +0100 Subject: [PATCH 1/7] Reimplemented refreshing access token May fix #17 --- .../tools/lastfmtospotifyplaylist/LastFMToSpotify.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/LastFMToSpotify.java b/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/LastFMToSpotify.java index c96ca36..8a7de20 100644 --- a/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/LastFMToSpotify.java +++ b/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/LastFMToSpotify.java @@ -84,7 +84,8 @@ public class LastFMToSpotify { logLn("Cached credentials have been found.", 2); logLn("Fetching old credentials, refreshing them and saving to cache", 2); AuthorizationCodeCredentials oldcred = TokenHelper.fetchTokens(); - AuthorizationCodeCredentials newcred = api.authorizationCodeRefresh(api.getClientId(), api.getClientSecret(), oldcred.getRefreshToken()).setHeader("User-Agent", configuration.get("requests.useragent")).build().execute(); + api.setRefreshToken(oldcred.getRefreshToken()); + AuthorizationCodeCredentials newcred = api.authorizationCodeRefresh().build().execute(); TokenHelper.saveTokens(newcred); configuration.put("spotify.access", newcred.getAccessToken()); } else { -- 2.49.1 From 084f75fb8341845dee44a0b551515a05aa921b49 Mon Sep 17 00:00:00 2001 From: Alix von Schirp <15247003+B00tLoad@users.noreply.github.com> Date: Sat, 28 Jan 2023 07:38:56 +0100 Subject: [PATCH 2/7] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 37 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 ++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..e2fee88 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,37 @@ +--- +name: Bug report +about: Create a report to help us improve +title: "[BUG] " +labels: bug +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS [e.g. Windows]: + - Version/Build [e.g. 22H2/19045.2546]: + - Java Version/Build [e.g. Temurin-18.0.1+10]: + +**Console Output** +``` +Add any relevant console outputs (like stack traces after an Exception) here. +``` + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..36a7fe5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: "[FR] " +labels: enhancement +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. -- 2.49.1 From 2086a857048193297fa62d9c8c94e386bc9271b4 Mon Sep 17 00:00:00 2001 From: Alix von Schirp Date: Sat, 28 Jan 2023 19:33:00 +0100 Subject: [PATCH 3/7] Implemented a SpotifyAuthorizationCredential Wrapper class Hopefully fixes #17 by checking for access token validity before refreshing. --- .../LastFMToSpotify.java | 20 +++++++---- .../util/SpotifyCredentials.java | 34 +++++++++++++++++++ .../util/TokenHelper.java | 18 +++++----- 3 files changed, 55 insertions(+), 17 deletions(-) create mode 100644 src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/util/SpotifyCredentials.java diff --git a/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/LastFMToSpotify.java b/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/LastFMToSpotify.java index 8a7de20..a1266ee 100644 --- a/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/LastFMToSpotify.java +++ b/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/LastFMToSpotify.java @@ -6,6 +6,7 @@ import de.b00tload.tools.lastfmtospotifyplaylist.arguments.ArgumentHandler; import de.b00tload.tools.lastfmtospotifyplaylist.arguments.Arguments; import de.b00tload.tools.lastfmtospotifyplaylist.util.PeriodHelper; +import de.b00tload.tools.lastfmtospotifyplaylist.util.SpotifyCredentials; import de.b00tload.tools.lastfmtospotifyplaylist.util.TokenHelper; import de.umass.lastfm.Caller; import de.umass.lastfm.Track; @@ -14,7 +15,6 @@ import io.javalin.Javalin; import io.javalin.http.ContentType; import io.javalin.http.HttpStatus; import se.michaelthelin.spotify.SpotifyApi; -import se.michaelthelin.spotify.model_objects.credentials.AuthorizationCodeCredentials; import se.michaelthelin.spotify.model_objects.specification.Playlist; import java.net.URI; @@ -82,12 +82,18 @@ public class LastFMToSpotify { AtomicBoolean waiting = new AtomicBoolean(true); if (configuration.containsKey("cache.crypto") && TokenHelper.existsTokens()) { logLn("Cached credentials have been found.", 2); - logLn("Fetching old credentials, refreshing them and saving to cache", 2); - AuthorizationCodeCredentials oldcred = TokenHelper.fetchTokens(); + logLn("Fetching credentials from cache.", 2); + SpotifyCredentials oldcred = TokenHelper.fetchTokens(); api.setRefreshToken(oldcred.getRefreshToken()); - AuthorizationCodeCredentials newcred = api.authorizationCodeRefresh().build().execute(); - TokenHelper.saveTokens(newcred); - configuration.put("spotify.access", newcred.getAccessToken()); + SpotifyCredentials cred; + if(oldcred.isValid()){ + cred=oldcred; + } else { + logLn("Cached credentials are invalid due to age. Refreshing and saving to cache", 2); + cred = new SpotifyCredentials(api.authorizationCodeRefresh().build().execute()); + TokenHelper.saveTokens(cred); + } + configuration.put("spotify.access", cred.getAccessToken()); } else { try (Javalin webserver = Javalin.create().start(9876)) { if (configuration.containsKey("cache.crypto")) logLn("No cached credentials have been found.", 2); @@ -99,7 +105,7 @@ public class LastFMToSpotify { webserver.get("/callback/spotify", ctx -> { if(ctx.queryParamMap().containsKey("code")) { logLn("Received spotify authentication code. Requesting credentials.", 2); - AuthorizationCodeCredentials cred = api.authorizationCode(ctx.queryParam("code")).setHeader("User-Agent", configuration.get("requests.useragent")).build().execute(); + SpotifyCredentials cred = new SpotifyCredentials(api.authorizationCode(ctx.queryParam("code")).setHeader("User-Agent", configuration.get("requests.useragent")).build().execute()); configuration.put("spotify.access", cred.getAccessToken()); if(configuration.containsKey("cache.crypto")) { logLn("Saving credentials to cache.", 2); diff --git a/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/util/SpotifyCredentials.java b/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/util/SpotifyCredentials.java new file mode 100644 index 0000000..57e5f22 --- /dev/null +++ b/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/util/SpotifyCredentials.java @@ -0,0 +1,34 @@ +package de.b00tload.tools.lastfmtospotifyplaylist.util; +import se.michaelthelin.spotify.model_objects.credentials.AuthorizationCodeCredentials; + +import java.io.Serializable; +import java.time.Clock; +import java.time.LocalDateTime; + +public class SpotifyCredentials implements Serializable { + + private final AuthorizationCodeCredentials cred; + private final LocalDateTime validUntil; + + public SpotifyCredentials(AuthorizationCodeCredentials cred){ + this.cred = cred; + this.validUntil = LocalDateTime.now(Clock.systemDefaultZone()).plusSeconds(cred.getExpiresIn()); + } + + public String getAccessToken(){ + return cred.getAccessToken(); + } + + public String getRefreshToken(){ + return cred.getRefreshToken(); + } + + public LocalDateTime getValidUntil(){ + return validUntil; + } + + public boolean isValid(){ + return LocalDateTime.now(Clock.systemDefaultZone()).isBefore(validUntil); + } + +} \ No newline at end of file diff --git a/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/util/TokenHelper.java b/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/util/TokenHelper.java index b9e434a..752859e 100644 --- a/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/util/TokenHelper.java +++ b/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/util/TokenHelper.java @@ -1,7 +1,5 @@ package de.b00tload.tools.lastfmtospotifyplaylist.util; -import se.michaelthelin.spotify.model_objects.credentials.AuthorizationCodeCredentials; - import java.nio.file.Path; import static de.b00tload.tools.lastfmtospotifyplaylist.LastFMToSpotify.USER_HOME; @@ -10,23 +8,23 @@ import static de.b00tload.tools.lastfmtospotifyplaylist.LastFMToSpotify.configur public class TokenHelper { /** - * Manages saving a se.michaelthelin.spotify.model_objects.credentials.AuthorizationCodeCredentials into "~/.lfm2s/spotify.lfm2scred" using de.b00tload.tools.lastfmtospotifyplaylist.util.CryptoHelper.serializeEncrypted(...) - * @param cred The se.michaelthelin.spotify.model_objects.credentials.AuthorizationCodeCredentials to be saved + * Manages saving a into "~/.lfm2s/spotify.lfm2scred" using de.b00tload.tools.lastfmtospotifyplaylist.util.CryptoHelper.serializeEncrypted(...) + * @param cred The de.b00tload.tools.lastfmtospotifyplaylist.util.SpotifyCredentials to be saved */ - public static void saveTokens(AuthorizationCodeCredentials cred) { + public static void saveTokens(SpotifyCredentials cred) { CryptoHelper.serializeEncrypted(cred, Path.of(USER_HOME, "/.lfm2s/spotify.lfm2scred"), CryptoHelper.createKeyFromPassword(configuration.get("cache.crypto"))); } /** - * Manages retrieving a se.michaelthelin.spotify.model_objects.credentials.AuthorizationCodeCredentials from "~/.lfm2s/spotify.lfm2scred" using de.b00tload.tools.lastfmtospotifyplaylist.util.CryptoHelper.deserializeEncrypted(...) - * @return The retrieved se.michaelthelin.spotify.model_objects.credentials.AuthorizationCodeCredentials + * Manages retrieving a de.b00tload.tools.lastfmtospotifyplaylist.util.SpotifyCredentials from "~/.lfm2s/spotify.lfm2scred" using de.b00tload.tools.lastfmtospotifyplaylist.util.CryptoHelper.deserializeEncrypted(...) + * @return The retrieved de.b00tload.tools.lastfmtospotifyplaylist.util.SpotifyCredentials */ - public static AuthorizationCodeCredentials fetchTokens() { - return (AuthorizationCodeCredentials) CryptoHelper.deserializeEncrypted(Path.of(USER_HOME, "/.lfm2s/spotify.lfm2scred"), CryptoHelper.createKeyFromPassword(configuration.get("cache.crypto"))); + public static SpotifyCredentials fetchTokens() { + return (SpotifyCredentials) CryptoHelper.deserializeEncrypted(Path.of(USER_HOME, "/.lfm2s/spotify.lfm2scred"), CryptoHelper.createKeyFromPassword(configuration.get("cache.crypto"))); } /** - * Checks whether the saved spotify AuthorizationCodeCredentials at "~/.lfm2s/spotify.lfm2scred" exist + * Checks whether the saved SpotifyCredentials at "~/.lfm2s/spotify.lfm2scred" exist * @return true if file exists, false if not */ public static boolean existsTokens(){ -- 2.49.1 From e52dfd46212eec910edb7676da0683093240bcf8 Mon Sep 17 00:00:00 2001 From: Alix von Schirp Date: Sat, 28 Jan 2023 20:09:19 +0100 Subject: [PATCH 4/7] Added documentation for wrapper class --- .../util/SpotifyCredentials.java | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/util/SpotifyCredentials.java b/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/util/SpotifyCredentials.java index 57e5f22..3b0148c 100644 --- a/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/util/SpotifyCredentials.java +++ b/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/util/SpotifyCredentials.java @@ -5,30 +5,53 @@ import java.io.Serializable; import java.time.Clock; import java.time.LocalDateTime; +/** + * A wrapper class for se.michaelthelin.spotify.model_objects.credentials.AuthorizationCodeCredentials. Implements checking validity of access token. + */ public class SpotifyCredentials implements Serializable { private final AuthorizationCodeCredentials cred; private final LocalDateTime validUntil; + /** + * Initializes the class + * @param cred The AuthorizationCodeCredentials to be saved. Recommended for use with recently (last few seconds) generated Credentials + */ public SpotifyCredentials(AuthorizationCodeCredentials cred){ this.cred = cred; this.validUntil = LocalDateTime.now(Clock.systemDefaultZone()).plusSeconds(cred.getExpiresIn()); } + /** + * Get the access token. It becomes invalid after a certain period of time. Check validity with isValid(). + * @return An access token that can be provided in subsequent calls, for example to Spotify Web API services. + */ public String getAccessToken(){ return cred.getAccessToken(); } + /** + * Get the refresh token. This token can be sent to the Spotify Accounts service in place of an authorization code to retrieve a new access token. + * @return A token that can be sent to the Spotify Accounts service in place of an access token. + */ public String getRefreshToken(){ return cred.getRefreshToken(); } + /** + * Returns a LocalDateTime which represents the latest point in time when the access token is still valid. + * @return A LocalDateTime representing the latest point in time of access token validity + */ public LocalDateTime getValidUntil(){ return validUntil; } + /** + * Checks whether the saved access token is still valid for use in calls, for example to the Spotify Web API services. + * @return true if the access token is still valid for use, false if not. + */ public boolean isValid(){ - return LocalDateTime.now(Clock.systemDefaultZone()).isBefore(validUntil); + return LocalDateTime.now(Clock.systemDefaultZone()).isBefore(getValidUntil()); } } \ No newline at end of file -- 2.49.1 From 174c9912aac4d2aa5faa6437cdb07a625017fd8d Mon Sep 17 00:00:00 2001 From: Morril Date: Sat, 28 Jan 2023 20:52:42 +0100 Subject: [PATCH 5/7] added BrowserHelper implemented open Spotify auth page --- .../LastFMToSpotify.java | 8 +++- .../util/BrowserHelper.java | 42 +++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/util/BrowserHelper.java diff --git a/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/LastFMToSpotify.java b/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/LastFMToSpotify.java index c32d43e..9149a5d 100644 --- a/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/LastFMToSpotify.java +++ b/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/LastFMToSpotify.java @@ -4,6 +4,7 @@ package de.b00tload.tools.lastfmtospotifyplaylist; import com.neovisionaries.i18n.CountryCode; import de.b00tload.tools.lastfmtospotifyplaylist.arguments.ArgumentHandler; import de.b00tload.tools.lastfmtospotifyplaylist.arguments.Arguments; +import de.b00tload.tools.lastfmtospotifyplaylist.util.BrowserHelper; import de.b00tload.tools.lastfmtospotifyplaylist.util.PeriodHelper; import de.b00tload.tools.lastfmtospotifyplaylist.util.TokenHelper; @@ -100,7 +101,12 @@ public class LastFMToSpotify { } }); logLn("Waiting for Spotify authorization.", 1); - //TODO: Open auth page in Browser + + String authPage = "https://accounts.spotify.com/authorize?client_id=" + + configuration.get("spotify.clientid") + + "&response_type=code&state=73775e18-b0bc-4031-a379-bce99a0e3e6c&redirect_uri=http%3A%2F%2Flocalhost%3A9876%2Fcallback%2Fspotify%2F&scope=user-read-private%20playlist-modify-private%20playlist-modify-public%20ugc-image-upload%20playlist-read-private%20playlist-read-collaborative"; + BrowserHelper.openInBrowser(authPage); + while (waiting.get()); } } diff --git a/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/util/BrowserHelper.java b/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/util/BrowserHelper.java new file mode 100644 index 0000000..1eedfd5 --- /dev/null +++ b/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/util/BrowserHelper.java @@ -0,0 +1,42 @@ +package de.b00tload.tools.lastfmtospotifyplaylist.util; + +public class BrowserHelper { + + /** + * Opens a url in the systems default browser + * @param url + */ + public static void openInBrowser(String url) { + + String os = System.getProperty("os.name").toLowerCase(); + ProcessBuilder builder; + + if (os.indexOf("win") >= 0) { + // Windows + builder = new ProcessBuilder("rundll32.exe","url.dll,FileProtocolHandler", url); + } else if (os.indexOf("mac") >= 0) { + // Mac + builder = new ProcessBuilder("open", url); + } else if (os.indexOf("nix") >= 0 || os.indexOf("nux") >= 0) { + // Linux + os = "linux"; + builder = new ProcessBuilder("xdg-open", url); + } else { + Logger.logLn("Please open the following link:\n"+url, 1); + builder = null; + } + + try { + if (builder != null) { + Process exec = builder.start(); + if (os.equals("linux") && exec.exitValue() == 3) { + // on Linux in case of missing browser + Logger.logLn("Please open the following link:\n"+url, 1); + } + } + } catch (Exception e) { + Logger.logLn(e.getMessage(), 3); + } + + } +} -- 2.49.1 From 502295b34ab274f5515e52fda6bc40c4af5854c5 Mon Sep 17 00:00:00 2001 From: Alix von Schirp Date: Sat, 28 Jan 2023 21:42:43 +0100 Subject: [PATCH 6/7] Saving access token and refresh token without relying on library class I'd pretty confidently say this now definitely fixes #17, therefore this will be merged into master. If necessary issue will have to reopened. --- .../LastFMToSpotify.java | 12 ++++------ .../util/SpotifyCredentials.java | 23 +++++++++++++++---- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/LastFMToSpotify.java b/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/LastFMToSpotify.java index a1266ee..8a34aec 100644 --- a/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/LastFMToSpotify.java +++ b/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/LastFMToSpotify.java @@ -83,14 +83,12 @@ public class LastFMToSpotify { if (configuration.containsKey("cache.crypto") && TokenHelper.existsTokens()) { logLn("Cached credentials have been found.", 2); logLn("Fetching credentials from cache.", 2); - SpotifyCredentials oldcred = TokenHelper.fetchTokens(); - api.setRefreshToken(oldcred.getRefreshToken()); - SpotifyCredentials cred; - if(oldcred.isValid()){ - cred=oldcred; - } else { + SpotifyCredentials cred = TokenHelper.fetchTokens(); + api.setRefreshToken(cred.getRefreshToken()); + + if(!cred.isValid()){ logLn("Cached credentials are invalid due to age. Refreshing and saving to cache", 2); - cred = new SpotifyCredentials(api.authorizationCodeRefresh().build().execute()); + cred.refreshCredentials(api.authorizationCodeRefresh().build().execute()); TokenHelper.saveTokens(cred); } configuration.put("spotify.access", cred.getAccessToken()); diff --git a/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/util/SpotifyCredentials.java b/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/util/SpotifyCredentials.java index 3b0148c..5c5f4d2 100644 --- a/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/util/SpotifyCredentials.java +++ b/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/util/SpotifyCredentials.java @@ -4,21 +4,24 @@ import se.michaelthelin.spotify.model_objects.credentials.AuthorizationCodeCrede import java.io.Serializable; import java.time.Clock; import java.time.LocalDateTime; +import java.util.Objects; /** * A wrapper class for se.michaelthelin.spotify.model_objects.credentials.AuthorizationCodeCredentials. Implements checking validity of access token. */ public class SpotifyCredentials implements Serializable { - private final AuthorizationCodeCredentials cred; - private final LocalDateTime validUntil; + private String accessToken; + private String refreshToken; + private LocalDateTime validUntil; /** * Initializes the class * @param cred The AuthorizationCodeCredentials to be saved. Recommended for use with recently (last few seconds) generated Credentials */ public SpotifyCredentials(AuthorizationCodeCredentials cred){ - this.cred = cred; + this.accessToken = cred.getAccessToken(); + this.refreshToken = cred.getRefreshToken(); this.validUntil = LocalDateTime.now(Clock.systemDefaultZone()).plusSeconds(cred.getExpiresIn()); } @@ -27,7 +30,7 @@ public class SpotifyCredentials implements Serializable { * @return An access token that can be provided in subsequent calls, for example to Spotify Web API services. */ public String getAccessToken(){ - return cred.getAccessToken(); + return accessToken; } /** @@ -35,7 +38,7 @@ public class SpotifyCredentials implements Serializable { * @return A token that can be sent to the Spotify Accounts service in place of an access token. */ public String getRefreshToken(){ - return cred.getRefreshToken(); + return refreshToken; } /** @@ -54,4 +57,14 @@ public class SpotifyCredentials implements Serializable { return LocalDateTime.now(Clock.systemDefaultZone()).isBefore(getValidUntil()); } + /** + * Refreshes the access token. If a new refresh token is provided it will be saved as well. + * @param cred The AuthorizationCodeCredentials to be saved. Recommended for use with recently (last few seconds) generated Credentials + */ + public void refreshCredentials(AuthorizationCodeCredentials cred){ + this.accessToken = cred.getAccessToken(); + if(Objects.nonNull(cred.getRefreshToken())) this.refreshToken = cred.getRefreshToken(); + this.validUntil = LocalDateTime.now(Clock.systemDefaultZone()).plusSeconds(cred.getExpiresIn()); + } + } \ No newline at end of file -- 2.49.1 From 7b3aa0107ff9ddeec5cb6d0207d0639975a5448a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=B4rr=C3=AEl?= <78359161+Morril161@users.noreply.github.com> Date: Sat, 28 Jan 2023 22:03:02 +0100 Subject: [PATCH 7/7] Update TokenHelper.java l.11 fixed missing > --- .../tools/lastfmtospotifyplaylist/util/TokenHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/util/TokenHelper.java b/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/util/TokenHelper.java index 752859e..ffe40c6 100644 --- a/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/util/TokenHelper.java +++ b/src/main/java/de/b00tload/tools/lastfmtospotifyplaylist/util/TokenHelper.java @@ -8,7 +8,7 @@ import static de.b00tload.tools.lastfmtospotifyplaylist.LastFMToSpotify.configur public class TokenHelper { /** - * Manages saving a into "~/.lfm2s/spotify.lfm2scred" using de.b00tload.tools.lastfmtospotifyplaylist.util.CryptoHelper.serializeEncrypted(...) + * Manages saving a de.b00tload.tools.lastfmtospotifyplaylist.util.SpotifyCredentials into "~/.lfm2s/spotify.lfm2scred" using de.b00tload.tools.lastfmtospotifyplaylist.util.CryptoHelper.serializeEncrypted(...) * @param cred The de.b00tload.tools.lastfmtospotifyplaylist.util.SpotifyCredentials to be saved */ public static void saveTokens(SpotifyCredentials cred) { -- 2.49.1