Comment 6 for bug 1705704

Revision history for this message
In , Stharward-x (stharward-x) wrote :

(In reply to Tuomas Nurmi from comment #3)
> Git commit 25b763728031b9737f8dce80653086fb0a05e3fc by Tuomas Nurmi.
> Committed on 06/05/2024 at 15:14.
> Pushed by nurmi into branch 'master'.
>
> Prevent crash in APG when constraint is missing data
>
> I'm not familliar enough with APG to properly assess if the fact noted on the
> bug report, that amarok allows to generate an incomplete constraint, should
> be
> fixed or not, but at least it shouldn't crash. So let's fix that.
>
> M +2 -2 ChangeLog
> M +2 -0 src/playlistgenerator/constraints/Checkpoint.cpp
>
> https://invent.kde.org/multimedia/amarok/-/commit/
> 25b763728031b9737f8dce80653086fb0a05e3fc

Return 1.0 as the value in line 212.

If the user hasn't specified a track for the checkpoint, then the logical behavior is that any track will satisfy the constraint. So the APG solver will work better if the constraint always reports that it's 100% satisfied when the track is unspecified.