Skip to content

Commit 5599da8

Browse files
authored
Add Jiosaavn source (Maybe finally) (#294)
1 parent 7708b9c commit 5599da8

File tree

10 files changed

+794
-6
lines changed

10 files changed

+794
-6
lines changed

README.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
| Qobuz | 📁💿🎵🧑 | Direct | [@munishkhatri720](https://github.com/munishkhatri720) |
3232
| YouTube([yt-dlp](https://github.com/yt-dlp/yt-dlp)) | 📁💿🎵🧑🔍 | Direct | [@topi314](https://github.com/topi314) |
3333
| [LRCLIB](https://lrclib.net)) | 📜 | N/A | [@topi314](https://github.com/topi314) |
34+
| JioSaavn | 📁💿🎵🧑🔍🔬 | Direct | [@WeeeeeeeeeeS](https://github.com/WeeeeeeeeeeS), [@freyacodes](https://github.com/freyacodes) ||
3435

3536
### Features
3637

@@ -114,6 +115,7 @@ plugins:
114115
tidal: false # Enable Tidal source
115116
qobuz : false # Enabled qobuz source
116117
ytdlp: false # Enable yt-dlp source
118+
jiosaavn: false # Enable JioSaavn source
117119
lyrics-sources:
118120
spotify: false # Enable Spotify lyrics source
119121
deezer: false # Enable Deezer lyrics source
@@ -181,6 +183,15 @@ plugins:
181183
searchLimit: 10 # How many search results should be returned
182184
# customLoadArgs: ["-q", "--no-warnings", "--flat-playlist", "--skip-download", "-J"] # Custom arguments to pass to yt-dlp
183185
# customPlaybackArgs: ["-q", "--no-warnings", "-f", "bestaudio", "-J"] # Custom arguments for yt-dlp
186+
jiosaavn:
187+
decryption: # The decryption configuration for the JioSaavn tracks
188+
secretKey: "??" # The required secret key used for decryption (Find your own secret key)
189+
# algorithm: "DES" # The algorithm used for decryption (Default "DES")
190+
# transformation: "DES/ECB/PKCS5Padding" # The transformation used for decryption (Default "DES/ECB/PKCS5Padding")
191+
# proxy: # If defined, JioSaavn HTTP requests will be proxied through here. JioSaavn uses region blocking
192+
# url: "https://example.org" # The HTTP proxy to use
193+
# username: "my-bot" # Optional username to authenticate with the proxy
194+
# password: "youshallpass" # Optional password to authenticate with the proxy
184195
```
185196

186197
### Plugin Info
@@ -616,7 +627,7 @@ searchManager.registerSearchManager(deezer);
616627
1. (Optional) Open DevTools in your browser and on the Network tab enable trotlining.
617628
2. Go to https://oauth.yandex.ru/authorize?response_type=token&client_id=23cabbbdc6cd418abb4b39c32c41195d
618629
3. Authorize and grant access
619-
4. The browser will redirect to the address like `https://music.yandex.ru/#access_token=AQAAAAAYc***&token_type=bearer&expires_in=31535645`.
630+
4. The browser will redirect to the address like `https://music.yandex.ru/#access_token=AQAAAAAYc***&token_type=bearer&expires_in=31535645`.
620631
Very quickly there will be a redirect to another page, so you need to have time to copy the link. ![image](https://user-images.githubusercontent.com/68972811/196124196-a817b828-3387-4f70-a2b2-cdfdc71ce1f2.png)
621632
5. Your accessToken, what is after `access_token`.
622633

@@ -783,7 +794,7 @@ To retrieve the token:
783794
1. Open Qobuz in any web browser and log in with your Qobuz account.
784795
2. Press **F12** to open the developer tools and navigate to the **Network** tab.
785796
3. Select any request and check the request headers.
786-
> When looking for a request, you must find a POST request - not OPTIONS!
797+
> When looking for a request, you must find a POST request - not OPTIONS!
787798
4. Copy the value of the `x-user-auth-token` and paste it into the config.
788799
789800
</details>
@@ -882,7 +893,7 @@ You can read about all the available options [here](https://flowery.pw/docs), a
882893
* https://tidal.com/browse/playlist/12345678
883894
* https://tidal.com/browse/artist/12345678
884895
885-
### Qobuz
896+
### Qobuz
886897
887898
* `qbsearch:animals architects`
888899
* `qbisrc:USEP42058010` (`qbisrc:ISRC`)
@@ -901,4 +912,13 @@ You can read about all the available options [here](https://flowery.pw/docs), a
901912
* https://www.youtube.com/watch?v=yEBEg4NGVrw&list=PLcZMZxR9uxC8EGrCPopQT1JjNTV6nnQ1G
902913
* https://youtu.be/jdWhJcrrjQs
903914
904-
---
915+
### JioSaavn
916+
917+
* `jssearch:animals architects`
918+
* `jsrec:identifier`
919+
* https://www.jiosaavn.com/song/apna-bana-le/ATIfejZ9bWw
920+
* https://www.jiosaavn.com/album/bhediya/wSM2AOubajk
921+
* https://www.jiosaavn.com/artist/arijit-singh-songs/LlRWpHzy3Hk
922+
* https://www.jiosaavn.com/featured/jai-hanuman/8GIEhrr8clSO0eMLZZxqsA
923+
924+
---

application.example.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ plugins:
1717
tidal: false # Enable Tidal source
1818
qobuz: false # Enabled qobuz source
1919
ytdlp: false # Enable yt-dlp source
20+
jiosaavn: false # Enable the JioSaavn source
2021
lyrics-sources:
2122
spotify: false # Enable Spotify lyrics source
2223
deezer: false # Enable Deezer lyrics source
@@ -84,6 +85,15 @@ plugins:
8485
searchLimit: 10 # How many search results should be returned
8586
# customLoadArgs: ["-q", "--no-warnings", "--flat-playlist", "--skip-download", "-J"] # Custom arguments to pass to yt-dlp
8687
# customPlaybackArgs: ["-q", "--no-warnings", "-f", "bestaudio", "-J"] # Custom arguments for yt-dlp
88+
jiosaavn:
89+
decryption: # The decryption configuration for the JioSaavn tracks
90+
secretKey: "??" # The required secret key used for decryption (Find your own secret key)
91+
# algorithm: "DES" # The algorithm used for decryption (Default "DES")
92+
# transformation: "DES/ECB/PKCS5Padding" # The transformation used for decryption (Default "DES/ECB/PKCS5Padding")
93+
# proxy: # If defined, JioSaavn HTTP requests will be proxied through here. JioSaavn uses region blocking
94+
# url: "https://example.org" # The HTTP proxy to use
95+
# username: "my-bot" # Optional username to authenticate with the proxy
96+
# password: "youshallpass" # Optional password to authenticate with the proxy
8797

8898
server: # REST and WS server
8999
port: 2333
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.github.topi314.lavasrc.jiosaavn;
2+
3+
import com.github.topi314.lavasrc.ExtendedAudioPlaylist;
4+
import com.sedmelluq.discord.lavaplayer.track.AudioTrack;
5+
import java.util.List;
6+
7+
public class JioSaavnAudioPlaylist extends ExtendedAudioPlaylist {
8+
public JioSaavnAudioPlaylist(
9+
String name, List<AudioTrack> tracks, ExtendedAudioPlaylist.Type type, String identifier, String artworkURL, String author, Integer totalTracks
10+
) {
11+
super(name, tracks, type, identifier, artworkURL, author, totalTracks);
12+
}
13+
}

0 commit comments

Comments
 (0)