Skip to content

Commit

Permalink
update for beta test
Browse files Browse the repository at this point in the history
  • Loading branch information
appujet committed May 1, 2024
1 parent 73e9beb commit c98dea2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 18 deletions.
3 changes: 3 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,7 @@ subprojects {

tasks.getByName<Test>("test") {
useJUnitPlatform()
}
dependencies {
implementation(kotlin("script-runtime"))
}
2 changes: 1 addition & 1 deletion main/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
}

project.group = "com.github.appujet"
project.version = "0.1.1"
project.version = "0.1.2"
val archivesBaseName = "jiosaavn"

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.github.appujet.jiosaavn.ExtendedAudioPlaylist;
import com.github.appujet.jiosaavn.ExtendedAudioSourceManager;
import com.sedmelluq.discord.lavaplayer.player.AudioPlayerManager;
import com.sedmelluq.discord.lavaplayer.tools.DataFormatTools;
import com.sedmelluq.discord.lavaplayer.tools.JsonBrowser;
import com.sedmelluq.discord.lavaplayer.track.AudioItem;
import com.sedmelluq.discord.lavaplayer.track.AudioReference;
Expand Down Expand Up @@ -77,23 +78,9 @@ public boolean isTrackEncodable(AudioTrack audioTrack) {
}

@Override
public void encodeTrack(AudioTrack audioTrack, DataOutput dataOutput) {
// No need for encoding, just pass the track info without serialization
public void encodeTrack(AudioTrack audioTrack, DataOutput dataOutput) throws IOException {
JioSaavnAudioTrack jioSaavnAudioTrack = (JioSaavnAudioTrack) audioTrack;
AudioTrackInfo trackInfo = jioSaavnAudioTrack.getInfo();
try {
// Write track info properties individually
dataOutput.writeUTF(trackInfo.title);
dataOutput.writeUTF(trackInfo.author);
dataOutput.writeLong(trackInfo.length);
dataOutput.writeUTF(trackInfo.identifier);
dataOutput.writeBoolean(trackInfo.isStream);
dataOutput.writeUTF(trackInfo.uri);
dataOutput.writeUTF(trackInfo.artworkUrl);
// If there are additional properties, write them here
} catch (IOException e) {
throw new RuntimeException("Error encoding track", e);
}
DataFormatTools.writeNullableText(dataOutput, jioSaavnAudioTrack.getInfo().identifier);
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
id("com.github.breadmoirai.github-release")
}

val pluginVersion = Version(0, 1, 1)
val pluginVersion = Version(0, 1, 2)

group = "com.github.appujet"
version = "$pluginVersion"
Expand Down

0 comments on commit c98dea2

Please sign in to comment.