Git Product home page Git Product logo

Comments (13)

Yucked avatar Yucked commented on August 21, 2024 3

I'm currently following the Lavalink issue dakata1337 opened and did ask him few questions. STOPPED was supposed to send only and only if you called StopAsync which meant to completely stop the player. But now, Lavalink is sending STOPPED for every normal track as well which is obviously going to make it extremely difficult to determine whether a user wants to stop the player all together or play the next song.

from victoria.

FireController1847 avatar FireController1847 commented on August 21, 2024

Was this issue resolved then? What's the status?

from victoria.

Yucked avatar Yucked commented on August 21, 2024

I thought it got pushed but apparently not. Lemme get on that.

from victoria.

Yucked avatar Yucked commented on August 21, 2024

Was this issue resolved then? What's the status?

It should be live now. Apparently nuget key expired.

from victoria.

FireController1847 avatar FireController1847 commented on August 21, 2024

Glad to hear, I'll test it soon. Thanks a ton :)

from victoria.

dakata1337 avatar dakata1337 commented on August 21, 2024

@Yucked I updated to 5.1.10 still same issues.

from victoria.

Yucked avatar Yucked commented on August 21, 2024

Just realized you failed to provide crucial information: https://github.com/Frederikam/Lavalink/issues/408

from victoria.

Yucked avatar Yucked commented on August 21, 2024

@FireController1847 @dakata1337 This isn't an issue on Victoria's end. ShouldPlayNext() is an extension method. You are not required to use it which is why Victoria gives you the flexibility you need. You can create your own extension method or handle each case the way you want to:

The code of extension method is fairly straight forward:

        public static bool ShouldPlayNext(this TrackEndReason trackEndReason) {
            return trackEndReason == TrackEndReason.Finished || trackEndReason == TrackEndReason.LoadFailed;
        }

You can add your own check if you want, you can use switch clause, if-else statements. The provided is default. Most of the stuff provided in Victoria is default such as DefaultQueue, ArtworkResolver, LyricsResolver.

Lavalink also doesn't mention anything in changelogs regarding that: https://github.com/Frederikam/Lavalink/commits/master/IMPLEMENTATION.md

Now if I were to also include TrackEndReason.Stopped, if someone was to call StopAsync it will start playing the next song if any. That's not what STOPPED is meant to do.

I apologize about me taking so long to get on it as I've work and college but please next time do provide complete info as to what you're doing. If Lavalink implements a breaking change, doesn't mention it in implementation or change log, there is no way for library supporters to know what got changed.

Changelog doesn't mention that change either if https://github.com/Frederikam/Lavalink/blob/master/CHANGELOG.md

from victoria.

FireController1847 avatar FireController1847 commented on August 21, 2024

Very interesting. I didn't know about this misunderstanding of stopped vs finished. This may be unrelated to the issue I was having, then. I use ShouldPlayNext() to determine, of course, whether or not to play the next song, or to just stop playing entirely. I'm still not sure I understand when stopped vs finished is called, however. Though maybe my issue is unrelated to this issue... I'll do some more investigation and if I see my issue continue I will report a proper bug report to the appropriate place, if it is even a bug on this end or on my end.

What I do know, however, is that updating fixed the issue for me :)

from victoria.

dakata1337 avatar dakata1337 commented on August 21, 2024

I'm currently following the Lavalink issue dakata1337 opened and did ask him few questions. STOPPED was supposed to send only and only if you called StopAsync which meant to completely stop the player. But now, Lavalink is sending STOPPED for every normal track as well which is obviously going to make it extremely difficult to determine whether a user wants to stop the player all together or play the next song.

Any updates?

from victoria.

Yucked avatar Yucked commented on August 21, 2024

@dakata1337

I don't manage Lavalink. According to that thread, Lavalink is sending wrong TrackFinished for tracks less than <=5 seconds.

The solution was also provided above.

@dakata1337 This isn't an issue on Victoria's end. ShouldPlayNext() is an extension method. You are not required to use it which is why Victoria gives you the flexibility you need. You can create your own extension method or handle each case the way you want to:

The code of extension method is fairly straight forward:

        public static bool ShouldPlayNext(this TrackEndReason trackEndReason) {
            return trackEndReason == TrackEndReason.Finished || trackEndReason == TrackEndReason.LoadFailed;
        }

You can add your own check if you want, you can use switch clause, if-else statements. The provided is default. Most of the stuff provided in Victoria is default such as DefaultQueue, ArtworkResolver, LyricsResolver.

Lavalink also doesn't mention anything in changelogs regarding that: https://github.com/Frederikam/Lavalink/commits/master/IMPLEMENTATION.md

Now if I were to also include TrackEndReason.Stopped, if someone was to call StopAsync it will start playing the next song if any. That's not what STOPPED is meant to do.

I apologize about me taking so long to get on it as I've work and college but please next time do provide complete info as to what you're doing. If Lavalink implements a breaking change, doesn't mention it in implementation or change log, there is no way for library supporters to know what got changed.

Changelog doesn't mention that change either if https://github.com/Frederikam/Lavalink/blob/master/CHANGELOG.md

from victoria.

Yucked avatar Yucked commented on August 21, 2024

Please make sure v5.1.11 fixes your issue.

from victoria.

dakata1337 avatar dakata1337 commented on August 21, 2024

Please make sure v5.1.11 fixes your issue.
v5.1.11 fixed all the issues i've had.
Thank you for all the help @Yucked!

from victoria.

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.