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

Auto-DJ does not work for winx86 on first start #6625

Closed
mixxxbot opened this issue Aug 22, 2022 · 5 comments
Closed

Auto-DJ does not work for winx86 on first start #6625

mixxxbot opened this issue Aug 22, 2022 · 5 comments
Milestone

Comments

@mixxxbot
Copy link
Collaborator

Reported by: kain88-de
Date: 2012-09-07T14:54:09Z
Status: Fix Released
Importance: Medium
Launchpad Issue: lp1047435
Tags: autodj
Attachments: firstStartAutoDj.patch, firstStartAutoDj_v3.patch


This is a bug with the database-code.
On the first run mixxx seems to think that the playlist ID for Auto-DJ is -1. So the tracks get added and saved correctly in the database they just refer to a invalid playlist_id(-1). When mixxx is started for the second time all works well and songs added to auto-dj are all shown. I will also test if this problems occurs under linux as well

I used prebuild r3369-x86 for this.

@mixxxbot
Copy link
Collaborator Author

Commented by: kain88-de
Date: 2012-09-07T21:52:17Z


The problem also occurs on linux with the latest revision

@mixxxbot
Copy link
Collaborator Author

Commented by: kain88-de
Date: 2012-09-09T20:27:54Z
Attachments: firstStartAutoDj.patch


Oh this turned out the be a suprise developing a solution.

As it turns out the bug only occurs if the libraryScanner runs longer then 2 sec.(noticable because the UI element to cancel the scan shows up) on the initial run. If just a small number of songs is imported the entry for a Auto-DJ playlist is generated. I guess this is because the libraryscanner blocks the db and so no other part of mixxx can make a transaction.

The patch attached contains a brute force method to fix this and adds the Auto-DJ entry in the db if it not exists. I will try to find a more elegant solution for this problem

@mixxxbot
Copy link
Collaborator Author

Commented by: kain88-de
Date: 2012-09-14T23:02:05Z
Attachments: firstStartAutoDj_v3.patch


I found a better solution for this problem.

The problem was that dlgAutodj took care of creating the autoDJ-playlist but this was created when the skin is loaded. Which is after the libraryscanner is created. This means mixxx tried to add the playlist while we had a open transaction running.
I solved the problem by initializing the libraryscanner after the skin is loaded.

This solution should be ok for 1.11. I know that Scott worked on Auto-DJ for GSOC did he write a AutoDJ class that takes care of the logic and isn't tied to the GUI like the system we have now?

@mixxxbot
Copy link
Collaborator Author

Commented by: rryan
Date: 2012-09-23T20:46:10Z


Thanks Max -- I committed the patch with some tweaks :).

@mixxxbot
Copy link
Collaborator Author

Issue closed with status Fix Released.

@mixxxbot mixxxbot transferred this issue from another repository Aug 24, 2022
@mixxxbot mixxxbot added this to the 1.11.0 milestone Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant