-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor: Extract the CountsDuration table logic into PlaylistStatsDAO #13177
base: main
Are you sure you want to change the base?
Refactor: Extract the CountsDuration table logic into PlaylistStatsDAO #13177
Conversation
6c3895b
to
70bb549
Compare
70bb549
to
fe863bc
Compare
Thank you for this PR! Please note that there is already #4846 which also does a playlist backend refactoring. |
@ronso0: Thanks for the heads up! I am not especially partial to the code in this PR, it was a byproduct of understanding the playlist duration calculation logic while working on #13183 (which, in the end, was implemented in a wholly different way instead), and none of my other code depends on it. So it's your call whether to merge this PR, or close it and wait for #4846 to finish - I am fine either way. |
It seems that #4846 was last updated in 2022, so I don't know whether to expect any progress on that. My new PR #13183 calculates the total track time of the Auto DJ playlist (like #4846) but also takes intro/outro cues, transition times etc. fully into account by reusing the calculation logic that is used for performing the actual transitions, This PR is independent of that and is just a "nice to have" from a code quality perspective, so I'll leave it open for now. Feel free to close it in the future if it isn't needed anymore. |
Ok, then @ronso0 or someone else can merge this PR whenever they're ready.
Thank you, very much appreciated! I've got a few more changes lined up, including quite a big one related to keyboard navigation in the track info dialog (not yet ready, though). I'd appreciate a second pair of eyes on that, I'll ping you when it's ready. |
This PR is marked as stale because it has been open 90 days with no activity. |
Unfortunately a conflict has developed. |
This PR is marked as stale because it has been open 90 days with no activity. |
SetlogFeature
andPlaylistFeature
(as well asBasePlaylistFeature
) contain nearly identical code for creating a summary table of the track number and total duration of all playlists (both history playlists and normal playlists).This PR unifies the code into a single
PlaylistStatsDAO
class, which has the added advantage of moving DB-layer code from the*Feature
classes to a more appropriate location.