diff --git a/.gitignore b/.gitignore index 8a9e462..f4d2b67 100644 --- a/.gitignore +++ b/.gitignore @@ -28,5 +28,5 @@ replay_pid* .DS_Store */build/* build -*/logs/* +logs/* application.yml \ No newline at end of file diff --git a/logs/spring.log.2024-04-29.0.gz b/logs/spring.log.2024-04-29.0.gz deleted file mode 100644 index b0198f6..0000000 Binary files a/logs/spring.log.2024-04-29.0.gz and /dev/null differ diff --git a/main/build.gradle.kts b/main/build.gradle.kts index 7199e4e..73018a6 100644 --- a/main/build.gradle.kts +++ b/main/build.gradle.kts @@ -4,7 +4,7 @@ plugins { } project.group = "com.github.appujet" -project.version = "0.1.3" +project.version = "0.1.5" val archivesBaseName = "jiosaavn" dependencies { diff --git a/main/src/main/java/com/github/appujet/jiosaavn/ExtendedAudioSourceManager.java b/main/src/main/java/com/github/appujet/jiosaavn/ExtendedAudioSourceManager.java index fb5048a..ab3ffc4 100644 --- a/main/src/main/java/com/github/appujet/jiosaavn/ExtendedAudioSourceManager.java +++ b/main/src/main/java/com/github/appujet/jiosaavn/ExtendedAudioSourceManager.java @@ -66,8 +66,6 @@ public void onContextOpen(HttpClientContext context) { cookieStore = new BasicCookieStore(); context.setCookieStore(cookieStore); } - - // Reset cookies for each sequence of requests. cookieStore.clear(); } diff --git a/main/src/main/java/com/github/appujet/jiosaavn/ExtendedAudioTrack.java b/main/src/main/java/com/github/appujet/jiosaavn/ExtendedAudioTrack.java index 9fab5d9..72b86cf 100644 --- a/main/src/main/java/com/github/appujet/jiosaavn/ExtendedAudioTrack.java +++ b/main/src/main/java/com/github/appujet/jiosaavn/ExtendedAudioTrack.java @@ -37,9 +37,11 @@ public void process(LocalAudioTrackExecutor executor) throws Exception { protected void loadStream(LocalAudioTrackExecutor localExecutor, HttpInterface httpInterface) throws Exception { final String trackUrl = getPlaybackUrl(); - log.info("Loading track from URL: {}", trackUrl); - try (PersistentHttpStream stream = new PersistentHttpStream(httpInterface, new URI(trackUrl), this.getTrackDuration())) { + try (PersistentHttpStream stream = new PersistentHttpStream(httpInterface, new URI(trackUrl), this.getTrackDuration())) { processDelegate(createAudioTrack(this.trackInfo, stream), localExecutor); + } catch (Exception e) { + log.error("Failed to load track from URL: {}", trackUrl, e); + throw e; } } diff --git a/main/src/main/java/com/github/appujet/jiosaavn/Utils.java b/main/src/main/java/com/github/appujet/jiosaavn/Utils.java index de8fdaa..8b868ef 100644 --- a/main/src/main/java/com/github/appujet/jiosaavn/Utils.java +++ b/main/src/main/java/com/github/appujet/jiosaavn/Utils.java @@ -7,8 +7,6 @@ import java.io.IOException; import java.nio.charset.StandardCharsets; -import java.util.Base64; -import java.util.Iterator; public class Utils { diff --git a/main/src/main/java/com/github/appujet/jiosaavn/source/JioSaavnAudioSourceManager.java b/main/src/main/java/com/github/appujet/jiosaavn/source/JioSaavnAudioSourceManager.java index ee84d7e..38e6b4a 100644 --- a/main/src/main/java/com/github/appujet/jiosaavn/source/JioSaavnAudioSourceManager.java +++ b/main/src/main/java/com/github/appujet/jiosaavn/source/JioSaavnAudioSourceManager.java @@ -79,7 +79,7 @@ public boolean isTrackEncodable(AudioTrack audioTrack) { @Override public void encodeTrack(AudioTrack audioTrack, DataOutput dataOutput) throws IOException { - DataFormatTools.writeNullableText(dataOutput, audioTrack.getIdentifier()); + } @Override diff --git a/plugin/build.gradle.kts b/plugin/build.gradle.kts index a00b3b4..6439942 100644 --- a/plugin/build.gradle.kts +++ b/plugin/build.gradle.kts @@ -6,7 +6,7 @@ plugins { id("com.github.breadmoirai.github-release") } -val pluginVersion = Version(0, 1, 3) +val pluginVersion = Version(0, 1, 5) group = "com.github.appujet" version = "$pluginVersion" diff --git a/settings.gradle.kts b/settings.gradle.kts index 8d71fb3..8c4de99 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -24,7 +24,7 @@ fun VersionCatalogBuilder.common() { fun VersionCatalogBuilder.main() { version("slf4j-version", "2.0.9") - library("lavaplayer", "dev.arbjerg", "lavaplayer").version("2.1.1") + library("lavaplayer", "dev.arbjerg", "lavaplayer").version("2.2.1") library("logger", "org.slf4j", "slf4j-api").versionRef("slf4j-version") library("logger-impl", "org.slf4j", "slf4j-simple").versionRef("slf4j-version") library("commonsIo", "commons-io", "commons-io").version("2.7")