Skip to content

Add Jiosaavn source #270

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 39 commits into
base: master
Choose a base branch
from
Open

Add Jiosaavn source #270

wants to merge 39 commits into from

Conversation

freyacodes
Copy link
Contributor

@freyacodes freyacodes commented Apr 29, 2025

This PR cannibalises the JioSaavn parts of #247

The approach is a little different:

  • Configuration of the proxy is left as an exercise to whatever is using the main library (e.g. the Lavalink). This can be done via the HttpConfigurable interface. The source manager will have no concept of what a proxy is
  • I intend to provide a simple proxy configuration consisting of a single URL plus optional username + password.
  • No useLocalNetwork option. Either there is a proxy, or there isn't

Still to do:

  • Configuration of the proxy
  • Updated project documentation
  • Actual testing

WeeeeeeeeeeS and others added 30 commits January 2, 2025 15:35
…ioTrackResolver & issue fixed in Deezer/Savaan when not using proxies

removed newer java syntax to make compiler happy

made StringCompareMirroringAudioTrackResolver easier to change/maintain

rewrote StringCompareMirroringAudioTrackResolver

Refactored SaavnAudioSourceManager & used proxymanager

added proxy manager & applied it to deezer

tidal, savaan, proxy support,
Fixed DefaultMirroringAudioTrackResolver and made it more readable
…nnecessary configurations for regular users, and kept the functionality for more advanced users
Attempts to only pick out parts for a new JioSaavn PR.

Conflicts:
	README.md
	application.example.yml
	main/src/main/java/com/github/topi314/lavasrc/deezer/DeezerAudioSourceManager.java
	main/src/main/java/com/github/topi314/lavasrc/deezer/DeezerAudioTrack.java
	main/src/main/java/com/github/topi314/lavasrc/tidal/TidalAudioTrack.java
	main/src/main/java/com/github/topi314/lavasrc/tidal/TidalSourceManager.java
	plugin/src/main/java/com/github/topi314/lavasrc/plugin/LavaSrcPlugin.java
	plugin/src/main/java/com/github/topi314/lavasrc/plugin/config/SourcesConfig.java
	plugin/src/main/java/com/github/topi314/lavasrc/plugin/config/TidalConfig.java
@freyacodes
Copy link
Contributor Author

@topi314 let me know if you'd like me to squash the old commits or otherwise make the history linear

@topi314
Copy link
Owner

topi314 commented Apr 29, 2025

Should be fine
I only squash merge anyway

@freyacodes freyacodes marked this pull request as ready for review May 5, 2025 13:04
@freyacodes
Copy link
Contributor Author

@topi314 This should now be ready. I have done a few simple tests on both the plugin and the source manager itself. Please review 🫶

@WeeeeeeeeeeS You are also welcome to share your thoughts

@WeeeeeeeeeeS
Copy link

I think you forgot to add jiosaavn here https://github.com/botlabs-gg/LavaSrc/tree/jiosaavn?tab=readme-ov-file#supported-urls-and-queries

### JioSaavn
* `jssearch:animals architects`
* `jsrec:identifier`
* https://www.jiosaavn.com/song/hello/Oj0JdT5yZFo
* https://www.jiosaavn.com/artist/adele-songs/yc6n84bIDm8
* https://www.jiosaavn.com/album/25/NGUmkn-uYyY
* https://www.jiosaavn.com/featured/lets-play-adele/pVh19D03XxOvz,QNANKgeg

and also https://github.com/botlabs-gg/LavaSrc/tree/jiosaavn?tab=readme-ov-file#lavaplayer-usage

Copy link
Owner

@topi314 topi314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, there are a few unnecessary logs which can be removed
I'll run the auto format over it before merging

byte[] decryptedBytes = cipher.doFinal(encryptedBytes);
return new String(decryptedBytes);
} catch (Exception e) {
throw new FriendlyException("Failed to decrypt URL", Severity.COMMON, e);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldnt we just rethrow as RuntimeException here?
lavaplayer should wrap it in a FriendlyException for us

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants