Skip to content

Commit

Permalink
added /playlist and update to v 0.1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
appujet committed Oct 5, 2024
1 parent 480fe06 commit edcd970
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
version=0.1.8
5 changes: 2 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#Sat Oct 05 20:47:35 IST 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
networkTimeout=10000
validateDistributionUrl=true
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
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.7"
project.version = findProperty("version") as String
val archivesBaseName = "jiosaavn"

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import java.util.stream.Collectors;

public class JioSaavnAudioSourceManager extends ExtendedAudioSourceManager {
private static final Pattern JIOSAAVN_REGEX = Pattern.compile("(https?://)(www\\.)?jiosaavn\\.com/(song|album|featured|artist)/([a-zA-Z0-9-_]+)");
private static final Pattern JIOSAAVN_REGEX = Pattern.compile("(https?://)(www\\.)?jiosaavn\\.com/(song|album|featured|artist|s/playlist)/([a-zA-Z0-9-_]+)(/([a-zA-Z0-9-_]+))?");
private static final Logger log = LoggerFactory.getLogger(JioSaavnAudioSourceManager.class);
public static String BASE_API = null;
public static final String SEARCH_PREFIX = "jssearch:";
Expand Down Expand Up @@ -56,12 +56,14 @@ public AudioItem loadItem(AudioPlayerManager audioPlayerManager, AudioReference
return null;
}
String type = matcher.group(3);

switch (type) {
case "song":
return this.getTrack(audioReference.identifier);
case "album":
return this.getAlbum(audioReference.identifier);
case "featured":
case "s/playlist":
return this.getPlaylist(audioReference.identifier);
case "artist":
return this.getArtist(audioReference.identifier);
Expand Down
5 changes: 2 additions & 3 deletions plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ plugins {
id("com.github.johnrengelman.shadow")
id("com.github.breadmoirai.github-release")
}

val pluginVersion = Version(0, 1, 7)
val pluginVersion = findProperty("version")

group = "com.github.appujet"
version = "$pluginVersion"
version = pluginVersion!!
val archivesBaseName = "jiosaavn-plugin"
val preRelease = System.getenv("PRERELEASE") == "true"
val verName = "${if (preRelease) "PRE_" else ""}$pluginVersion${if(preRelease) "_${System.getenv("GITHUB_RUN_NUMBER")}" else ""}"
Expand Down

0 comments on commit edcd970

Please sign in to comment.