Summary: | [PATCH]Recently-played track is replayed too soon when Track Progression == Random and Favor != None | ||
---|---|---|---|
Product: | [Applications] amarok | Reporter: | langstr |
Component: | Playlist | Assignee: | Amarok Developers <amarok-bugs-dist> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | brendon, nhn, t3ddy1988, teo |
Priority: | NOR | ||
Version: | 2.3-GIT | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 2.6 | |
Sentry Crash Report: | |||
Attachments: | Patch to stop FavoredRandomTrackNavigator choosing tracks just chosen |
Description
langstr
2010-07-12 23:36:13 UTC
Created attachment 51785 [details]
Patch to stop FavoredRandomTrackNavigator choosing tracks just chosen
Hi. I do use this function. Presumably this bug is why when I skip tracks Amarok sometimes picks them again very soon afterwards.
The attached patch is my attempt at fixing this. I've based it on (with some parts copied from) the implementation of RandomTrackNavigator. The way it works here is that when calculating weights, weights for tracks in the set of recently chosen tracks are set to zero. This should make it impossible (well, technically, almost impossible) to choose these tracks.
The code compiles, and (of course) I think it works, but it requires testing. (I'm not prepared to install a dev version of Amarok on this machine. Do you guys use a chroot to test dev versions or something?) Can someone please check?
Hope this helps,
Brendon
Brendon, we usually just install Amarok from git locally, see also here for a detailed instruction: http://blogs.fsfe.org/myriam/2009/09/compiling-amarok-from-git-locally-full-summary/ This has the advantage that it does not interfere with your default KDE installation, and a local build can be removed very easily by just erasing the folder. Changing Status, no idea why this is marked as wontfix... This bug is still present in 2.4, since when using random of tracks I get some track played more than once and other not played at all. I would expect them to be played all once randomly. (In reply to comment #3) > I would expect them to be played all once randomly. t3ddy that's somewhat of a more fundamental issue. It might be summarised as the difference between tracks being selected randomly (or "pseudo" randomly as Amarok does it) from a given playlist, and tracks being selected in order from a playlist that has been shuffled. I suspect transforming the current way Amarok does it (the former) to the latter would require too much effort. I'm not sure, because I don't use this function myself, but to solve your problem, perhaps there is a way to shuffle the playlist itself, and then play through normally. If there's no way to shuffle the playlist, perhaps you might file a wishlist bug for that feature. Peace, Brendon Thanks! I've found the way to shuffle the playlist (I neither knew it exists). Now, I shuffle the playlist and then play it in order. Maybe my memory is joking me, but I'm quite sure that amarok 1.4 could play once, randomly, all the tracks of a playlist. Brendon, does this patch still apply? If yes, please submit it to http://reviewboard.git.org. You will need an identity on http://identity.kde.org. Please submit this ASAP as we enter feature freeze on July 3rd. FYI, updated the patch to apply to current HEAD, and posted: https://git.reviewboard.kde.org/r/101836/ Git commit c0de954bda601a2e9c4d3464fcd4c5cb389541c2 by Ralf Engels. Committed on 21/01/2012 at 13:32. Pushed by rengels into branch 'master'. Prevent FavoredRandomTrackNavigator choosing files chosen very recently Author: Brendon Higgins FIXED-IN: 2.6 REVIEW: 101836 M +1 -0 ChangeLog M +55 -26 src/playlist/navigators/FavoredRandomTrackNavigator.cpp M +4 -1 src/playlist/navigators/FavoredRandomTrackNavigator.h http://commits.kde.org/amarok/c0de954bda601a2e9c4d3464fcd4c5cb389541c2 |