Code Monkey home page Code Monkey logo

Comments (2)

angelobreuer avatar angelobreuer commented on June 9, 2024

Hello @230Daniel,
thank you for your report!

The LavalinkNode simply redirects the incoming payload to events, as you can see here:

if (payload is TrackEndEvent trackEndEvent)
{
var args = new TrackEndEventArgs(player,
trackEndEvent.TrackIdentifier,
trackEndEvent.Reason);
await Task.WhenAll(OnTrackEndAsync(args),
player.OnTrackEndAsync(args));
}
// an exception occurred while playing a track
if (payload is TrackExceptionEvent trackExceptionEvent)
{
var args = new TrackExceptionEventArgs(player,
trackExceptionEvent.TrackIdentifier,
trackExceptionEvent.Error);
await Task.WhenAll(OnTrackExceptionAsync(args),
player.OnTrackExceptionAsync(args));
}
// a track got stuck
if (payload is TrackStuckEvent trackStuckEvent)
{
var args = new TrackStuckEventArgs(player,
trackStuckEvent.TrackIdentifier,
trackStuckEvent.Threshold);
await Task.WhenAll(OnTrackStuckAsync(args),
player.OnTrackStuckAsync(args));
}
// a track started
if (payload is TrackStartEvent trackStartEvent)
{
var args = new TrackStartedEventArgs(player,
trackStartEvent.TrackIdentifier);
await Task.WhenAll(OnTrackStartedAsync(args),
player.OnTrackStartedAsync(args));
}

Also, the LavalinkPlayer never dispatches the CleanUp track end reason itself.

I think your issue is related to the Lavalink Server itself and not with the library, as the behavior also occurs when the "another person" interacts with the Lavalink Server. So I think your issue belongs to here: https://github.com/Frederikam/Lavalink

Much thanks!
Angelo Breuer

from lavalink4net.

230Daniel avatar 230Daniel commented on June 9, 2024

Oh right, it's definitely not an issue with this library then.

I thought that perhaps Lavalink4NET detected when a track got stuck like this and raised the event accordingly.

Thank you for the help!
Daniel

from lavalink4net.

Related Issues (20)

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.