Skip to content
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

fix/History: remove obsolete placeholder playlists #12494

Merged
merged 2 commits into from Jan 2, 2024

Conversation

ronso0
Copy link
Member

@ronso0 ronso0 commented Jan 1, 2024

I just noticed I made a mistake in 60198d5 (I had ~300 historyPlaceholder# playlists in my database):
the YEAR placeholders are not removed in the destructor because 1) the type is PlaylistDAO::PLHT_UNKNOWN which is not covered by deleteAllUnlockedPlaylistsWithFewerTracks(), and 2) if it was, they'd be skipped because they are locked.

Note: this affects 2.4-beta users only, so we may remove this at some point (2.5?). Otoh the cleanup almost no time after the first execution.

@ronso0 ronso0 added this to the 2.4.0 milestone Jan 1, 2024
@ronso0 ronso0 added the bug label Jan 1, 2024
Copy link
Member

@daschuer daschuer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for taking care.

src/library/trackset/playlistfeature.cpp Outdated Show resolved Hide resolved
const auto pls = m_playlistDao.getPlaylists(PlaylistDAO::PLHT_UNKNOWN);
QStringList plsToDelete;
for (const auto& pl : pls) {
if (pl.second.startsWith(placeholderName)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

auto above and second here is not well readable.
Not your fault. If you have the mood to improve it go ahead.
Else we can ignore it in this bufix PR

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, auto was simply faster to type.
I'll change it.

Copy link
Member

@daschuer daschuer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Thank you.

@daschuer daschuer merged commit b32ffd4 into mixxxdj:main Jan 2, 2024
12 checks passed
@ronso0 ronso0 deleted the history-fix branch January 2, 2024 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants