Code Monkey home page Code Monkey logo

lavalink-client's People

Contributors

drschlaubi avatar duncte123 avatar freyacodes avatar kikkia avatar topi314 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

lavalink-client's Issues

Importing via maven fails.

Receiving this maven error when ever I try importing it via commit hash.

Could not find artifact dev.arbjerg.lavalink:protocol-jvm:pom:8a6c376407205e8208aa452c8b59443774c2e754-SNAPSHOT in arbjergDev-snapshots (https://maven.arbjerg.dev/snapshots)

pom.xml:

        <repository>
            <id>arbjergDev-snapshots</id>
            <name>Lavalink Repository</name>
            <url>https://maven.arbjerg.dev/snapshots</url>
        </repository>
...
        <dependency>
            <groupId>dev.arbjerg</groupId>
            <artifactId>lavalink-client</artifactId>
            <version>00786d310c97e44730796bfd616b5b15286de173-SNAPSHOT</version>
        </dependency>
...

Registered node events will stop sending after a while (4h+)

Edit by maintainer: Listeners stop getting events when they encounter uncaught exceptions.


I am having a weird issue.
so when i run my bot this will work fine:

            node.on(TrackEndEvent.class).subscribe(NodeEventsHandler::trackEndEvent);

but after 5h+ it will stop sending TrackEventEvent

it leads to these methods:

    @NonNull
    public void trackEndEvent(TrackEndEvent event) {
        var endReason = event.getEndReason();
        endedEvent(endReason.getMayStartNext(), event.getTrack());
        System.out.println(bot.getGuild() +" -> Track End: " + endReason.name());
    }


    public void endedEvent(boolean mayStartNext, Track endedTrack) {
        if (mayStartNext) {
            if (isLooping && endedTrack != null) {
                getLink().createOrUpdatePlayer()
                        .setEncodedTrack(endedTrack.getEncoded())
                        .setPosition(0L)
                        .subscribe();
                return;
            }
            if (isQueueLooping && endedTrack != null) {
                addToQueue(endedTrack, null);
                return;
            }
            nextTrack(null, null);
        }
        if (isAutoPlay && queue.isEmpty()) {
            autoPlay(endedTrack);
            return;
        }
    }

Node (Skipped/Replaced):

2024-01-21T16:08:17.280Z  INFO 178040 --- [  XNIO-1 task-2] l.server.io.RequestLoggingFilter         : PATCH /v4/sessions/okb2z23zukd0jjj8/players/1179002246478954516?noReplace=false, client=//, payload={"track":{"encoded":"QAABywMAF1dvcmxkJ3MgU21hbGxlc3QgVmlvbGluAANBSlIAAAAAAALCCgAWNjhFa2hWV0llVUxoSHhjYmkxUWh6SwABADVodHRwczovL29wZW4uc3BvdGlmeS5jb20vdHJhY2svNjhFa2hWV0llVUxoSHhjYmkxUWh6SwEAQGh0dHBzOi8vaS5zY2RuLmNvL2ltYWdlL2FiNjc2MTZkMDAwMGIyNzMwZjBlNzkwMGExMDJhYWE3MGVkMzBkM2UBAAxRTVJTWjIwMDMzMjQAB3Nwb3RpZnkBAAxPSyBPUkNIRVNUUkEBADVodHRwczovL29wZW4uc3BvdGlmeS5jb20vYWxidW0vN3JiZGdZS3oxREk0Z1hNV3ZlcVM1VAEANmh0dHBzOi8vb3Blbi5zcG90aWZ5LmNvbS9hcnRpc3QvNnMyMnQ1WTNwclFIeWFIV1VOMVIxQwABAGtodHRwczovL3Auc2Nkbi5jby9tcDMtcHJldmlldy8xYWU1MWI5ZTBhNDVlYzAyYzFlMzMwYmRhZDE4ODIxNzdmNDI4NThhP2NpZD1lNzFhZTk2YzMwZTU0ZmQ1OWI3MGIxNzgzMWVhYmY1NwAAAAAAAAAAAA=="}}

and the client got 0 events ๐Ÿ’€

=========

and here i restarted the bot, and it started receiving the events once again

Allow user only set user data independently in PlayerUpdateBuilder/Player

In some cases, users may only want to set their user data instead of having to create the entire Track object. Lavalink only requires the user to provide an encodedTrack to be able to play music.

Creating the Track object is annoying because it requires dev.arbjerg.lavalink.protocol.v4.Track, which includes many Kotlin elements that are not user-friendly for Java developers.

Moreover, while the identifier can be modified independently, why there isn't a similar option for user data?

Edit:
What I mean for not user-friendly, my current solution
image

Move examples to subproject

Currently the examples are in the test example, this is problematic and prevents us from adding unit tests.

Moving the examples to their own folder keeps them separate from the tests and keeps the project neatly organized.

Update player cache for tracks started

Currently only the player state is updated, but track start and stop events should be handled by the lib internally as well to reflect the state of the cached player

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.